0
0

HI@ALL

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?

  • You must to post comments
0
0

Oh i’m so stupid, i’ve overlook the function FSOUND_Stream_SetTime
, but it would be nice if someone answers me

  • You must to post comments
0
0

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

  • You must to post comments
0
0

thx Night :)

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.