View Full Version : Question on waveOutOpen()
Marklee
04-13-2005, 07:54 AM
What would cause this to return a code of MMSYSERR_INVALFLAG(10)? I'm at a loss on how to troubleshoot this.
Ed Mack
04-13-2005, 08:38 AM
Which API? openAL?
Marklee
04-13-2005, 08:46 AM
Which API? openAL?
17153
waveOutOpen() imported from winmm.dll.
Reedbeta
04-13-2005, 12:15 PM
Well, it's yelling about an invalid flag, so the obvious question is...what are you passing in for the flags parameter?
Marklee
04-13-2005, 12:26 PM
I'm passing in 0x00030000 as the last parameter, which is CALLBACK_FUNCTION.
Reedbeta
04-13-2005, 01:05 PM
Make sure the dwCallback parameter is the address of a function with the proper prototype. The callback function must also be declared with the CALLBACK calling convention.
Also try adding WAVE_ALLOWSYNC to the flags, just to see if this makes it work.
Marklee
04-13-2005, 01:54 PM
Make sure the dwCallback parameter is the address of a function with the proper prototype. The callback function must also be declared with the CALLBACK calling convention.
Also try adding WAVE_ALLOWSYNC to the flags, just to see if this makes it work.
17160
Ok, I tried that, but I'm getting the same return code. The thing is, I don't really think the flag is where the problem is. I can call waveOutOpen() with a format(3rd parameter) of PCM, and everything would be fine. But if I change the format to GSM610 and leave all the other parameters the same, I get an invalid flag return code. I don't think its the callback function either, since it works if I set the format to PCM.
Reedbeta
04-13-2005, 03:17 PM
Hmm...I don't know much of anything about the GSM codec. Possibly it's not supported by the wavOut functions, but needs a third-party library to decode?
Marklee
04-13-2005, 03:30 PM
Hmm...I don't know much of anything about the GSM codec. Possibly it's not supported by the wavOut functions, but needs a third-party library to decode?
17162
I believe its supported as long as you have the codec. I know its supported because I have source code in C++ that uses it, and when I compile it, it works using the GSM610 format. But I'm trying to convert it to C#, and that's where I'm getting stuck on because I'm getting an error code of 10 back when trying to use waveOutOpen().
vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.