Click here to Skip to main content
15,845,212 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Killing clicking noises after downsampling 48kHz to 8kHz Pin
CrazyDogg17-Oct-08 4:40
CrazyDogg17-Oct-08 4:40 
GeneralRe: Killing clicking noises after downsampling 48kHz to 8kHz Pin
Redeye9217-Oct-08 5:02
Redeye9217-Oct-08 5:02 
GeneralRe: Killing clicking noises after downsampling 48kHz to 8kHz Pin
CrazyDogg17-Oct-08 5:19
CrazyDogg17-Oct-08 5:19 
GeneralRe: Killing clicking noises after downsampling 48kHz to 8kHz Pin
Redeye9217-Oct-08 5:21
Redeye9217-Oct-08 5:21 
GeneralRe: Killing clicking noises after downsampling 48kHz to 8kHz Pin
CrazyDogg17-Oct-08 5:30
CrazyDogg17-Oct-08 5:30 
GeneralRe: Killing clicking noises after downsampling 48kHz to 8kHz Pin
Redeye9217-Oct-08 5:38
Redeye9217-Oct-08 5:38 
GeneralRe: Killing clicking noises after downsampling 48kHz to 8kHz Pin
CrazyDogg17-Oct-08 5:43
CrazyDogg17-Oct-08 5:43 
GeneralRe: Killing clicking noises after downsampling 48kHz to 8kHz Pin
Redeye9217-Oct-08 6:01
Redeye9217-Oct-08 6:01 
Okay, it sounds like you've got several problems that I'm not really going to be able to solve quickly for you, but I'll give you some pointers :

1. It sounds like you've got problems with your buffer start/end points. Check that you can take data in and send it back out to the soundcard at 48kHz without any degradation before you start worrying about downsampling and doing uLaw encoding.
2. You need to low pass filter before you do the decimation. The routine you posted isn't doing this - it's just giving you a weighted average of every 6 samples which is completely different. It's actually best done in two stages - LPF the buffer in place (corner freqency just above 4kHz), then decimate using the routine that I posted. The filtering is probably best done with a biquad IIR filter - you'll probably get away with a 2nd order LPF filter at 5kHz for what you're doing. To implement the IIR filter, do a search on the web - that's a big topic in itself.
3. If I were you I'd do all the intermediate calculation in floating point and only convert back to fixed point at the last minute. There's relatively little performance hit in Windows and it helps avoid some hideous problems that you can encounter with fixed-point IIR filtering.
GeneralRe: Killing clicking noises after downsampling 48kHz to 8kHz Pin
CrazyDogg17-Oct-08 6:16
CrazyDogg17-Oct-08 6:16 
QuestionClipBoard Pin
MsmVc17-Oct-08 3:20
MsmVc17-Oct-08 3:20 
AnswerRe: ClipBoard Pin
SandipG 17-Oct-08 3:25
SandipG 17-Oct-08 3:25 
QuestionRe: ClipBoard Pin
David Crow17-Oct-08 4:50
David Crow17-Oct-08 4:50 
AnswerRe: ClipBoard Pin
MsmVc17-Oct-08 19:18
MsmVc17-Oct-08 19:18 
GeneralRe: ClipBoard Pin
David Crow18-Oct-08 15:40
David Crow18-Oct-08 15:40 
AnswerRe: ClipBoard Pin
MsmVc17-Oct-08 20:06
MsmVc17-Oct-08 20:06 
GeneralRe: ClipBoard Pin
David Crow18-Oct-08 15:38
David Crow18-Oct-08 15:38 
AnswerRe: ClipBoard Pin
Hamid_RT17-Oct-08 20:07
Hamid_RT17-Oct-08 20:07 
Questionhow to use non-english language? Pin
includeh1017-Oct-08 3:04
includeh1017-Oct-08 3:04 
AnswerRe: how to use non-english language? Pin
SandipG 17-Oct-08 3:13
SandipG 17-Oct-08 3:13 
AnswerRe: how to use non-english language? Pin
Hamid_RT17-Oct-08 20:09
Hamid_RT17-Oct-08 20:09 
QuestionSetWindowPos Not working Pin
naga.anu17-Oct-08 2:31
naga.anu17-Oct-08 2:31 
QuestionRe: SetWindowPos Not working Pin
Mark Salsbery17-Oct-08 6:35
Mark Salsbery17-Oct-08 6:35 
AnswerRe: SetWindowPos Not working Pin
CPallini17-Oct-08 7:31
mveCPallini17-Oct-08 7:31 
GeneralRe: SetWindowPos Not working Pin
Mark Salsbery17-Oct-08 7:56
Mark Salsbery17-Oct-08 7:56 
QuestionConvert image to byte array Pin
hari_honey17-Oct-08 2:17
hari_honey17-Oct-08 2:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.