internal static void ValidateAudioCodec(RecorderAudioCodec codec) { if (GetSupportedAudioCodecs().Contains(codec) == false) { throw new NotSupportedException($"{codec.ToString()} is not supported."); } }
internal static StreamRecorderAudioCodec ToStreamRecorderEnum(this RecorderAudioCodec value) { switch (value) { case RecorderAudioCodec.Aac: return(StreamRecorderAudioCodec.Aac); case RecorderAudioCodec.Amr: return(StreamRecorderAudioCodec.Amr); case RecorderAudioCodec.Pcm: return(StreamRecorderAudioCodec.Pcm); } throw new NotSupportedException($"{value.ToString()} is not supported."); }