Click here to Skip to main content
15,899,475 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Killing clicking noises after downsampling 48kHz to 8kHz Pin
CrazyDogg17-Oct-08 3:40
CrazyDogg17-Oct-08 3:40 
GeneralRe: Killing clicking noises after downsampling 48kHz to 8kHz Pin
Redeye9217-Oct-08 4:02
Redeye9217-Oct-08 4:02 
GeneralRe: Killing clicking noises after downsampling 48kHz to 8kHz Pin
CrazyDogg17-Oct-08 4:19
CrazyDogg17-Oct-08 4:19 
GeneralRe: Killing clicking noises after downsampling 48kHz to 8kHz Pin
Redeye9217-Oct-08 4:21
Redeye9217-Oct-08 4:21 
GeneralRe: Killing clicking noises after downsampling 48kHz to 8kHz Pin
CrazyDogg17-Oct-08 4:30
CrazyDogg17-Oct-08 4:30 
GeneralRe: Killing clicking noises after downsampling 48kHz to 8kHz Pin
Redeye9217-Oct-08 4:38
Redeye9217-Oct-08 4:38 
GeneralRe: Killing clicking noises after downsampling 48kHz to 8kHz Pin
CrazyDogg17-Oct-08 4:43
CrazyDogg17-Oct-08 4:43 
GeneralRe: Killing clicking noises after downsampling 48kHz to 8kHz Pin
Redeye9217-Oct-08 5:01
Redeye9217-Oct-08 5: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 5:16
CrazyDogg17-Oct-08 5:16 
QuestionClipBoard Pin
MsmVc17-Oct-08 2:20
MsmVc17-Oct-08 2:20 
AnswerRe: ClipBoard Pin
SandipG 17-Oct-08 2:25
SandipG 17-Oct-08 2:25 
QuestionRe: ClipBoard Pin
David Crow17-Oct-08 3:50
David Crow17-Oct-08 3:50 
AnswerRe: ClipBoard Pin
MsmVc17-Oct-08 18:18
MsmVc17-Oct-08 18:18 
GeneralRe: ClipBoard Pin
David Crow18-Oct-08 14:40
David Crow18-Oct-08 14:40 
AnswerRe: ClipBoard Pin
MsmVc17-Oct-08 19:06
MsmVc17-Oct-08 19:06 
GeneralRe: ClipBoard Pin
David Crow18-Oct-08 14:38
David Crow18-Oct-08 14:38 
AnswerRe: ClipBoard Pin
Hamid_RT17-Oct-08 19:07
Hamid_RT17-Oct-08 19:07 
Questionhow to use non-english language? Pin
includeh1017-Oct-08 2:04
includeh1017-Oct-08 2:04 
AnswerRe: how to use non-english language? Pin
SandipG 17-Oct-08 2:13
SandipG 17-Oct-08 2:13 
AnswerRe: how to use non-english language? Pin
Hamid_RT17-Oct-08 19:09
Hamid_RT17-Oct-08 19:09 
QuestionSetWindowPos Not working Pin
naga.anu17-Oct-08 1:31
naga.anu17-Oct-08 1:31 
QuestionRe: SetWindowPos Not working Pin
Mark Salsbery17-Oct-08 5:35
Mark Salsbery17-Oct-08 5:35 
AnswerRe: SetWindowPos Not working Pin
CPallini17-Oct-08 6:31
mveCPallini17-Oct-08 6:31 
GeneralRe: SetWindowPos Not working Pin
Mark Salsbery17-Oct-08 6:56
Mark Salsbery17-Oct-08 6:56 
QuestionConvert image to byte array Pin
hari_honey17-Oct-08 1:17
hari_honey17-Oct-08 1: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.