IDvdControl2::SelectAudioStream

 
Microsoft DirectShow 9.0

IDvdControl2::SelectAudioStream

The SelectAudioStream method selects the audio stream to play.

Syntax

  HRESULT SelectAudioStream(
  ULONG ulAudio,
  DWORD dwFlags,
  IDvdCmd **ppCmd
);

Parameters

ulAudio

[in] Value that specifies the audio stream. Valid stream numbers are 0 through 7, or DVD_DEFAULT_AUDIO_STREAM to specify the default stream.

dwFlags

[in] Bitwise OR of one or more flags from the DVD_CMD_FLAGS enumeration, specifying how to synchronize the command. This parameter is currently ignored; use DVD_CMD_FLAG_None.

ppCmd

[out] Receives a pointer to an IDvdCmd object that can be used to synchronize DVD commands. The caller must release the interface. This parameter can be NULL. For more information, see Synchronizing DVD Commands.

Return Values

Returns one of the following values.

Return code Description
S_FALSE No default audio stream was found; or dwFlags is not zero.
S_OK Success.
E_INVALIDARG ulAudio is out of range, or doesn't correspond to an audio stream.
E_UNEXPECTED The ulAudio value is valid, but the DVD Navigator could not set it for some reason.
VFW_E_DVD_OPERATION_INHIBITED UOP control prohibits the operation.
VFW_E_DVD_STREAM_DISABLED The specified stream is disabled.

Remarks

This method affects the audio of the current Video Title Set (VTS). When called from within a menu, this method sets the audio stream of the title from which the menu was called.

The following table shows the Annex J command name to which this method name corresponds, and the domains in which this method is valid.

Annex J Command Name Valid Domains
Audio_Stream_Change DVD_DOMAIN_VideoManagerMenu
DVD_DOMAIN_VideoTitleSetMenu
DVD_DOMAIN_Title
DVD_DOMAIN_Stop

Requirements

Header: Declared in Strmif.h; include Dshow.h.

Library: Use Strmiids.lib.

See Also