0
0

Hi everyone,

I have a sound sampled at 44100 hz, 16 bit stereo.

Ideally, I should like to resample this sound at 22050 hz. How would I go about this using FMOD 3.75?

Some (simple) code would be very much preferred. I know how to get the individual samples – but some pseudo code outlining what operations to take on the individual samples would be very much appreciated.

for (int i = 0; i < maxsamples; i++)
// do this to the sample

Any help is very much appreciated.

Best regards,

Peter.

  • You must to post comments
0
0

If you just want to play it back at a different sample rate, just use FSOUND_SetFrequency.

To actually modify the data, it is more complex, you have to use FSOUND_Sample_Lock/Unlock.

  • You must to post comments
0
0

Thanks Brett.

Since I am to re-encode the samples in Speex, I’ll need to use FSOUND_Sample_Lock()/FSOUND_Sample_Unlock() to get a hold of the PCM data.

My question, therefore, still remains: How can I change the sampling rate of the sound data once I have a hold of it with FSOUND_Sample_Lock()?

A website (ideally with simple code and a good description of the algorithm) would be very much appreciated.

I look forward to any replies.

Best regards,

Peter.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.