Implement order for 8-channel sound, arranged in 7.1 mode.

This commit is contained in:
James Courtier-Dutton 2005-04-16 13:23:52 +00:00
parent fb2f99f1f9
commit 36f7af4ffc

View file

@ -99,6 +99,16 @@ static const int channels6[] = {
2, 2,
5 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) { static void generate_sine(signed short *samples, int channel, int count, double *_phase) {
double phase = *_phase; double phase = *_phase;
@ -588,6 +598,9 @@ loop:
if (channels == 6) { if (channels == 6) {
channel=channels6[chn]; channel=channels6[chn];
} }
if (channels == 8) {
channel=channels8[chn];
}
printf(" %d - %s\n", channel, channel_name[channel]); printf(" %d - %s\n", channel, channel_name[channel]);
err = write_loop(handle, channel, ((rate*3)/period_size), samples); err = write_loop(handle, channel, ((rate*3)/period_size), samples);