From: James Courtier-Dutton Date: Sat, 16 Apr 2005 13:23:52 +0000 (+0000) Subject: Implement order for 8-channel sound, arranged in 7.1 mode. X-Git-Tag: v1.0.9rc3~1 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=36f7af4ffcdfad5b094ef57ada26631febf62c4a;p=alsa-utils.git Implement order for 8-channel sound, arranged in 7.1 mode. --- diff --git a/speaker-test/speaker-test.c b/speaker-test/speaker-test.c index 867735c..f98a3a7 100644 --- a/speaker-test/speaker-test.c +++ b/speaker-test/speaker-test.c @@ -99,6 +99,16 @@ static const int channels6[] = { 2, 5 }; +static const int channels8[] = { + 0, + 4, + 1, + 7, + 3, + 2, + 6, + 5 +}; static void generate_sine(signed short *samples, int channel, int count, double *_phase) { double phase = *_phase; @@ -588,6 +598,9 @@ loop: if (channels == 6) { channel=channels6[chn]; } + if (channels == 8) { + channel=channels8[chn]; + } printf(" %d - %s\n", channel, channel_name[channel]); err = write_loop(handle, channel, ((rate*3)/period_size), samples);