IAMDirectSound Interface

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 methodsDescription
QueryInterface Returns pointers to supported interfaces.
AddRef Increments the reference count.
Release Decrements the reference count.
IAMDirectSound methodsDescription
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.

IAMDirectSound::GetDirectSoundInterface

IAMDirectSound Interface

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_FAILNo sound device is available.
E_INVALIDARG The lplpds parameter is null.
E_NOTIMPL DirectSound isn't installed.
NOERROR The method succeeded.

IAMDirectSound::GetPrimaryBufferInterface

IAMDirectSound Interface

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_FAILNo sound device is available.
E_INVALIDARG The lplpdsb parameter is null.
E_NOTIMPL DirectSound isn't installed.
NOERROR The method succeeded.

IAMDirectSound::GetSecondaryBufferInterface

IAMDirectSound Interface

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_FAILNo sound device is available.
E_INVALIDARG The lplpdsb parameter is null.
E_NOTIMPL DirectSound isn't installed.
NOERROR The method succeeded.

IAMDirectSound::GetWindowFocus

IAMDirectSound Interface

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_FAILNo sound device is available.
E_INVALIDARG The hWnd argument is invalid.
E_NOTIMPL DirectSound isn't installed.
NOERROR The method succeeded.

IAMDirectSound::ReleaseDirectSoundInterface

IAMDirectSound Interface

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_FAILThere 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.

IAMDirectSound::ReleasePrimaryBufferInterface

IAMDirectSound Interface

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_FAILThere 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.

IAMDirectSound::ReleaseSecondaryBufferInterface

IAMDirectSound Interface

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_FAILThere 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.

IAMDirectSound::SetWindowFocus

IAMDirectSound Interface

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_FAILNo sound device is available.
E_INVALIDARG The hWnd argument is invalid.
E_NOTIMPL DirectSound isn't installed.
NOERROR The method succeeded.


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.