libretro / libretro/RetroArch

Audio stutter when device sleeps on Android

Open
#18,820 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
14.1k
Forks
2.2k
Avg merge
7h 35m
Merged PRs (30d)
51

Description

Is there an existing issue for this?
  • This is a bug in RetroArch frontend
  • I have searched the existing issues
Description

On the Android version of RetroArch, when I press the device power button to put my device to sleep while a game is running, the audio briefly stutters instead of stopping immediately when the screen turns off.

I'm using the VBA-M core with the OpenSL audio driver- I haven’t tested other cores yet.

Expected behavior

Audio should stop cleanly as soon as the screen turns off.

Steps to reproduce the bug
  1. Launch RetroArch on Android.
  2. Start a game with audio (I am using the VBA-M core with the OpenSL audio driver)
  3. Press the device power button to put the phone to sleep.
Version/Commit

1.22.2

Bisect Results

No response

Present in the nightly version

I don't know

Platform & operating system

Android 11

Affected Cores

VBA-M 60b48a3

Environment information

Device: AYANEO Pocket AIR Mini

Relevant log output

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue on Android 11 with the VBA-M core and OpenSL audio driver while monitoring the transition into device sleep. Trace the Android sleep handling and OpenSL audio path to determine why audio continues briefly. Done means audio stops cleanly when the screen turns off and the behavior is verified with the reported setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, c
Domain
audio-video-rtc, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.