mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-10-27 22:39:57 +00:00
Add a workaround to get low bandwidth stereo working again and a cap flag to never request HQ audio
This commit is contained in:
1 parent
d6971983aa
commit
c87d4a755e
4 files changed
+23
-4
No files matched your search
+2
-3
@@ -11,8 +11,6 @@
|
||||
#define CHANNEL_MASK_STEREO 0x3
|
||||
#define CHANNEL_MASK_51_SURROUND 0xFC
|
||||
|
||||
#define HIGH_BITRATE_THRESHOLD 15000
|
||||
|
||||
typedef struct _SDP_OPTION {
|
||||
char name[MAX_OPTION_NAME_LEN + 1];
|
||||
void* payload;
|
||||
@@ -362,7 +360,8 @@ static PSDP_OPTION getAttributesList(char*urlSafeAddr) {
|
||||
|
||||
if (AppVersionQuad[0] >= 7) {
|
||||
// Decide to use HQ audio based on the original video bitrate, not the HEVC-adjusted value
|
||||
if (OriginalVideoBitrate >= HIGH_BITRATE_THRESHOLD && audioChannelCount > 2) {
|
||||
if (OriginalVideoBitrate >= HIGH_AUDIO_BITRATE_THRESHOLD && audioChannelCount > 2 &&
|
||||
(AudioCallbacks.capabilities & CAPABILITY_SLOW_OPUS_DECODER) == 0) {
|
||||
// Enable high quality mode for surround sound
|
||||
err |= addAttributeString(&optionHead, "x-nv-audio.surround.AudioQuality", "1");
|
||||
|
||||
|
||||
Reference in new issue
Block a user