0
0

I’m using Channel::setLoopPoints with FMOD_TIMEUNIT_PCM and I’d like to confirm something about its usage. It appears that value that should be used is the raw sample offset without regard to the number of channels. So if I want to loop for the first second on a mono 44.1 kHz wave I would use:

setLoopPoints(0,FMOD_TIMEUNIT_PCM,44100,FMOD_TIMEUNIT_PCM);

and if I want to do the same with a stereo 44.1kHzwave I would use:

setLoopPoints(0,FMOD_TIMEUNIT_PCM,88200,FMOD_TIMEUNIT_PCM);

Is this correct?

  • You must to post comments
0
0

Or is my problem that I am using the wrong samplerate. Should I be using the mixing sample rate or the samplerate of the wave file that I am playing when I determine which sample to specify for the loop point?

  • You must to post comments
0
0

The number of channels is not counted, 1 sample = 2 shorts if it is stereo, 1 if it is mono , 6 shorts if it is a 6channel sound. This means you stick with 0 and 44100 each time. Read the introduction tutorial in the fmod.chm for more on sound formats.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.