November 2008 DXSDK - DirectSound

Started by
0 comments, last by AshleysBrain 15 years, 5 months ago
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?
Perfection is a product of progress not an alternative.

Advertisement
Does or did it work with an earlier SDK? Can you revert to an earlier SDK if it helps? If it does work, you might want to let Microsoft know, it might be a bug.
Construct (Free open-source game creator)

This topic is closed to new replies.

Advertisement