Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

AudioEncodingProperties.ChannelCount | channelCount property

Applies to Windows and Windows Phone

Gets or sets the number of audio channels.

Syntax

Public Property ChannelCount As UInteger

Property value

Type: Number [JavaScript] | System.UInt32 [.NET] | uint32 [C++]

The number of audio channels.

Examples

The following example shows how to get the properties for the AudioEncodingProperties class.


function getProperties() {
    var encodingProperties = new Windows.Media.MediaProperties.AudioEncodingProperties();
    var bit_rate = encodingProperties.bitrate;
    var sampleBits = encodingProperties.bitsPerSample;
    var count = encodingProperties.channelCount;
    var s_rate = encodingProperties.sampleRate;
    var audioSubType = encodingProperties.subtype;
    var audioType = encodingProperties.type;
    if (audioType === "Audio" && audioSubType === "MP3") {
        // The format is an MP3 audio stream.
    }
}


Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Media.MediaProperties
Windows::Media::MediaProperties [C++]

Metadata

Windows.winmd

See also

AudioEncodingProperties

 

 

Show:
© 2014 Microsoft