Exemple #1
0
        public override bool Equals(object obj)
        {
            AudioContainer container = obj as AudioContainer;

            if (this.ContainerType.Equals(container.ContainerType))
            {
                return(true);
            }

            return(false);
        }
Exemple #2
0
        /// <summary>
        /// Initializes a new instance of the AudioFormat class.
        /// </summary>
        /// <param name="encoding">Audio encoding</param>
        /// <param name="channelsNumber">Channels number</param>
        /// <param name="sampleRate">Sample rate</param>
        /// <param name="bitsPerSample">Bits per sample</param>
        /// <param name="audioContainer">Type of audio container, either RAW or WAV</param>
        public AudioFormat(AudioEncoding encoding, int channelsNumber, int sampleRate, int bitsPerSample, AudioContainer audioContainer)
        {
            this.ValidateAudioFormat(channelsNumber, sampleRate, bitsPerSample);

            this.Encoding       = encoding;
            this.ChannelsNumber = channelsNumber;
            this.SampleRate     = sampleRate;
            this.BitsPerSample  = bitsPerSample;
            this.Container      = audioContainer;
        }