You can use the IAMDirectSound interface to determine whether sounds played by the filter should always be heard, or only when the application is in focus. You can also pass your window handle to the filter so it knows when your application is in focus.
The DSound Audio Renderer filter implements this interface.
Use this interface to control whether sounds made by your Microsoft® DirectShow® application will still be audible when other sound applications are in the foreground, and to control which of your application's windows is associated with sound.
Note Only the GetWindowFocus and SetWindowFocus methods are currently implemented for this interface.
Methods in Vtable Order
IUnknown methods Description QueryInterface Returns pointers to supported interfaces. AddRef Increments the reference count. Release Decrements the reference count. IAMDirectSound methods Description GetDirectSoundInterface Not currently implemented. GetPrimaryBufferInterface Not currently implemented. GetSecondaryBufferInterface Not currently implemented. ReleaseDirectSoundInterface Not currently implemented. ReleasePrimaryBufferInterface Not currently implemented. ReleaseSecondaryBufferInterface Not currently implemented. SetWindowFocus Sets the window that will handle sound playback for the current media file. GetWindowFocus Retrieves the window that is handling sound playback for the current media file.
This method is not currently implemented and returns E_NOTIMPL.
Syntax
HRESULT GetDirectSoundInterface( LPDIRECTSOUND *lplpds );
Parameters
- lplpds
- Address of a pointer to an IDirectSound interface that will point to the current sound device's interface.
Return Value
Returns E_NOTIMPL.
When implemented, this method should return one of the following values.
E_FAIL No sound device is available. E_INVALIDARG The lplpds parameter is null. E_NOTIMPL DirectSound isn't installed. NOERROR The method succeeded.
This method is not currently implemented and returns E_NOTIMPL.
Syntax
HRESULT GetDirectSoundInterface( LPDIRECTSOUNDBUFFER *lplpdsb );
Parameters
- lplpdsb
- Address of a pointer to an IDirectSoundBuffer interface that will point to the current sound device's primary sound buffer.
Return Value
Returns E_NOTIMPL.
When implemented, this method should return one of the following values.
E_FAIL No sound device is available. E_INVALIDARG The lplpdsb parameter is null. E_NOTIMPL DirectSound isn't installed. NOERROR The method succeeded.
This method is not currently implemented and returns E_NOTIMPL.
Syntax
HRESULT GetSecondaryBufferInterface( LPDIRECTSOUNDBUFFER *lplpdsb );
Parameters
- lplpdsb
- Address of a pointer to an IDirectSoundBuffer interface. On exit, it will point to the current sound device's secondary sound buffer.
Return Value
Returns E_NOTIMPL.
When implemented, this method should return one of the following values.
E_FAIL No sound device is available. E_INVALIDARG The lplpdsb parameter is null. E_NOTIMPL DirectSound isn't installed. NOERROR The method succeeded.
Retrieves the window that is handling sound playback for the current media file.
Syntax
HRESULT GetWindowFocus( HWND hWnd, BOOL bMixingOnOrOff );
Parameters
- hWnd
- Handle to the sound playback window. If this value is null, the sound isn't associated with a window; note that Windows NT® 4.0 does not currently support windowless sound playback.
- bMixingOnOrOff
- Value indicating whether to mix the sound (TRUE) or not (FALSE).
Return Value
Returns one of the following values.
E_FAIL No sound device is available. E_INVALIDARG The hWnd argument is invalid. E_NOTIMPL DirectSound isn't installed. NOERROR The method succeeded.
This method is not currently implemented and returns E_NOTIMPL.
Syntax
HRESULT ReleaseDirectSoundInterface( LPDIRECTSOUND lpds );
Parameters
- lpds
- Pointer to the IDirectSound interface to release.
Return Value
Returns E_NOTIMPL.
When implemented, this method should return one of the following values.
E_FAIL There are no references to the specified IDirectSound interface, so it can't be released. E_INVALIDARG The lpds parameter is null. NOERROR The method succeeded.
This method is not currently implemented and returns E_NOTIMPL.
Syntax
HRESULT ReleasePrimaryBufferInterface( LPDIRECTSOUNDBUFFER lpdsb
);
Parameters
- lpdsb
- Pointer to the IDirectSoundBuffer interface to release.
Return Value
Returns E_NOTIMPL.
When implemented, this method should return one of the following values.
E_FAIL There are no references to the specified IDirectSoundBuffer interface, so it can't be released. E_INVALIDARG The lpdsb parameter is null. NOERROR The method succeeded.
This method is not currently implemented and returns E_NOTIMPL.
Syntax
HRESULT ReleaseSecondaryBufferInterface( LPDIRECTSOUNDBUFFER lpdsb );
Parameters
- lpdsb
- Pointer to the IDirectSoundBuffer interface to release.
Return Value
Returns E_NOTIMPL.
When implemented, this method should return one of the following values.
E_FAIL There are no references to the specified IDirectSoundBuffer interface, so it can't be released. E_INVALIDARG The lpdsb parameter is null. NOERROR The method succeeded.
Sets the window that will handle sound playback for the current media file.
Syntax
HRESULT SetWindowFocus( HWND hWnd, BOOL bMixingOnOrOff );
Parameters
- hWnd
- Handle to the sound playback window. If this value is null, the sound will not be associated with any window; note that Windows NT 4.0 does not currently support windowless sound playback.
- bMixingOnOrOff
- Value indicating whether to mix the sound (TRUE) or not (FALSE).
Return Value
Returns one of the following values.
E_FAIL No sound device is available. E_INVALIDARG The hWnd argument is invalid. E_NOTIMPL DirectSound isn't installed. NOERROR The method succeeded.
Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.