How have I to calculate the position in seconds by the FSOUND_Stream_SetPosition-Function.
The Stream is a 44khz Stereo one.
If i want to go to position 10s, I must give the function 20 * 44000. Or not?
The function takes the position in bytes. One second: 2(stereo) * 44000 (per second) = 88000 (bytes per second)
I do not really know please help me?
FSOUND_Stream_SetPosition seeks around in the file you are streaming.
Hence the relation between File Pointer Pos and Sound/Time Pos is dependant on the file format you are using.
If you are using uncompressed 16bit stereo 44khz .wav’s the relation is somewhat easy:
Every second the data needed for playback is (16 * 2 * 44100)/8 bytes. So the value you pass to the function is
v = (t * 32 * 44100) / 8
- night answered 14 years ago
Please login first to submit.