Sign in to follow this  

November 2008 DXSDK - DirectSound

This topic is 3316 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys, Just started playing with direct sound today. I created the device as directed but keep recieving E_INVALID ARGS when I call SetCooperativeLevel().

static LPDIRECTSOUND8 lpDS;  //this is a pointer to the DirectSound Object 
static HWND hMainWnd;  //handle to your programs main window 

//////////////////////////////////////////////////////////////////////

//Then the following:

if (DS_OK==DirectSoundCreate8(NULL,&lpDS,NULL)) //create direct sound object
{
        
lpDS->Initialize(NULL);

// Set CoOp level here
HRESULT coopStatus = lpDS->SetCooperativeLevel(hMainWnd, DSSCL_PRIORITY);

//error handling stuff here

}


Is there any way to find which of the arguments is invalid or even why? I speculate that because Im using the new SDK, MS are trying to get us using XACT/XAudio2 but neither support microphones so the option isnt there for me. Besides the methods are still in the header files etc.. I am using Vista with an on board creative card. Any Ideas?

Share this post


Link to post
Share on other sites

This topic is 3316 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this