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. 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>] =item B<-keydir> [I<DIRECTORY>]

View File

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

View File

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

View File

@ -61,7 +61,7 @@ static struct option long_options[] = {
{"keydir", required_argument, NULL, 'r'}, {"keydir", required_argument, NULL, 'r'},
{"remote", no_argument, NULL, 's'}, {"remote", no_argument, NULL, 's'},
{"windowed", no_argument, NULL, 't'}, {"windowed", no_argument, NULL, 't'},
{"surround", no_argument, NULL, 'u'}, {"surround", required_argument, NULL, 'u'},
{"fps", required_argument, NULL, 'v'}, {"fps", required_argument, NULL, 'v'},
{"codec", required_argument, NULL, 'x'}, {"codec", required_argument, NULL, 'x'},
{"nounsupported", no_argument, NULL, 'y'}, {"nounsupported", no_argument, NULL, 'y'},
@ -199,7 +199,10 @@ static void parse_argument(int c, char* value, PCONFIGURATION config) {
config->fullscreen = false; config->fullscreen = false;
break; break;
case 'u': case 'u':
if (strcasecmp(value, "5.1") == 0)
config->stream.audioConfiguration = AUDIO_CONFIGURATION_51_SURROUND; config->stream.audioConfiguration = AUDIO_CONFIGURATION_51_SURROUND;
else if (strcasecmp(value, "7.1") == 0)
config->stream.audioConfiguration = AUDIO_CONFIGURATION_71_SURROUND;
break; break;
case 'v': case 'v':
config->stream.fps = atoi(value); config->stream.fps = atoi(value);
@ -352,7 +355,7 @@ void config_parse(int argc, char* argv[], PCONFIGURATION config) {
} else { } else {
int option_index = 0; int option_index = 0;
int c; 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); 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-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-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-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-keydir <directory>\tLoad encryption keys from directory\n");
printf("\t-mapping <file>\t\tUse <file> as gamepad mappings configuration file\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"); printf("\t-platform <system>\tSpecify system used for audio, video and input: pi/imx/aml/rk/x11/x11_vdpau/sdl/fake (default auto)\n");