Skip to content
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

iOS: Changing volume while audio is playing breaks/pauses audio #1108

Open
IbrahimYildirim opened this issue Oct 27, 2023 · 3 comments
Open
Assignees
Labels
1 backlog bug Something isn't working

Comments

@IbrahimYildirim
Copy link

Which API doesn't behave as documented, and how does it misbehave?
iOS When calling setVolume() with value from a Slider the playing audio pauses/breaks and continues only after the slider thumb has been released

Minimal reproduction project
https://github.com/IbrahimYildirim/JustAudioVolumeChangeError

To Reproduce (i.e. user steps, not code)
Steps to reproduce the behavior (in the MRP):

  1. Allow Microphone Permission
  2. Make a 3-4 second recording
  3. Click Play
  4. Adjust volume while audio is playing (note a 3 sec silent audio has been added to make space between recording)

Error messages
No error messages

Expected behavior
Volume change happening without audio disturbance

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. MacOS + version]
  • Browser [e.g. chrome, safari + version]

Smartphone (please complete the following information):

  • Device: iPhone 12 Pro
  • OS: 16.6.1

Flutter SDK version

[✓] Flutter (Channel stable, 3.13.8, on macOS 13.2 22D49 darwin-arm64, locale en-DK)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[✓] VS Code (version 1.75.1)
[✓] Connected device (3 available)
[✓] Network resources

Additional context
This started to happen recently on my affirmation app where users record affirmations with their own voice and have it played in loop with a short break in between. This used to be smooth but now it's lagging when changing volume

@IbrahimYildirim
Copy link
Author

IbrahimYildirim commented Oct 27, 2023

After deeper digging I realise this issue only happens when the same audio file from assets is used multiple times in the playlist.
When removing the assets audio in between it works smooth.

@richanshah
Copy link

@IbrahimYildirim could you please explain more? what changes required at code level?

@IbrahimYildirim
Copy link
Author

@richanshah by commenting out line 16 on SimpleAffirmationPlayer on my example.

Basically this issue only persist of there is a lot of the same audio file from in the same playlist. So when removing the silent audio from my assets folder that I am using as break in between the tracks, it works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 backlog bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants