mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 01:15:46 +00:00
Fix streaming from Gen 3 servers
This commit is contained in:
parent
801aaf43d6
commit
6245934462
@ -271,6 +271,15 @@ static PSDP_OPTION getAttributesList(char*urlSafeAddr) {
|
||||
err |= addGen5Options(&optionHead);
|
||||
}
|
||||
|
||||
if (StreamConfig.audioConfiguration == AUDIO_CONFIGURATION_51_SURROUND) {
|
||||
audioChannelCount = CHANNEL_COUNT_51_SURROUND;
|
||||
audioChannelMask = CHANNEL_MASK_51_SURROUND;
|
||||
}
|
||||
else {
|
||||
audioChannelCount = CHANNEL_COUNT_STEREO;
|
||||
audioChannelMask = CHANNEL_MASK_STEREO;
|
||||
}
|
||||
|
||||
if (AppVersionQuad[0] >= 4) {
|
||||
unsigned char slicesPerFrame;
|
||||
|
||||
@ -338,15 +347,6 @@ static PSDP_OPTION getAttributesList(char*urlSafeAddr) {
|
||||
err |= addAttributeString(&optionHead, "x-nv-video[0].clientRefreshRateX100", payloadStr);
|
||||
}
|
||||
|
||||
if (StreamConfig.audioConfiguration == AUDIO_CONFIGURATION_51_SURROUND) {
|
||||
audioChannelCount = CHANNEL_COUNT_51_SURROUND;
|
||||
audioChannelMask = CHANNEL_MASK_51_SURROUND;
|
||||
}
|
||||
else {
|
||||
audioChannelCount = CHANNEL_COUNT_STEREO;
|
||||
audioChannelMask = CHANNEL_MASK_STEREO;
|
||||
}
|
||||
|
||||
sprintf(payloadStr, "%d", audioChannelCount);
|
||||
err |= addAttributeString(&optionHead, "x-nv-audio.surround.numChannels", payloadStr);
|
||||
sprintf(payloadStr, "%d", audioChannelMask);
|
||||
@ -357,6 +357,7 @@ static PSDP_OPTION getAttributesList(char*urlSafeAddr) {
|
||||
else {
|
||||
err |= addAttributeString(&optionHead, "x-nv-audio.surround.enable", "0");
|
||||
}
|
||||
}
|
||||
|
||||
if (AppVersionQuad[0] >= 7) {
|
||||
// Decide to use HQ audio based on the original video bitrate, not the HEVC-adjusted value
|
||||
@ -393,7 +394,6 @@ static PSDP_OPTION getAttributesList(char*urlSafeAddr) {
|
||||
// 5 ms duration for legacy servers
|
||||
AudioPacketDuration = 5;
|
||||
}
|
||||
}
|
||||
|
||||
if (err == 0) {
|
||||
return optionHead;
|
||||
|
Loading…
x
Reference in New Issue
Block a user