Skip to content

AudioTrack repeatedly stops/resumes when returning from menu (regression since 1.20.0 on Android) #17892

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

Open
1 of 2 tasks
sadegh0007 opened this issue May 12, 2025 · 1 comment

Comments

@sadegh0007
Copy link

Is there an existing issue for this?

  • This is a bug in RetroArch frontend
  • I have searched the existing issues

Description

On Android builds of RetroArch 1.20.0 and 1.21.0, when opening the Quick Menu during gameplay and then resuming the core, the AudioTrack system goes into a loop of repeated stop/start behavior. This did not happen in version 1.19.x or 1.9.12, so it appears to be a regression.

Expected behavior

Audio should pause once when entering the menu, and resume once when returning to the game, with minimal AudioTrack activity.

Actual Behavior:
Hundreds of repeated log entries occur after resuming gameplay:

D PlayerBase::stop() from IPlayer

D stop() called with XXXX frames delivered
I` Skip ramp
`
This continues rapidly and may negatively impact performance.

Steps to reproduce the bug

Steps to Reproduce:
Launch any core (tested with Genesis Plus GX, Snes9x).

Start any game with audio enabled.

Open the RetroArch Quick Menu.

Return to gameplay (Resume).

Observe the log output.

Version/Commit

1.21.0

Bisect Results

No response

Present in the nightly version

I don't know

Platform & operating system

android

Affected Cores

No response

Environment information

Tested On:
Device: Samsung Galaxy Note 8

Android Version: 9

RetroArch versions:

✅ 1.19.0 → OK (only 1 stop/resume logged)

✅ 1.9.12 → OK

❌ 1.20.0 → Affected

❌ 1.21.0 → Affected

Audio driver: aaudio and opensl (tested both)

Disabling menu sounds via Settings → Audio → Menu Sounds resolves the issue: the repeated log spam stops entirely.

Using opensl or aaudio doesn't make a difference — the bug still occurs.

Appears to be related to audio resume handling in the Android audio subsystem.

Could be a side-effect of recent changes in menu pause/audio behavior.

Relevant log output

2025-05-12 12:51:23.304 AudioTrack  D  stop() called with 3264 frames delivered  
2025-05-12 12:51:23.304 AudioTrack  I  Skip ramp  
2025-05-12 12:51:23.320 PlayerBase  D  PlayerBase::stop() from IPlayer  
... (repeats for 50+ entries) ...
@sonninnos
Copy link
Collaborator

I can't reproduce on my phone. Audio stops when menu pauses regardless of menu sounds, and no mention of AudioTrack in the log.

Android version is 12 and RA version is from May 6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants