From aea2328906fc754c0d0cdea57c60d71522ae99a5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 5 Apr 2013 23:06:22 +0200 Subject: audio/out: switch to channel map This actually breaks audio for 5/6/8 channels. There's no reordering done yet. The actual reordering will be done inside of af_lavrresample and has to be made part of the format negotiation. --- audio/out/ao_pulse.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'audio/out/ao_pulse.c') diff --git a/audio/out/ao_pulse.c b/audio/out/ao_pulse.c index bb5af6f851..7f3619386e 100644 --- a/audio/out/ao_pulse.c +++ b/audio/out/ao_pulse.c @@ -209,7 +209,7 @@ static int init(struct ao *ao, char *params) priv->broken_pause = true; } - ss.channels = ao->channels; + ss.channels = ao->channels.num; ss.rate = ao->samplerate; const struct format_map *fmt_map = format_maps; @@ -230,7 +230,9 @@ static int init(struct ao *ao, char *params) goto fail; } + mp_chmap_reorder_to_waveext(&ao->channels); pa_channel_map_init_auto(&map, ss.channels, PA_CHANNEL_MAP_WAVEEX); + ao->bps = pa_bytes_per_second(&ss); if (!(priv->mainloop = pa_threaded_mainloop_new())) { @@ -495,7 +497,7 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg) const ao_control_vol_t *vol = arg; struct pa_cvolume volume; - pa_cvolume_reset(&volume, ao->channels); + pa_cvolume_reset(&volume, ao->channels.num); if (volume.channels != 2) pa_cvolume_set(&volume, volume.channels, VOL_MP2PA(vol->left)); else { -- cgit v1.2.3