I was wondering if you could add support for unicode URLs (like shoutcast). I can open a filename in unicode, but when I pass a URL as unicode, FMOD return invalid param. Right now, i test for invalid param and then if its true, I convert the path to multi-byte and try to load it again, however i can’t do that when I use the non-blocking flag (cuz fmod returns OK no matter what)
- nci asked 9 years ago
Ok just to clarify, you can, and should, be checking the result of Sound::getOpenState() to determine what happened during System::createSound for non-blocking sounds. This will return invalid parameter the same as you would get from createSound on a blocking load.
However it would be nice if FMOD would handle URLs the same as files even though URLs don’t make use of the unicode characters. I have put in a simple multi-byte fold down to the URL loading code, so loading "www.fmod.org/sound.wav" and L"www.fmod.org/sound.wav" will work (providing you provide the unicode flag for the latter URL).
This addition will be introduced in our next development branch release.
its not a url that contains unicode characters, i meant to say unicode string. a normal shoutcast url, like
that works fine but when its passed as a wide character string like
then it wont work. It would just be nice to have it accept wide character strings for URLs as it does for filenames.
What I do is store all filenames in wide character strings, but occasionaly one of the filenames is a URL, which cuases the error, so I have to check for FMOD returning an invalid parameter result, so I can then convert the path to multi-byte and re-load it. I was just asking if URLs could be recognized when they are passed as wide character strings.
Please login first to submit.