/// <summary> /// Returns the SubType-Guid of a <paramref name="waveFormat" />. If the specified <paramref name="waveFormat" /> does /// not contain a SubType-Guid, the <see cref="WaveFormat.WaveFormatTag" /> gets converted to the equal SubType-Guid /// using the <see cref="AudioSubTypes.SubTypeFromEncoding" /> method. /// </summary> /// <param name="waveFormat"><see cref="WaveFormat" /> which gets used to determine the SubType-Guid.</param> /// <returns>SubType-Guid of the specified <paramref name="waveFormat" />.</returns> public static Guid SubTypeFromWaveFormat(WaveFormat waveFormat) { if (waveFormat == null) { throw new ArgumentNullException("waveFormat"); } if (waveFormat is WaveFormatExtensible) { return(((WaveFormatExtensible)waveFormat).SubFormat); } return(AudioSubTypes.SubTypeFromEncoding(waveFormat.WaveFormatTag)); }
internal override void SetWaveFormatTagInternal(AudioEncoding waveFormatTag) { _subFormat = AudioSubTypes.SubTypeFromEncoding(waveFormatTag); }