Start plumbing 7.1 surround sound support

This commit is contained in:
Cameron Gutman 2021-07-24 08:14:03 -05:00
parent 01d43ff596
commit 1cb4699057
5 changed files with 12 additions and 9 deletions

View File

@ -121,9 +121,9 @@ Stop GFE from changing the graphical settings of the requested game or applicati
Play the audio on the host computer instead of this device.
=item B<-surround>
=item B<-surround> [I<5.1/7.1>]
Enable 5.1 surround sound instead of stereo.
Enable surround sound instead of stereo.
=item B<-keydir> [I<DIRECTORY>]

View File

@ -67,8 +67,8 @@
## Enable QOS settings to optimize for internet instead of local network
#remote = false
## Enable 5.1 surround sound
#surround = false
## Enable 5.1/7.1 surround sound
#surround = 5.1
## Load additional configuration files
#config = /path/to/config

View File

@ -21,7 +21,7 @@
#include <Limelight.h>
#define MAX_CHANNEL_COUNT 6
#define MAX_CHANNEL_COUNT 8
#define FRAME_SIZE 240
#define FRAME_BUFFER 12

View File

@ -61,7 +61,7 @@ static struct option long_options[] = {
{"keydir", required_argument, NULL, 'r'},
{"remote", no_argument, NULL, 's'},
{"windowed", no_argument, NULL, 't'},
{"surround", no_argument, NULL, 'u'},
{"surround", required_argument, NULL, 'u'},
{"fps", required_argument, NULL, 'v'},
{"codec", required_argument, NULL, 'x'},
{"nounsupported", no_argument, NULL, 'y'},
@ -199,7 +199,10 @@ static void parse_argument(int c, char* value, PCONFIGURATION config) {
config->fullscreen = false;
break;
case 'u':
if (strcasecmp(value, "5.1") == 0)
config->stream.audioConfiguration = AUDIO_CONFIGURATION_51_SURROUND;
else if (strcasecmp(value, "7.1") == 0)
config->stream.audioConfiguration = AUDIO_CONFIGURATION_71_SURROUND;
break;
case 'v':
config->stream.fps = atoi(value);
@ -352,7 +355,7 @@ void config_parse(int argc, char* argv[], PCONFIGURATION config) {
} else {
int option_index = 0;
int c;
while ((c = getopt_long_only(argc, argv, "-abc:d:efg:h:i:j:k:lm:no:p:q:r:stuv:w:xy", long_options, &option_index)) != -1) {
while ((c = getopt_long_only(argc, argv, "-abc:d:efg:h:i:j:k:lm:no:p:q:r:stu:v:w:xy", long_options, &option_index)) != -1) {
parse_argument(c, optarg, config);
}
}

View File

@ -202,7 +202,7 @@ static void help() {
printf("\t-app <app>\t\tName of app to stream\n");
printf("\t-nosops\t\t\tDon't allow GFE to modify game settings\n");
printf("\t-localaudio\t\tPlay audio locally on the host computer\n");
printf("\t-surround\t\tStream 5.1 surround sound (requires GFE 2.7)\n");
printf("\t-surround <5.1/7.1>\t\tStream 5.1 or 7.1 surround sound\n");
printf("\t-keydir <directory>\tLoad encryption keys from directory\n");
printf("\t-mapping <file>\t\tUse <file> as gamepad mappings configuration file\n");
printf("\t-platform <system>\tSpecify system used for audio, video and input: pi/imx/aml/rk/x11/x11_vdpau/sdl/fake (default auto)\n");