Compartilhar via


MSVidWebDVD.KaraokeChannelContent Property

 
Microsoft DirectShow 9.0

MSVidWebDVD.KaraokeChannelContent Property

This topic applies to Windows XP Service Pack 1 or later.

The KaraokeChannelContent property retrieves a value that indicates the type of content in the specified karaoke channel in the specified stream.

Syntax

  VidWebDVD
  .KaraokeChannelContent(
  lStream As Long,
  lChan As Long
) As Long

Parameters

lStream

Long specifying the stream to check.

lChan

Long specifying the channel to check.

Return Values

Returns an integer value whose individual bits specify the contents of the karaoke channel. Returned values include the following.

Hexadecimal Value Description
0x0001 Guide vocal 1
0x0002 Guide vocal 2
0x0004 Guide melody 1
0x0008 Guide melody 2
0x0010 Guide melody A
0x0020 Guide melody B
0x0040 Sound effect A
0x0080 Sound effect B

Error Codes

If the property fails, Err.Number may be set to one of the following values.

Value Description
E_UNEXPECTED Unspecified error.
VFW_E_DVD_INVALIDDOMAIN You attempted to take the value in a domain that does not support this property.
E_NO_DVD_VOLUME No DVD in the machine.
E_REGION_CHANGE_FAIL The DVD has a different region than the player.
E_INVALIDARG lStream is less than 0 or lChan is greater than 7.

Remarks

This property is read-only. DVD audio channel numbering is zero-based, so channels 2, 3, and 4 are the auxiliary karaoke channels. After the method returns, perform a bitwise AND operation on the return value to determine the contents of each channel. Because a single channel might have more than one type of content recorded on it, you should test for all the possible values even after a match is found.

The following code example demonstrates how to test the content of a stream's channel against each possible value:

iContent = VidWebDVD.KaraokeChannelContent(lStream, lChan)
' VB-style hex values.
If(iContent And &H1) Then   
     ' Set a check box or another UI control to 
     '  indicate this channel has the Guide Vocal 1.
End If
If(iContent And &H2) Then
     ' Set a check box or another UI control to 
    '  indicate this channel has the Guide Vocal 2.
 End If
If(iContent And &H4) Then
    ' Set a check box or another UI control to 
    '  indicate this channel has the Guide Melody 1.
 End If
 ' Repeat for each possible value for each channel.

After the user knows the contents of each channel, he or she must be able to adjust the volume or turn the individual channels on or off as needed. Implement this functionality in your application by using the KaraokeAudioPresentationMode property.

  • **Note   **To play karaoke discs, the audio decoder on the user's system must be compatible with the DirectShow® 8 karaoke implementation.

Requirements

Reference: Add a reference to MS Video Control 1.0 Type Library and Microsoft Tuner 1.0 Type Library.

Library: Quartz.dll.

See Also