Skip to main content
AudioEncodingProperties.ChannelCount | channelCount property

Applies to Windows and Windows Phone

Gets or sets the number of audio channels.

Syntax


var channelCount = audioEncodingProperties.channelCount;
audioEncodingProperties.channelCount = channelCount;

public uint ChannelCount { get; set; }

Public Property ChannelCount As UInteger

public:
property unsigned int ChannelCount { 
   unsigned int get();
   void set (unsigned int value);
}

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