I’m currently developing a Win32-Service (find the code [url=http://pastebin.com/779899:2uo1g582]here[/url:2uo1g582]; it’s in line 88 where wmus_main() gets called) that should play a sound:
// initialize fmod
if (!FSOUND_Init(44100, 64, 0))
debug_stream = fopen("c:\temp\wmus.log", "w");
fprintf(debug_stream, "%s\n", FMOD_ErrorString(FSOUND_GetError()));
The Error, I get is called like this:
"Error setting cooperative level for hardware."
I googled a bit around and found out, that it looks like a DirectSound issue. Maybe it has something to do with a window-handler (HWND), that’s missing with win32-services? I’m not that experienced with that. FSOUND_Init returns with a success return value, when the code gets executed on the command-line (i created a dedicated test-application for that).
Compilation was done with Visual C++ 7.1 (MS Visual Studio .NET 2003) my Operating System is MS Windows XP Professional with SP2.
Best regards and thanks for reading,
- dubbaluga asked 11 years ago
- You must login to post comments