mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-04-17 05:39:53 +00:00
Replace AUDIO_CONFIGURATION constants with MAKE_AUDIO_CONFIGURATION() macro
This commit is contained in:
@@ -178,6 +178,14 @@ int LiStartConnection(PSERVER_INFORMATION serverInfo, PSTREAM_CONFIGURATION stre
|
||||
OriginalVideoBitrate = streamConfig->bitrate;
|
||||
RemoteAddrString = strdup(serverInfo->address);
|
||||
|
||||
// Validate the audio configuration
|
||||
if (MAGIC_BYTE_FROM_AUDIO_CONFIG(StreamConfig.audioConfiguration) != 0xCA ||
|
||||
CHANNEL_COUNT_FROM_AUDIO_CONFIGURATION(StreamConfig.audioConfiguration) > AUDIO_CONFIGURATION_MAX_CHANNEL_COUNT) {
|
||||
Limelog("Invalid audio configuration specified\n");
|
||||
err = -1;
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
// FEC only works in 16 byte chunks, so we must round down
|
||||
// the given packet size to the nearest multiple of 16.
|
||||
StreamConfig.packetSize -= StreamConfig.packetSize % 16;
|
||||
|
||||
Reference in New Issue
Block a user