IDirectMusicSynthSink::Activate method (dmusics.h)
The Activate
method activates or deactivates the synthesizer sink.
Syntax
HRESULT Activate(
BOOL fEnable
);
Parameters
fEnable
Specifies whether to activate the synth sink. If TRUE, the method activates the synth sink. If FALSE, it deactivates it.
Return value
Activate
returns S_OK if the call was successful. Otherwise, the method returns an appropriate error code. The following table shows some of the possible return status codes.
Return code | Description |
---|---|
|
Indicates that the method is unable to activate or deactivate the synth sink. |
|
Indicates that the synth is not set or not properly configured. |
|
Indicates that the sink is already active. |
|
Indicates that SetDirectSound hasn't been called successfully. |
|
Indicates that SetMasterClock hasn't been called successfully. |
Remarks
The synthesizer itself can be told to enable or disable the audio device. In turn, it calls the synth sink, which manages the audio device. This gives the application the ability to manage its use of resources. When it is not playing music, it can deactivate the sink to free the wave-output device for other applications.
For more information, see the description of the IDirectMusic interface in the Microsoft Windows SDK documentation.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | dmusics.h (include Dmusics.h) |