// ignore_for_file: non_constant_identifier_names, camel_case_types, missing_return, unused_import, unused_local_variable, dead_code, unnecessary_cast
//////////////////////////////////////////////////////////
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
//////////////////////////////////////////////////////////

enum TXAudioSampleRate {
  AUDIO_SAMPLERATE_8000 /* 0 */,
  AUDIO_SAMPLERATE_16000 /* null */,
  AUDIO_SAMPLERATE_32000 /* null */,
  AUDIO_SAMPLERATE_44100 /* null */,
  AUDIO_SAMPLERATE_48000 /* null */
}

extension TXAudioSampleRateToX on TXAudioSampleRate {
  int toValue() {
    switch (this) {
      case TXAudioSampleRate.AUDIO_SAMPLERATE_8000: return 0;
      case TXAudioSampleRate.AUDIO_SAMPLERATE_16000: return TXAudioSampleRate.AUDIO_SAMPLERATE_16000.index + 0;
      case TXAudioSampleRate.AUDIO_SAMPLERATE_32000: return TXAudioSampleRate.AUDIO_SAMPLERATE_32000.index + 0;
      case TXAudioSampleRate.AUDIO_SAMPLERATE_44100: return TXAudioSampleRate.AUDIO_SAMPLERATE_44100.index + 0;
      case TXAudioSampleRate.AUDIO_SAMPLERATE_48000: return TXAudioSampleRate.AUDIO_SAMPLERATE_48000.index + 0;
      default: return 0;
    }
  }
}

extension TXAudioSampleRateFromX on int {
  TXAudioSampleRate toTXAudioSampleRate() {
    switch (this) {
      case 0: return TXAudioSampleRate.AUDIO_SAMPLERATE_8000;
      default: return TXAudioSampleRate.values[this + 0];
    }
  }
}