mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 09:25:49 +00:00
Undeprecate AUDIO_CONFIGURATION values and add a new macro for converting AUDIO_CONFIGURATION into launch/resume parameters
This commit is contained in:
parent
607aaca93f
commit
99f22fa7e9
@ -52,7 +52,7 @@ typedef struct _STREAM_CONFIGURATION {
|
||||
int streamingRemotely;
|
||||
|
||||
// Specifies the channel configuration of the audio stream.
|
||||
// See MAKE_AUDIO_CONFIGURATION() below.
|
||||
// See AUDIO_CONFIGURATION constants and MAKE_AUDIO_CONFIGURATION() below.
|
||||
int audioConfiguration;
|
||||
|
||||
// Specifies that the client can accept an H.265 video stream
|
||||
@ -153,14 +153,13 @@ typedef struct _DECODE_UNIT {
|
||||
} DECODE_UNIT, *PDECODE_UNIT;
|
||||
|
||||
// Specifies that the audio stream should be encoded in stereo (default)
|
||||
// Deprecated: use MAKE_AUDIO_CONFIGURATION() instead!
|
||||
#define AUDIO_CONFIGURATION_STEREO MAKE_AUDIO_CONFIGURATION(2, 0x3)
|
||||
|
||||
// Specifies that the audio stream should be in 5.1 surround sound if the PC is able
|
||||
// Deprecated: use MAKE_AUDIO_CONFIGURATION() instead!
|
||||
#define AUDIO_CONFIGURATION_51_SURROUND MAKE_AUDIO_CONFIGURATION(6, 0xFC)
|
||||
|
||||
// Specifies an audio configuration by channel count and channel mask
|
||||
// NOTE: Not all combinations are supported by GFE and/or this library.
|
||||
#define MAKE_AUDIO_CONFIGURATION(channelCount, channelMask) \
|
||||
(((channelMask) << 16) | (channelCount << 8) | 0xCA)
|
||||
|
||||
@ -168,6 +167,11 @@ typedef struct _DECODE_UNIT {
|
||||
#define CHANNEL_COUNT_FROM_AUDIO_CONFIGURATION(x) (((x) >> 8) & 0xFF)
|
||||
#define CHANNEL_MASK_FROM_AUDIO_CONFIGURATION(x) (((x) >> 16) & 0xFF)
|
||||
|
||||
// Helper macro to retreive the surroundAudioInfo parameter value that must be passed in
|
||||
// the /launch and /resume HTTPS requests when starting the session.
|
||||
#define SURROUNDAUDIOINFO_FROM_AUDIO_CONFIGURATION(x) \
|
||||
(CHANNEL_MASK_FROM_AUDIO_CONFIGURATION(x) << 16 | CHANNEL_COUNT_FROM_AUDIO_CONFIGURATION(x))
|
||||
|
||||
// The maximum number of channels supported
|
||||
#define AUDIO_CONFIGURATION_MAX_CHANNEL_COUNT 6
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user