DevMaster.net Forums
[[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]]

Go Back   DevMaster.net Forums > Programming & Development > Sound and Music Programming
User Name
Password
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 04-13-2005, 07:54 AM   #1
Marklee
New Member
 
Join Date: Apr 2005
Posts: 5
Default

What would cause this to return a code of MMSYSERR_INVALFLAG(10)? I'm at a loss on how to troubleshoot this.
Marklee is offline   Reply With Quote
Old 04-13-2005, 08:38 AM   #2
Ed Mack
DevMaster Staff
 
Join Date: Jul 2003
Location: Northern Ireland
Posts: 1,250
Default

Which API? openAL?
Ed Mack is offline   Reply With Quote
Old 04-13-2005, 08:46 AM   #3
Marklee
New Member
 
Join Date: Apr 2005
Posts: 5
Default

Quote:
Originally Posted by Ed Mack
Which API? openAL?
[snapback]17153[/snapback]

waveOutOpen() imported from winmm.dll.
Marklee is offline   Reply With Quote
Old 04-13-2005, 12:15 PM   #4
Reedbeta
DevMaster Staff
 
Join Date: Oct 2004
Location: Seattle, WA
Posts: 3,707
Default

Well, it's yelling about an invalid flag, so the obvious question is...what are you passing in for the flags parameter?
___________________________________________
Currently working at Sucker Punch
reedbeta.com - OpenGL demos and other projects
Luabridge - a lightweight, dependency-free C++/Lua binding library.
CD Lite - an unobtrusive, minimal CD player application for Windows.
Reedbeta is offline   Reply With Quote
Old 04-13-2005, 12:26 PM   #5
Marklee
New Member
 
Join Date: Apr 2005
Posts: 5
Default

I'm passing in 0x00030000 as the last parameter, which is CALLBACK_FUNCTION.
Marklee is offline   Reply With Quote
Old 04-13-2005, 01:05 PM   #6
Reedbeta
DevMaster Staff
 
Join Date: Oct 2004
Location: Seattle, WA
Posts: 3,707
Default

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.
___________________________________________
Currently working at Sucker Punch
reedbeta.com - OpenGL demos and other projects
Luabridge - a lightweight, dependency-free C++/Lua binding library.
CD Lite - an unobtrusive, minimal CD player application for Windows.
Reedbeta is offline   Reply With Quote
Old 04-13-2005, 01:54 PM   #7
Marklee
New Member
 
Join Date: Apr 2005
Posts: 5
Default

Quote:
Originally Posted by Reedbeta
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.
[snapback]17160[/snapback]

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.
Marklee is offline   Reply With Quote
Old 04-13-2005, 03:17 PM   #8
Reedbeta
DevMaster Staff
 
Join Date: Oct 2004
Location: Seattle, WA
Posts: 3,707
Default

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?
___________________________________________
Currently working at Sucker Punch
reedbeta.com - OpenGL demos and other projects
Luabridge - a lightweight, dependency-free C++/Lua binding library.
CD Lite - an unobtrusive, minimal CD player application for Windows.
Reedbeta is offline   Reply With Quote
Old 04-13-2005, 03:30 PM   #9
Marklee
New Member
 
Join Date: Apr 2005
Posts: 5
Default

Quote:
Originally Posted by Reedbeta
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?
[snapback]17162[/snapback]

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().
Marklee is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump


All times are GMT -7. The time now is 05:47 AM.


Powered by vBulletin
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.