Jump to content


Question on waveOutOpen()


8 replies to this topic

#1 Marklee

    New Member

  • Members
  • Pip
  • 5 posts

Posted 13 April 2005 - 01:54 PM

What would cause this to return a code of MMSYSERR_INVALFLAG(10)? I'm at a loss on how to troubleshoot this.

#2 Ed Mack

    Senior Member

  • Members
  • PipPipPipPip
  • 1239 posts

Posted 13 April 2005 - 02:38 PM

Which API? openAL?

#3 Marklee

    New Member

  • Members
  • Pip
  • 5 posts

Posted 13 April 2005 - 02:46 PM

Ed Mack said:

Which API? openAL?

View Post


waveOutOpen() imported from winmm.dll.

#4 Reedbeta

    DevMaster Staff

  • Administrators
  • 5307 posts
  • LocationBellevue, WA

Posted 13 April 2005 - 06:15 PM

Well, it's yelling about an invalid flag, so the obvious question is...what are you passing in for the flags parameter?
reedbeta.com - developer blog, OpenGL demos, and other projects

#5 Marklee

    New Member

  • Members
  • Pip
  • 5 posts

Posted 13 April 2005 - 06:26 PM

I'm passing in 0x00030000 as the last parameter, which is CALLBACK_FUNCTION.

#6 Reedbeta

    DevMaster Staff

  • Administrators
  • 5307 posts
  • LocationBellevue, WA

Posted 13 April 2005 - 07: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.
reedbeta.com - developer blog, OpenGL demos, and other projects

#7 Marklee

    New Member

  • Members
  • Pip
  • 5 posts

Posted 13 April 2005 - 07:54 PM

Reedbeta said:

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.

View Post


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.

#8 Reedbeta

    DevMaster Staff

  • Administrators
  • 5307 posts
  • LocationBellevue, WA

Posted 13 April 2005 - 09: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?
reedbeta.com - developer blog, OpenGL demos, and other projects

#9 Marklee

    New Member

  • Members
  • Pip
  • 5 posts

Posted 13 April 2005 - 09:30 PM

Reedbeta said:

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?

View Post


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().





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users