follow PulseAudio's lead for default channel layouts

This commit is contained in:
Andrew Kelley 2015-07-28 15:23:08 -07:00
parent 70441184a1
commit 1eca206a24
3 changed files with 19 additions and 20 deletions

View file

@ -233,7 +233,6 @@ view `coverage/index.html` in a browser.
## Roadmap
0. JACK: input
0. Steal PulseAudio's default channel maps per channel count
0. JACK: implement prebuffering
0. why does pulseaudio microphone use up all the CPU?
0. merge in/out stream structures and functions?

View file

@ -103,17 +103,6 @@ static struct SoundIoChannelLayout builtin_channel_layouts[] = {
SoundIoChannelIdLfe,
}
},
[SoundIoChannelLayoutId5Point0] = {
"5.0",
5,
{
SoundIoChannelIdFrontLeft,
SoundIoChannelIdFrontRight,
SoundIoChannelIdFrontCenter,
SoundIoChannelIdSideLeft,
SoundIoChannelIdSideRight,
}
},
[SoundIoChannelLayoutId5Point0Back] = {
"5.0 (back)",
5,
@ -125,6 +114,17 @@ static struct SoundIoChannelLayout builtin_channel_layouts[] = {
SoundIoChannelIdBackRight,
}
},
[SoundIoChannelLayoutId5Point0Side] = {
"5.0 (side)",
5,
{
SoundIoChannelIdFrontLeft,
SoundIoChannelIdFrontRight,
SoundIoChannelIdFrontCenter,
SoundIoChannelIdSideLeft,
SoundIoChannelIdSideRight,
}
},
[SoundIoChannelLayoutId5Point1] = {
"5.1",
6,
@ -149,8 +149,8 @@ static struct SoundIoChannelLayout builtin_channel_layouts[] = {
SoundIoChannelIdLfe,
}
},
[SoundIoChannelLayoutId6Point0] = {
"6.0",
[SoundIoChannelLayoutId6Point0Side] = {
"6.0 (side)",
6,
{
SoundIoChannelIdFrontLeft,
@ -545,10 +545,10 @@ const struct SoundIoChannelLayout *soundio_channel_layout_get_default(int channe
switch (channel_count) {
case 1: return soundio_channel_layout_get_builtin(SoundIoChannelLayoutIdMono);
case 2: return soundio_channel_layout_get_builtin(SoundIoChannelLayoutIdStereo);
case 3: return soundio_channel_layout_get_builtin(SoundIoChannelLayoutId2Point1);
case 4: return soundio_channel_layout_get_builtin(SoundIoChannelLayoutIdQuad);
case 5: return soundio_channel_layout_get_builtin(SoundIoChannelLayoutId4Point1);
case 6: return soundio_channel_layout_get_builtin(SoundIoChannelLayoutId5Point1);
case 3: return soundio_channel_layout_get_builtin(SoundIoChannelLayoutId3Point0);
case 4: return soundio_channel_layout_get_builtin(SoundIoChannelLayoutId4Point0);
case 5: return soundio_channel_layout_get_builtin(SoundIoChannelLayoutId5Point0Back);
case 6: return soundio_channel_layout_get_builtin(SoundIoChannelLayoutId5Point1Back);
case 7: return soundio_channel_layout_get_builtin(SoundIoChannelLayoutId6Point1);
case 8: return soundio_channel_layout_get_builtin(SoundIoChannelLayoutId7Point1);
}

View file

@ -83,11 +83,11 @@ enum SoundIoChannelLayoutId {
SoundIoChannelLayoutIdQuad,
SoundIoChannelLayoutIdQuadSide,
SoundIoChannelLayoutId4Point1,
SoundIoChannelLayoutId5Point0,
SoundIoChannelLayoutId5Point0Back,
SoundIoChannelLayoutId5Point0Side,
SoundIoChannelLayoutId5Point1,
SoundIoChannelLayoutId5Point1Back,
SoundIoChannelLayoutId6Point0,
SoundIoChannelLayoutId6Point0Side,
SoundIoChannelLayoutId6Point0Front,
SoundIoChannelLayoutIdHexagonal,
SoundIoChannelLayoutId6Point1,