Skip to content

Commit

Permalink
fix #79
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentneo committed Jun 11, 2023
1 parent 802f027 commit 6642445
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Quality/OutputDevices.swift
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,16 @@ class OutputDevices: ObservableObject {
print("NEAREST FORMAT \(nearestFormat)")

if let suitableFormat = nearestFormat.first {
//if suitableFormat.mSampleRate != previousSampleRate {
if enableBitDepthDetection {
self.setFormats(device: defaultDevice, format: suitableFormat)
self.updateSampleRate(suitableFormat.mSampleRate)
if let currentTrack = currentTrack {
self.trackAndSample[currentTrack] = suitableFormat.mSampleRate
}
//}
}
else if suitableFormat.mSampleRate != previousSampleRate { // bit depth disabled
defaultDevice?.setNominalSampleRate(suitableFormat.mSampleRate)
}
self.updateSampleRate(suitableFormat.mSampleRate)
if let currentTrack = currentTrack {
self.trackAndSample[currentTrack] = suitableFormat.mSampleRate
}
}

// if let nearest = nearest {
Expand Down

0 comments on commit 6642445

Please sign in to comment.