mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-14 05:15:43 +01:00
Implement order for 8-channel sound, arranged in 7.1 mode.
This commit is contained in:
parent
fb2f99f1f9
commit
36f7af4ffc
1 changed files with 13 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue