summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_rsound.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-04-05 23:06:22 +0200
committerwm4 <wm4@nowhere>2013-05-12 21:24:54 +0200
commitaea2328906fc754c0d0cdea57c60d71522ae99a5 (patch)
treeb57c9ebbfa2a787a16ff90fdd97e2de7f6a420f8 /audio/out/ao_rsound.c
parent37325f2796afd914ee729cafc3a1624f333a9ae7 (diff)
downloadmpv-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_rsound.c')
-rw-r--r--audio/out/ao_rsound.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/audio/out/ao_rsound.c b/audio/out/ao_rsound.c
index 7722bf19d2..004beb0867 100644
--- a/audio/out/ao_rsound.c
+++ b/audio/out/ao_rsound.c
@@ -121,8 +121,10 @@ static int init(struct ao *ao, char *params)
free(port);
}
+ mp_chmap_reorder_to_alsa(&ao->channels);
+
rsd_set_param(priv->rd, RSD_SAMPLERATE, &ao->samplerate);
- rsd_set_param(priv->rd, RSD_CHANNELS, &ao->channels);
+ rsd_set_param(priv->rd, RSD_CHANNELS, &ao->channels.num);
int rsd_format = set_format(ao);
rsd_set_param(priv->rd, RSD_FORMAT, &rsd_format);
@@ -132,7 +134,7 @@ static int init(struct ao *ao, char *params)
return -1;
}
- ao->bps = ao->channels * ao->samplerate * af_fmt2bits(ao->format) / 8;
+ ao->bps = ao->channels.num * ao->samplerate * af_fmt2bits(ao->format) / 8;
return 0;
}