Your reply to your own proposal is what I would support. For people who require an accurate length from the start will have to suffer a blocking function call, while those who don’t really care can do other stuff while waiting for the non-blocking call to finish.
Without actually using the length of a stream function before, I would guess that once you know the actual length then it would be nice to update the data exposed to the user. However, you would also have to make sure the developer is aware of this by a big note in the documentation.
Of course, people who have used the stream length functionality before may have a different opinion.
As a developer who uses the GetLength, I actually update it as often as any of my interface components require it (atm, it is an idle timer which updates every 10-25ms)
In my opinion it would be awesome if I could still use FSOUND_MPEGACCURATE, and have it non-blocking so that I can continue processing, and then update a short time later after FMOD has finished parsing the media file. I could see this working as a callback, but not required.
If i am updating regularly anyway, I should just be able to GetLength() and when it changes, I can update, without having to implement a callback function. Or if I have a static interface and just want to update when i know that the length has updated, then the callback would be useful.
I know that this thread is old but one thing that should be nice is that it should be possible to calculate the exakt position when using FSOUND_Stream_SetTime.
I don’t know if the entire file has to be scanned if i just want to set the time on 1025 ms exakt?
Sorry if this message is off-topic.
Please login first to submit.