示例#1
0
        /// <summary>
        /// Determines if the audio specs are compatible between them.
        /// They must share format, channel count, layout and sample rate
        /// </summary>
        /// <param name="a">a.</param>
        /// <param name="b">The b.</param>
        /// <returns>True if the params are compatible, flase otherwise.</returns>
        internal static bool AreCompatible(AudioParams a, AudioParams b)
        {
            if (a.Format != b.Format)
            {
                return(false);
            }
            if (a.ChannelCount != b.ChannelCount)
            {
                return(false);
            }
            if (a.ChannelLayout != b.ChannelLayout)
            {
                return(false);
            }
            if (a.SampleRate != b.SampleRate)
            {
                return(false);
            }

            return(true);
        }