using System.Text; namespace UMP { public class MediaTrackInfoAudio : MediaTrackInfoExpanded { private readonly int _trackChannels; private readonly int _trackRate; /// /// Create a new audio track info. /// /// Track ID /// Track Codec (fourcc) /// Track Profile /// Track Level /// Track Channels Number /// Track Rate internal MediaTrackInfoAudio(int trackId, int trackCodec, int trackProfile, int trackLevel, int trackChannels, int trackRate) : base(trackId, trackCodec, trackProfile, trackLevel) { _trackChannels = trackChannels; _trackRate = trackRate; } /// /// Get the number of channels. /// public int Channels { get { return _trackChannels; } } /// /// Get the rate. /// public int Rate { get { return _trackRate; } } public override string ToString() { StringBuilder sb = new StringBuilder(200); sb.Append(base.ToString()).Append('['); sb.Append("CHANNELS=").Append(_trackChannels).Append(", "); sb.Append("RATE=").Append(_trackRate).Append(']'); return sb.ToString(); } } }