Skip to main content
GameDev.net gamedev.net
🔒 Locked

DirectSound Error

Started by Bleakcabal Sep 29, 2000 at 5:26 PM 5 replies 450+ views
Original Post
Bleakcabal
Bleakcabal
I get this error when I try and compile my code. error C2065: ''DSBCAPS_CTRLDEFAULT'' : undeclared identifier It seems that when I use and DSBCAPS I get an undeclared identifier error. The strange thing is I have included the header dsound.h and the file dsound.lib in my progrect. Should''nt these be declared with dsound ?
WHO DO THEYTHINK THEY'REFOOLING : YOU ?
a2k
a2k
ctrldefault is now obsolete with new versions of directx. you need to OR all the flags together. like DSBCAPS_PAN | DSBCAPS_FREQUENCY | DSBCAPS_VOLUME, or however the syntax goes.

a2k
------------------General Equation, this is Private Function reporting for duty, sir!a2k
Bleakcabal
Bleakcabal
I used
DSBCAPS_PAN | DSBCAPS_FREQUENCY | DSBCAPS_VOLUME
but then I get ( as I expected ) the same error for DSBCAPS_PAN, the problem is not with the program using wrong parameters but an undeclared identifier error whith and DSBCAPS_*

WHO DO THEYTHINK THEY'REFOOLING : YOU ?
Tornado
Tornado
Here''s what I use (Works great):

#define DSBCAPS_DEFAULT ((DSBCAPS_CTRLFREQUENCY) | (DSBCAPS_CTRLPAN) | (DSBCAPS_CTRLVOLUME))



- Goblineye Entertainment
The road to success is always under construction
Goblineye EntertainmentThe road to success is always under construction
Bleakcabal
Bleakcabal
I am not sure about the usufulness of this, because I fas as I know you can still use DSBS_CAPS_DEFAULT which does the same thing, you do not need to define a macro. I tried it tough, and as I expected I still get the undeclared identifier.
WHO DO THEYTHINK THEY'REFOOLING : YOU ?
a2k
a2k
sorry. i didn''t give the right flags. that''s why i said "however the syntax goes."


HOWEVER, i DID say,

"ctrldefault is now obsolete with new versions of directx"

you have to use each individual flag. look up the right parameters in a reference, the sdk, or use what tornado provided, if you still wanna use the dsbcapsdefault.

a2k
------------------General Equation, this is Private Function reporting for duty, sir!a2k
Bleakcabal
Bleakcabal
Okay, your right, I had used these flags before but it didndt seem to fix the errors, then I tried is Macro, but I left some DSBSCAPS_* so it didnt work. Now everything seem to be compiling just fine, havent tested yet tough.
A HUGE THANKS to all of you guys !! If you ever need anything jsut ask!
WHO DO THEYTHINK THEY'REFOOLING : YOU ?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.