From 2dcf7433ea9e08100707288ca5f57e2f2fd69140 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Tue, 28 Jul 2026 15:28:19 +0200 Subject: [PATCH] Pass the right channel volume to setVolume on iOS Calling setVolume() on a Sound threw on iOS: RNSound.setVolume was called with 2 arguments but expects 3 arguments. The native method takes a volume per channel. RNSound.mm declares RCT_EXPORT_METHOD(setVolume:(double)key left:(double)left right:(double)right) and both TurboModule specs agree: setVolume: (key: number, left: number, right: number) => void; but the iOS branch of setVolume() passed only the key and a single volume, so the call failed. Pass the value for both channels, which is what setAndroidVolumes() already does when there is no pan. TypeScript does not catch this because SoundModule is produced by an untyped require(), so RNSound is any and none of the call sites are checked against the Spec interfaces. --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 3b50e009..9449c624 100644 --- a/src/index.ts +++ b/src/index.ts @@ -242,7 +242,7 @@ class Sound { if (IsAndroid) { this.setAndroidVolumes(); } else { - RNSound.setVolume(this._key, value); + RNSound.setVolume(this._key, value, value); } } return this;