Ejemplo n.º 1
0
 internal static void ValidateAudioCodec(RecorderAudioCodec codec)
 {
     if (GetSupportedAudioCodecs().Contains(codec) == false)
     {
         throw new NotSupportedException($"{codec.ToString()} is not supported.");
     }
 }
Ejemplo n.º 2
0
        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.");
        }