Advertisement

directsound stuff

Started by May 01, 2002 10:00 AM
4 comments, last by edwinnie 22 years, 6 months ago
okie, i am using TOTWGPG. i am using oso the 16bit bob engine provided by the cd. i tried compiling with sound stuffs. but this is the weird error i got. prototype: int DSound_Load_WAV(char *filename, int control_flags = DSBCAPS_CTRLDEFAULT); function: int DSound_Load_WAV(char *filename, int control_flags) ... dsbd.dwFlags = control_flags | DSBCAPS_STATIC | DSBCAPS_LOCSOFTWARE; ... error: error C2065: ''DSBCAPS_CTRLDEFAULT'' : undeclared identifier i mean, how can that be? a directsound secondary buffer creation flag oso need to declare? oh ya, i did not modify anything. i jus took it fresh from the cd.
it oso happens if it is set to

dsbd.dwFlags = DSBCAPS_CTRLDEFAULT | DSBCAPS_STATIC | DSBCAPS_LOCSOFTWARE;
Advertisement
nvm , as it does not exist
I think you are using DirectX 8.x with code written for older versions.

quote:
From DX8.1 docs
The DSBCAPS_CTRLDEFAULT flag is no longer supported. This flag was defined as DSBCAPS_CTRLPAN | DSBCAPS_CTRLVOLUME | DSBCAPS_CTRLFREQUENCY. By specifying only the flags you need, you cut down on unnecessary resource usage.


So you have to replace DSBCAPS_CTRLDEFAULT with the flags mentioned above.
Problems with Windows? Reboot! - Problems with Linux? Be root!
Yah i had the same problem!
I just changed the DSBCAPS_CTRLDEFAULT by DSBCAPS_STATIC | DSBCAPS_LOCSOFTWARE|...... and i should tell u that i checked for that default flag in my MSDN''cd but nothing!
What i didn''t know is that it was supported by previous versions of Directx, right Erluk?
"...and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces."----------Scott Meyers, "Effective C++"
Yes, DSBCAPS_CTRLDEFAULT was supported in DirectX 6.1, but it has been removed in DirectX 7.0.
Problems with Windows? Reboot! - Problems with Linux? Be root!

This topic is closed to new replies.

Advertisement