Skip to content

Commit

Permalink
fix #616
Browse files Browse the repository at this point in the history
  • Loading branch information
kingslay committed Nov 6, 2023
1 parent 4032a8e commit c4897c8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Sources/KSPlayer/MEPlayer/KSMEPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ public class KSMEPlayer: NSObject {
didSet {
if playbackRate != audioOutput.playbackRate {
audioOutput.playbackRate = playbackRate
if audioOutput is AudioUnitPlayer {
var audioFilters = options.audioFilters.filter {
!$0.hasPrefix("atempo=")
}
if playbackRate != 1 {
audioFilters.append("atempo=\(playbackRate)")
}
options.audioFilters = audioFilters
}
}
}
}
Expand Down

0 comments on commit c4897c8

Please sign in to comment.