0
0

Can someone tell me which of following FMod functions treat streams as zero-based and which treat streams as one-based? Off by one errors, being a millisecond off, or one byte off, or one PCM sample off, may not be a big deal, but who knows.

FSOUND_Stream_GetLengthMs (one-based)
FSOUND_Stream_GetTime (?)
FSOUND_Stream_SetTime (zero-based)

FSOUND_Stream_GetLength (?)
FSOUND_Stream_GetPosition (?)
FSOUND_Stream_SetPosition (?)

FSOUND_Stream_SetLoopPoints (?)

Thanks,

–Llyal

  • You must to post comments
0
0

Llyal,

Byte position 0 apparently corresponds to the first byte of the stream, because FMOD doesn’t puke when you instruct it to seek to byte zero. [If someone referred me to byte position zero, I would feel a little confused about where, precisely, I’m supposed to be.] Makes you wonder, then, what is byte position one? You can just think of this peculiarity as a convenience–everything starts at zero :) If so, there should be N+1 valid byte designations in a stream: byte zero is not a byte, but it is a valid position as far as FMOD is concerned.

On the other hand, time position zero is intuitive because, well, the scale is time: zero media content played/scanned/analyzed etc.

Hope this helps,

  • SD
  • You must to post comments
0
0

I was having difficulty in how i would handle the last millisec/position in the stream. If i had a stream 1000ms long, then i could only set the stream position to 999ms, not to 1000ms which is the end of the stream. It took me a while to figure out that i do not need to set the stream position to the stream end. When the streams ends, my code now simply notes that this means 1000ms. If i decide to skip backwards over the stream, then i set the stream position. Wow, what a simple solution!

Thanks for the hand-holding. :-)

–Llyal

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.