Skip to content

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

Open
@MayaPosch

Description

@MayaPosch

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?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions