Hello, newbie to fmod here.
I am able to get my 3d sounds (all in OGG format) working just fine on several different audio cards and several flavors of windows for a school design project.
However, I cannot get streaming music (also OGG) to work properly. It will work if I set the control panel HW accel for the sound card to the lowest setting, but of course, then the performance of all of the 3d sounds drops to unacceptable levels. This is in fmod 3.6 and I also tried another version I found in another post (3.61?).
I’ve tried several bitrates and both mono and stereo files. These files all work fine in winamp and the fmod “stream” sample app.
Here is my code to play it:
FSOUND_STREAM* mus = FSOUND_Stream_OpenFile(gGameMusicFiles[ii],FSOUND_2D|FSOUND_LOOP_OFF,0);
if ( mus )
const int nChannel = FSOUND_Stream_PlayEx(FSOUND_FREE, mus, NULL, TRUE);
I also thought maybe I should hardcode to play to channel 0, which should be a software channels (since music does play with no HW accel). That again only worked without accel.
I see this behavior on my main dev machine (SB Audigy and Win2k and DirectX 8.1b) and on my other machine (some sort of OEM card, Win2k, DX8.1b). The Audigy drivers are relatively new (maybe dl’d around October 1st?), but I don’t think it should be driver related since the other PC does the same thing and who knows how old the drivers or even what card is in it…
Also, should I expect this behavior on the NT machines at school? I don’t have access to control panel there.
But…since it does work in full SW, it leaves me puzzled (and frustrated). I suppose in the short term I could just cheat and run winamp in the background while I demonstrate the project, but I really need a REAL solution…
Thanks for your time and help,
- espmiii asked 16 years ago
Well, here are my results:
tried to pause with Sleep(100000), get no output.
copied loading code verbatim from stream example (even though I don’t want looping):
mus = FSOUND_Stream_OpenFile("title.ogg", FSOUND_NORMAL | FSOUND_LOOP_NORMAL | FSOUND_MPEGACCURATE, 0);
removed file callbacks so fmod uses fopen or whatever internally, no output.
FSOUND_INIT_GLOBALFOCUS doesn’t work.
DebugTrace(“C:\Projects\ProjectX\Sound\XSound.cpp(148): FSOUND_Stream_OpenFile(): %s\n”, FMOD_ErrorString(FSOUND_GetError()));
after every fmod call in the app. everything says success except for the stream open file where I get: “An invalid parameter was passed to this function”
so I’ve tried removing FSOUND_2D, FSOUND_LOOP_OFF, sending “0” as the mode param, also copying the flags from the example and still nothing.
I also tried using the original .wav files instead of the .ogg files, just in case there may have been a problem there.
the weird thing is when I set acceleration to “None”, the music works, but the FSOUND_GetError still returns “An invalid parameter was passed to this function”.
so is this a driver problem? shouldn’t I get a success return when I’m hearing output?
it also doesn’t work changing to FSOUND_OUTPUT_WINMM.
any more suggestions?
[quote:2hzfne7a]This sounds like something very very simple.[/quote:2hzfne7a]
of course, isn’t it always?
ok, so what it turned out to be was i was calling FSOUND_Init() in another thread (i had moved the call to my AppInit to a separate thread and forgotten that fact…).
well, live and learn…
thanks again for your time,
Please login first to submit.