This method of the DirectSound Class sets the cooperative level of the application for this sound device.
public void setCooperativeLevel(int hwnd, int level);
hwnd | Window handle for the application. |
level | One value of DSSCL_ type, specifying the requested priority level. |
The application must set the cooperative level by calling this method before its buffers can be played. The recommended cooperative level is DSSCL_NORMAL; use other priority levels when necessary.
You must call the show() or addNotify() method before calling setCooperativeLevel.
class Test implements DirectXConstants{ void run(){ DirectSound ds = new DirectSound(); this.show(); ds.setCooperativeLevel(this,DSSCL_EXCLUSIVE); } }