I’m working on a [url=http://www.realbasic.com/:33x2gan7]RealBasic[/url:33x2gan7] (Basic IDE for Mac which compiles for Mac and PC) wrapper for FMOD. Everything is working great (in Win32 compiles, of course) except for this one bug in RealBasic which is getting annoying; it’s totally impossible to see wether a stream has ended by the user or because it just reached the end. I tried setting a global variable etc, none of that worked because of some weird problem in RealBasic. So I was wondering if there is any other reliable way to see if the stream ended or not? If not, maybe for 3.60 you could use the ‘length’ param in the Stream callback to indicate which one it is.
- Evinyatar asked 15 years ago
The replies to the original post do not address the fact that Evinyatar cannot determine how a stream was stopped. Since he can’t use a global for some reason.
I would suggest (and this isn’t as silly as it sounds) that you write a file with the value of your global. File I/O and caching is so fast nowadays that no one is likely to notice (or care).
- Phil answered 15 years ago
I think you misunderstood my question. I’m trying to see if the endcallback was called because the user stopped the stream, or because the stream just reached its end. I guess comparing FSOUND_Stream_GetTime with FSOUND_Stream_GetLengthMs will have to do then.
I still can’t figure out why a global doesn’t work for this. It’s just one of RealBasics many glitches, I guess.
Edit: I just came across [url=http://www.fmod.org/forum/viewtopic.php?t=763:18xit9xk]this[/url:18xit9xk] post. So I guess comparing FSOUND_Stream_GetTime with FSOUND_Stream_GetLengthMs isn’t going to work in those cases either. Quite annoying if you’re trying to make a playlist based application. Anyone got any better ideas (I don’t like to resort to external storage for global variables, it’s ugly).
[quote="brett":2iks10fm]Stream_GetLengthMS does work.. if you read to the bottom you would see that.[/quote:2iks10fm]Yeah, I read that a bit too late. Thanks
[quote:2iks10fm]FMOD 3.6 has a FSOUND_NONBLOCKING flag which means streams open in the background which is handy for filling out a playlist.. (it means even if FSOUND_MPEGACCURATE takes a bit of time it will happen in the background anyway)..[/quote:2iks10fm]Sweet 😀 I’m really looking forward to 3.60, especially the Mac port
[quote:2iks10fm]my other suggestion is .. use a real language :)[/quote:2iks10fm]I would if there was anything else that would make Mac and Win32 (and Linux in the future) apps from the same project file with barely any modifications… for instance, the only modifications I’d have to make to the FMOD wrapper to make it work with the Mac port (once it’s out), is the name of the library and the name of the calls. And anyway once the new compiler is finished, hopefully all this crap with globals not updating soon enough will be fixed.
Please login first to submit.