diff options
author | Chris Robinson <[email protected]> | 2009-12-02 04:03:51 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-12-02 04:03:51 -0800 |
commit | b5270e0bb300f090c159803e79b50ba15b821b2e (patch) | |
tree | 3acfd1add6598701dbb4350649339fcf1a853b8a /Alc/pulseaudio.c | |
parent | 6cfc31777b7cca6714cf926fbc6e491c00a3f836 (diff) |
Use a channel-map to specify the output device channel order
Diffstat (limited to 'Alc/pulseaudio.c')
-rw-r--r-- | Alc/pulseaudio.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c index 42ed84f3..3b83d127 100644 --- a/Alc/pulseaudio.c +++ b/Alc/pulseaudio.c @@ -518,40 +518,13 @@ static ALCboolean pulse_reset_playback(ALCdevice *device) //{{{ return ALC_FALSE; } -#ifdef _WIN32 if(!ppa_channel_map_init_auto(&chanmap, data->spec.channels, PA_CHANNEL_MAP_WAVEEX)) { AL_PRINT("Couldn't build map for channel count (%d)!", data->spec.channels); ppa_threaded_mainloop_unlock(data->loop); return ALC_FALSE; } -#else - switch(data->spec.channels) - { - case 1: - ppa_channel_map_parse(&chanmap, "mono"); - break; - case 2: - ppa_channel_map_parse(&chanmap, "front-left,front-right"); - break; - case 4: - ppa_channel_map_parse(&chanmap, "front-left,front-right,rear-left,rear-right"); - break; - case 6: - ppa_channel_map_parse(&chanmap, "front-left,front-right,rear-left,rear-right,front-center,lfe"); - break; - case 7: - ppa_channel_map_parse(&chanmap, "front-left,front-right,front-center,lfe,rear-center,side-left,side-right"); - break; - case 8: - ppa_channel_map_parse(&chanmap, "front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right"); - break; - default: - AL_PRINT("Got unhandled channel count (%d)!", data->spec.channels); - ppa_threaded_mainloop_unlock(data->loop); - return ALC_FALSE; - } -#endif + SetDefaultWFXChannelOrder(device); data->stream = ppa_stream_new(data->context, data->stream_name, &data->spec, &chanmap); if(!data->stream) |