Add missing change for reducing low speed distortion on iOS

This commit is contained in:
Ryan Heise 2020-04-29 14:58:27 +10:00
parent 146cc9cd52
commit a5f422942b
1 changed files with 6 additions and 0 deletions

View File

@ -181,6 +181,12 @@
playerItem = [[AVPlayerItem alloc] initWithURL:[NSURL URLWithString:url]];
}
if (@available(macOS 10.13, iOS 11.0, *)) {
// This does the best at reducing distortion on voice
// with speeds below 1.0
playerItem.audioTimePitchAlgorithm = AVAudioTimePitchAlgorithmTimeDomain;
}
[playerItem addObserver:self
forKeyPath:@"status"
options:NSKeyValueObservingOptionNew