Skip to content

Commit

Permalink
Removed inputNode default sample rate adjustment (AudioKit#2810)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt54 authored Dec 15, 2022
1 parent 6fed9fb commit 4837b9a
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions Sources/AudioKit/Internals/Engine/AudioEngine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,6 @@ public class AudioEngine {
var isNotConnected = true

func connect(to engine: AudioEngine) {
let sampleRate = engine.avEngine.inputNode.inputFormat(forBus: 0).sampleRate

// Avoids fatal crash when setting AudioKit's output with a problematic audio configuration
// (caused by known AirPlay issue)
if sampleRate.isValidSampleRate {
Settings.audioFormat = AVAudioFormat(standardFormatWithSampleRate: sampleRate,
channels: 2) ?? AVAudioFormat()
}

engine.avEngine.attach(avAudioNode)
engine.avEngine.connect(engine.avEngine.inputNode, to: avAudioNode, format: nil)
}
Expand Down

0 comments on commit 4837b9a

Please sign in to comment.