![]() |
| [[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]] |
|
|
#1 |
|
New Member
Join Date: Apr 2005
Posts: 5
|
What would cause this to return a code of MMSYSERR_INVALFLAG(10)? I'm at a loss on how to troubleshoot this.
|
|
|
|
|
|
#2 |
|
DevMaster Staff
Join Date: Jul 2003
Location: Northern Ireland
Posts: 1,250
|
Which API? openAL?
|
|
|
|
|
|
#3 | |
|
New Member
Join Date: Apr 2005
Posts: 5
|
Quote:
waveOutOpen() imported from winmm.dll. |
|
|
|
|
|
|
#4 |
|
DevMaster Staff
Join Date: Oct 2004
Location: Seattle, WA
Posts: 3,707
|
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. |
|
|
|
|
|
#5 |
|
New Member
Join Date: Apr 2005
Posts: 5
|
I'm passing in 0x00030000 as the last parameter, which is CALLBACK_FUNCTION.
|
|
|
|
|
|
#6 |
|
DevMaster Staff
Join Date: Oct 2004
Location: Seattle, WA
Posts: 3,707
|
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. |
|
|
|
|
|
#7 | |
|
New Member
Join Date: Apr 2005
Posts: 5
|
Quote:
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 |
|
DevMaster Staff
Join Date: Oct 2004
Location: Seattle, WA
Posts: 3,707
|
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. |
|
|
|
|
|
#9 | |
|
New Member
Join Date: Apr 2005
Posts: 5
|
Quote:
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(). |
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|