Microsoft DirectX 9.0 |
The GetKaraokeChannelContent method retrieves a value that indicates the type of content in the specified karaoke channel in the specified stream.
Syntax
[ iContent = ] MSWebDVD.GetKaraokeChannelContent(iStream, iChannel);
Parameters
iStream
Specifies the audio stream as an Integer.
iChannel
Specifies the channel as an Integer.
The possible values for each channel are:
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 |
Return Values
Returns an integer value whose individual bits specify the contents of the karaoke channel.
Remarks
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 iContent 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 iContents against each possible value.
if(iContent & 0x0001)
{
// Set a check box or another UI control to
// indicate this channel has the Guide Vocal 1.
}
if(iContent & 0x0002)
{
// Set a check box or another UI control to
// indicate this channel has the Guide Vocal 2.
}
if(iContent & 0x0004)
{
// Set a check box or another UI control to
// indicate this channel has the Guide Melody 1.
}
// 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.