Archived

This topic is now archived and is closed to further replies.

edwinnie

directsound stuff

Recommended Posts

edwinnie    122
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.

Share this post


Link to post
Share on other sites
Erluk    170
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.

Share this post


Link to post
Share on other sites
remi    150
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?

Share this post


Link to post
Share on other sites