directsound stuff
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;
dsbd.dwFlags = DSBCAPS_CTRLDEFAULT | DSBCAPS_STATIC | DSBCAPS_LOCSOFTWARE;
I think you are using DirectX 8.x with code written for older versions.
So you have to replace DSBCAPS_CTRLDEFAULT with the flags mentioned above.
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.
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?
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?
Yes, DSBCAPS_CTRLDEFAULT was supported in DirectX 6.1, but it has been removed in DirectX 7.0.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement