mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 01:15:46 +00:00
Fix logic error in low bitrate audio duration selection
This commit is contained in:
parent
e938d84cdb
commit
f5ae5df5d0
@ -379,13 +379,14 @@ static PSDP_OPTION getAttributesList(char*urlSafeAddr) {
|
|||||||
|
|
||||||
if ((AudioCallbacks.capabilities & CAPABILITY_SLOW_OPUS_DECODER) != 0 ||
|
if ((AudioCallbacks.capabilities & CAPABILITY_SLOW_OPUS_DECODER) != 0 ||
|
||||||
((AudioCallbacks.capabilities & CAPABILITY_SUPPORTS_ARBITRARY_AUDIO_DURATION) != 0 &&
|
((AudioCallbacks.capabilities & CAPABILITY_SUPPORTS_ARBITRARY_AUDIO_DURATION) != 0 &&
|
||||||
OriginalVideoBitrate >= LOW_AUDIO_BITRATE_TRESHOLD)) {
|
OriginalVideoBitrate < LOW_AUDIO_BITRATE_TRESHOLD)) {
|
||||||
// Use 5 ms packets by default for lowest latency
|
// Use 20 ms packets for slow decoders and networks to save CPU and bandwidth
|
||||||
AudioPacketDuration = 5;
|
AudioPacketDuration = 20;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Use 20 ms packets for slow decoders to save CPU and bandwidth
|
|
||||||
AudioPacketDuration = 20;
|
// Use 5 ms packets by default for lowest latency
|
||||||
|
AudioPacketDuration = 5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user