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

[Android] SDL_OpenAudioDevice with SDL 2.30.1 returns invalid audio channel layout #11424

Open
MayaPosch opened this issue Nov 7, 2024 · 1 comment
Assignees
Milestone

Comments

@MayaPosch
Copy link

I have ported my NymphCast project to Android and am finding that while audio works as expected on all other OSes, on Android devices there are major issues with multi-channel (specifically 5.1) audio streams, due to the SDL_OpenAudioDevice function returning e.g. 6 channels for 5.1 content, even though I'm playing back via the (stereo) speakers. The result of this is that the (stereo) playback device quietly drops the other channels and only plays back the left & right channels.

SDL version: 2.30.1
Tested devices: Xiaomi Redmi Note 10 Pro (Android 13), Raspberry Pi 4B (LineageOS 20: Android 13).

An additional data point is that on a third device (Motorola G6 Plus , Android 9) the same code seems to work properly (pending validation).

I did look at the changelog for the next 2.30.x release, but did not see this issue in there, nor did I find anything while searching in the tickets here or the internet. I played the same 5.1 video content back with Android's media player, and 5.1 playback worked as expected there, with proper downmixing to stereo.

Is this a known issue?

@MayaPosch
Copy link
Author

Circumvented this issue for now by always downmixing content to 2.0. Upgrade to 2.30.9 did not change the issue, and I confirmed that on the Android 9 device it returns the same number of channels for 5.1 content (6 channels), but does manage to downmix properly there by itself.

It looks like an Android 13 issue, but I cannot confirm this right now.

@icculus icculus self-assigned this Nov 12, 2024
@icculus icculus added this to the 2.32.0 milestone Nov 12, 2024
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