OSDN Git Service

Implement order for 8-channel sound, arranged in 7.1 mode.
authorJames Courtier-Dutton <James@superbug.co.uk>
Sat, 16 Apr 2005 13:23:52 +0000 (13:23 +0000)
committerJames Courtier-Dutton <James@superbug.co.uk>
Sat, 16 Apr 2005 13:23:52 +0000 (13:23 +0000)
speaker-test/speaker-test.c

index 867735c..f98a3a7 100644 (file)
@@ -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);