Skip to content

Commit 6c1e877

Browse files
committed
chore: add comment about pitch correction on android
1 parent 005d9cd commit 6c1e877

File tree

1 file changed

+5
-0
lines changed
  • package/expo-package/src/optionalDependencies

1 file changed

+5
-0
lines changed

package/expo-package/src/optionalDependencies/Sound.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@ class ExpoAudioSoundAdapter {
123123
shouldCorrectPitch = this.initialShouldCorrectPitch,
124124
pitchCorrectionQuality = this.initialPitchCorrectionQuality,
125125
) => {
126+
// On Android, pitch correction sets the playback speed to 1f every time
127+
// as seen here: https://github.com/expo/expo/blob/f9d82c5af6d472c257b14c2657938db1be4a1b2c/packages/expo-audio/android/src/main/java/expo/modules/audio/AudioModule.kt#L409
128+
// Pitch correction is set to true whenever the pitchCorrectionQuality parameter is set,
129+
// so there isn't much we can do about it for now.
130+
// This is wrong and will likely be fixed within the library.
126131
if (shouldCorrectPitch && pitchCorrectionQuality) {
127132
this.player.setPlaybackRate(rate, pitchCorrectionQuality);
128133
return;

0 commit comments

Comments
 (0)