From cc132464fa34a5d0cff8cfb0c423416f6099b2e1 Mon Sep 17 00:00:00 2001 From: Shinmegumi Date: Wed, 27 Aug 2025 12:03:58 +0200 Subject: [PATCH] [audio] Change cubeb to use Native-endian instead of little-endian Basically, this gives it the opportunity to change the byte order based on what it is getting instead of forcing it to go with the least first. This allows it to adapt to what the machine needs. Needs testing, but may or may not help Windows since it typically defaults to cubeb. --- src/audio_core/sink/cubeb_sink.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/audio_core/sink/cubeb_sink.cpp b/src/audio_core/sink/cubeb_sink.cpp index 87ad6dfb75..d860f9d639 100644 --- a/src/audio_core/sink/cubeb_sink.cpp +++ b/src/audio_core/sink/cubeb_sink.cpp @@ -52,7 +52,7 @@ public: cubeb_stream_params params{}; params.rate = TargetSampleRate; params.channels = device_channels; - params.format = CUBEB_SAMPLE_S16LE; + params.format = CUBEB_SAMPLE_S16NE; params.prefs = CUBEB_STREAM_PREF_NONE; switch (params.channels) { case 1: @@ -62,7 +62,7 @@ public: params.layout = CUBEB_LAYOUT_STEREO; break; case 6: - params.layout = CUBEB_LAYOUT_STEREO; + params.layout = CUBEB_LAYOUT_3F2_LFE; break; } @@ -362,7 +362,7 @@ u32 GetCubebLatency() { cubeb_stream_params params{}; params.rate = TargetSampleRate; params.channels = 2; - params.format = CUBEB_SAMPLE_S16LE; + params.format = CUBEB_SAMPLE_S16NE; params.prefs = CUBEB_STREAM_PREF_NONE; params.layout = CUBEB_LAYOUT_STEREO;