New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Volume of audio sound is decreased permanently after audio recording #19220
Comments
Hi @aikewoody! I think I was able to reproduce this using your example. What it sounds like to me is that, prior to recording, all sound is going through the speaker, and, after recording, all audio is then going through the earpiece, which is why it sounds so soft. Per this comment on a previous issue, it looks like you need to change the audio mode so the phone is no longer setup for recording by putting this line after you stop recording:
Once I added this line, I was able to hear the recorded audio through the speaker at the expected volume. You can see a demonstration of this in the snack here: https://snack.expo.dev/@keith-kurak/ios---recording-sound-forces-future-playback-to-earpiece. Apologies for the confusion- we will update the Audio documentation to make this more clear. Let me know how it goes! |
@keith-kurak Thanks for the reply! This is exactly the issue and also the solution, fantastic! And great that you will also update the documentation 👍 |
Same issue. Does not work with expo-speech. |
|
Summary
Playing sound with the audio plugin
expo-av
works normally but after recording audio with the same plugin the volume of the iPhone is buggy within the app.Steps to reproduce:
100%
, programatically we also useawait sound.setVolumeAsync(1)
expo-av
, this all works as expectedexpo-av
This behaviour only happens on iOS
What platform(s) does this occur on?
iOS
Environment
expo-env-info 1.0.5 environment info:
System:
OS: macOS 12.6
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
Yarn: 3.2.3 - ~/.nvm/versions/node/v16.16.0/bin/yarn
npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8609683
Xcode: 14.0/14A309 - /usr/bin/xcodebuild
npmPackages:
expo: ~46.0.9 => 46.0.10
react: 18.0.0 => 18.0.0
react-native: 0.69.5 => 0.69.5
npmGlobalPackages:
eas-cli: 2.1.0
expo-cli: 6.0.5
Expo Workflow: managed
Minimal reproducible example
https://github.com/ristrettostudio/expo-example-audio
The text was updated successfully, but these errors were encountered: