This topic has not yet been rated - Rate this topic

MediaEncodingProfile.Audio | audio property

Gets or sets the encoding properties for the audio stream.

Syntax


var audio = mediaEncodingProfile.audio;
mediaEncodingProfile.audio = audio;

Property value

Type: AudioEncodingProperties

The encoding properties of the audio stream. If the profile does not contain an audio stream, the value is null.

Examples

The following example creates an instance of the MediaEncodingProfile class and gets the encoding properties for the audio stream, the media container, and the video stream.


function getAudioProperties() {
    var mediaProfile = new Windows.Media.MediaProperties.MediaEncodingProfile();

    // Get the encoding properties for the audio stream.
    var audioProps = mediaProfile.audio;
    // Set the channel count.
    audioProps.channelCount = count;

    // Get the encoding properties for the media container.
    var containerProps = mediaProfile.container;
    // Set the container subtype.
    containerProps.subtype = "MP3";

    // Get the encoding properties for the video stream.
    var videoProps = mediaProfile.video;
    // Get the frame rate.
    var d_value = videoProps.frameRate.denominator;
    var n_value = videoProps.frameRate.numerator;

}


Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Namespace

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

Metadata

Windows.winmd

See also

MediaEncodingProfile

 

 

Build date: 12/4/2012

© 2013 Microsoft. All rights reserved.