Example #1
0
 /// <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));
 }
Example #2
0
 internal override void SetWaveFormatTagInternal(AudioEncoding waveFormatTag)
 {
     SubFormat = AudioSubTypes.SubTypeFromEncoding(waveFormatTag);
 }