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.
- llyal2000 asked 13 years ago
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,
- stdev answered 13 years ago
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.
- llyal2000 answered 13 years ago
Please login first to submit.