Expo Audio volume is very low

#1

I have been playing with audio for a while found out that the playback volume is very low. I am using this:

const { sound, status } = await this.recording.createNewLoadedSoundAsync(
      {
        isLooping: false,
        isMuted: false, //this.state.muted,
        volume: 1.0, //this.state.volume,
        rate: 1.0, //this.state.rate,
        shouldCorrectPitch: false, //this.state.shouldCorrectPitch,
      },
      this._updateScreenForSoundStatus
    );

I also played with different formats. There is a bug (?) too that Android is not recording in the specified format. It’s not even working correctly on this project: https://github.com/expo/audio-recording-example . Let’s not forget about the bug that the playback doesn’t stop playing and _updateScreenForSoundStatus keeps getting called forever.

Note that I am not sure if this about Android only or something, since the iOS simulator seems to work fine but again it’s the Mac doing all the recording/playback work.

This feature makes or breaks my app and I will soon go to production. Please help.

Edit: the linked app works when I open it on my phone, however the same code doesn’t work (volume still too low).

#3

Ok found it. It was the playThroughEarpieceAndroid prop. It’s a bit confusing, I thought it meant to ‘allow’ playback through earpiece. Honestly how should this prop be manipulated? Is it my responsibility to check for earpiece?

closed #4

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.