I´ve been running FMOD with mp3 and wav files for a few months now. I´m going to switch from mp3 to wma. Hovewer, I have a problem when loading wma-files. FSOUND_Stream_Open always returns NULL when I try to load a wma-file. MP3 works allright with the exact same code. I´m streaming from disk and FSOUND_NORMAL|FSOUND_2D and the last parameter as 0 in the call.
I´m running DSOUND with the default driver and FSOUND_MIXER_QUALITY_AUTODETECT.
Am I missing something here, does WMA streaming require som special setups to work?
Ok.. I corrected some bugs in my code.
I still have a problem that has narrowed significantly.
I must load the first wma in the parent (process) thread. Otherwise the dll:s (devenum.dll, msadds32.ax) won´t load and FMOD gives the errorcode FMOD_ERR_FILE_FORMAT.
My window is created by the parent thread.
FMOD initializes in the parent thread and I supply the windowhandle for my window.
Most “game-code” is running in another thread as well as management of sounds.
It seems to me that DirectShow requires to be initiated by the thread owning the window.
I could see to that the first WMA gets loaded by the parent thread or I could have a dummy WMA of minimum length that forces DirectShow to initialize in the parent thread but those are not specially nice solutions.
- Anonymous answered 16 years ago
Hmmm. At first. I´m running w2k, I have DirectX SDK 7.0a installed, FMOD3.33 and 6.4 of Windows Media Player. I´m running on a SBLive Platinum if that helps.
Right this minute I found that the fmod.exe can load and play my wma-files correctly. I must be missing some setting, however i cannot find which one!
Regarding requirements for FMOD. Do FMOD require more than that DirectX should be installed? Does it really require the Windows Media Player? Which version of DirectX is required with the 3.33 release?
Ok.. is it some DirectShow stuff or stuff that comes (hopefully) with Internet Explorer that FMOD requires? Which dll:s?
I would be happy if You could straighten this our for me, I have to know what I must have in system requirements for my product.
The api FSOUND_SetHWND(hwnd) always returns 0. is that TRUE or FALSE? I cannot find it in the docs.
My problem… FSOUND_GetError() returns FMOD_ERR_MEDIAPLAYER
(haven´t looked at the errorcodes before, everything has just been working fine
My 6.4 is not enough or badly installed?
Isn´t there some workaround to make my users not having to install the Windows Media Player?
Ok.. now I tried this… I start my App.. I run around my 3D world and hear all the 3D-positioned samples playing (wav). I click on a button, an MP3-stream starts (i can hear it), it stops, I click on another button and an WMA-stream should start, but the FSOUND_Stream_OpenFile reports as before. The MP3 works even after I tried opening the WMA as well as the wav:s.
I have an C++ object that encapsulates FMOD. I´m using the same method regardless if I try to load a MP3 stream or a WMA-stream (the sample are handled differently).
I don’t know if this will help but 1)upgrade your media player to 7:)
2)this is what I use to load mp3 and I just tested it on WMA and it worked:
bool LoadStreamMp3(FSOUND_STREAM** Stream, LPCTSTR szSoundName)
*Stream = FSOUND_Stream_OpenFile(szSoundName,FSOUND_2D,0);
if ( NULL == *Stream )
InitFail(“Unable to Load Song.”);
and to play it looks like this:
bool PlayStreamMp3(FSOUND_STREAM* Stream)
if ( FALSE == FSOUND_Stream_Play(FSOUND_FREE, Stream) )
InitFail(“Unable to Play Stream!”);
I hope this helps.
Please login first to submit.