INNER CODE UNIT · Swift

toAVAudioSessionCategoryOptions

dlutton/flutter_tts · ios/Classes/AudioCategoryOptions.swift:12

  func toAVAudioSessionCategoryOptions() -> AVAudioSession.CategoryOptions? {
    switch self {
    case .iosAudioCategoryOptionsMixWithOthers:
      return .mixWithOthers
    case .iosAudioCategoryOptionsDuckOthers:
      return .duckOthers
    case .iosAudioCategoryOptionsInterruptSpokenAudioAndMixWithOthers:
      if #available(iOS 9.0, *) {
        return .interruptSpokenAudioAndMixWithOthers
      } else {
        return nil
      }
    case .iosAudioCategoryOptionsAllowBluetooth:
      return .allowBluetooth
    case .iosAudioCategoryOptionsAllowBluetoothA2DP:
      if #available(iOS 10.0, *) {
        return .allowBluetoothA2DP
      } else {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…