コード例 #1
0
 private void CheckDecoderFormat()
 {
     if (audioDecoder.Format != OutputFormat)
     {
         if (audioDecoder.SupportsFormat(OutputFormat))
         {
             audioDecoder.Format = OutputFormat;
         }
         else
         {
             throw new NotSupportedException($"The provided audio decoder does not support the given output. Decoder: {audioDecoder.Format.Name}. Expected: {OutputFormat.Name}");
         }
     }
 }