This project has moved and is read-only. For the latest updates, please go here.

some questions about resampling!

Mar 29, 2010 at 5:20 PM

Hi Mark,

I have two questions. The ResamplerDmoStream class has a limitation, that it is dependent on the samplerdmo which is not available in Windows XP. I can get and the dlls and register them. Though, I want the application to be as simple as possible for users. So, is there any way to overcome this at all. Also, is there any way to make the ResamplerDmoStream accept chuncks of data as an input?

Thanks a lot.

Mar 30, 2010 at 10:27 AM

the easy way is to use WaveFormatConversionStream, since all XP machines have an ACM codec that can do Sample Rate Conversion.

I'm not entirely sure what you mean by accepting chunks of data as input. If you derive your own WaveStream class, then you can pass chunks of data into that, and they can be read out from the Read method



Mar 30, 2010 at 2:55 PM

Acm codec is not accurate in both downsampling and upsampling. I hear a lot of noise in the audio track. Any solution to this? By the way, I have tried the conversion using both of WaveFormatConversionStream class and the Windows XP Sound Recoder. They end up in the same result.

I'm not entirely sure what you mean by accepting chunks of data as input.

What I meant, is I need to split the wav source into blocks and resample each of them, one at a time then write them to a file. How can I achieve that? Also, it would be really nice if you point to an example.

I appreciate it, Mark.

Mar 31, 2010 at 11:51 AM

I'm surprised you get a lot of noise. What are you going from and to? Is it clicking noise?

I'm afraid I have no example code, but you can simply make a custom WaveStream that only returns the portion of your WAV file you want to resample in your Read method. Then you can use that as the input to the WaveFormatConversionStream


Mar 31, 2010 at 1:49 PM

I have tried some files with different sampling rates (they share the same bitdepth which is 16bit, and the same number of channels which is 1 (mono)). Either, I hear a noise like the one your hear in a vinyl record or the one you hear when they try to make a robotic speaking sound effect (that is the closest thing to it). Anyway, I am not surprised. I have seen another thread with a user having the same problem. It is dependent on the acm codec. So, I will stick to the resamplerdmo at the moment. I will give it a go with the WaveStream class. I hope I find my way around it. Thank you for your continuous support, Mark. Also, thanks for this great framework.