Microsoft SDK for Java

setCooperativeLevel

This method of the DirectSound Class sets the cooperative level of the application for this sound device.

Syntax

public void setCooperativeLevel(int hwnd, int level);

Parameters

hwnd Window handle for the application.
level One value of DSSCL_ type, specifying the requested priority level.

Remarks

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.

Example

class Test implements DirectXConstants{

    void run(){
                  DirectSound ds = new DirectSound();
                  this.show();
                  ds.setCooperativeLevel(this,DSSCL_EXCLUSIVE);
              }
}

See Also

compact

© 1999 Microsoft Corporation. All rights reserved. Terms of use.