From 264ecc841102738ad87bcf8839e1e0428b548e20 Mon Sep 17 00:00:00 2001 From: David Chavez Date: Thu, 21 Sep 2023 16:13:40 +0200 Subject: [PATCH] chore(ios): remove deprecated lowQualityZeroLatency (#2130) --- docs/docs/v4-migration.md | 3 +++ ios/RNTrackPlayer/Models/Track.swift | 6 ++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/docs/v4-migration.md b/docs/docs/v4-migration.md index 399e74098..28e49743a 100644 --- a/docs/docs/v4-migration.md +++ b/docs/docs/v4-migration.md @@ -57,6 +57,9 @@ instead of `null` 1. `clearMetadata()` - Instead use [`reset()`](./api/functions/player.md#reset) - which stops playback, clears the queue and clears the notification. +### General Changes +1. on iOS pitch algorithm defaults to `timeDomain` instead of `lowQualityZeroLatency`. It has been deprecated by Apple and has a few bugs on iOS 17. + ### Typescript Imports 1. If you were using deep imports from RNTP, the `src` has been completely diff --git a/ios/RNTrackPlayer/Models/Track.swift b/ios/RNTrackPlayer/Models/Track.swift index ea5a302c0..0c4cc610a 100644 --- a/ios/RNTrackPlayer/Models/Track.swift +++ b/ios/RNTrackPlayer/Models/Track.swift @@ -113,14 +113,12 @@ class Track: AudioItem, TimePitching, AssetOptionsProviding { return .varispeed case PitchAlgorithm.music.rawValue: return .spectral - case PitchAlgorithm.voice.rawValue: + default: // voice return .timeDomain - default: - return .lowQualityZeroLatency } } - return .lowQualityZeroLatency + return .timeDomain } // MARK: - Authorizing Protocol