diff options
author | wm4 <wm4@nowhere> | 2013-04-05 23:06:22 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-05-12 21:24:54 +0200 |
commit | aea2328906fc754c0d0cdea57c60d71522ae99a5 (patch) | |
tree | b57c9ebbfa2a787a16ff90fdd97e2de7f6a420f8 /audio/out/ao_pulse.c | |
parent | 37325f2796afd914ee729cafc3a1624f333a9ae7 (diff) | |
download | mpv-aea2328906fc754c0d0cdea57c60d71522ae99a5.tar.bz2 mpv-aea2328906fc754c0d0cdea57c60d71522ae99a5.tar.xz |
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.
Diffstat (limited to 'audio/out/ao_pulse.c')
-rw-r--r-- | audio/out/ao_pulse.c | 6 |
1 files changed, 4 insertions, 2 deletions
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 { |