diff options
author | wm4 <wm4@nowhere> | 2013-05-12 21:47:55 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-05-12 21:47:55 +0200 |
commit | e6e5a7b221ef2fcdd5a1982d6fdcb627100447d2 (patch) | |
tree | 08b54ef9bb771434fc7fbe9185793503d3ba314c /audio/out/ao_rsound.c | |
parent | 6a83ef1552de4a1a71da49e45647ce1a4ce64e53 (diff) | |
parent | 48f94311516dc1426644b3e68b2a48c22727e1e7 (diff) | |
download | mpv-e6e5a7b221ef2fcdd5a1982d6fdcb627100447d2.tar.bz2 mpv-e6e5a7b221ef2fcdd5a1982d6fdcb627100447d2.tar.xz |
Merge branch 'audio_changes'
Conflicts:
audio/out/ao_lavc.c
Diffstat (limited to 'audio/out/ao_rsound.c')
-rw-r--r-- | audio/out/ao_rsound.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/audio/out/ao_rsound.c b/audio/out/ao_rsound.c index 7722bf19d2..78ea2c63f5 100644 --- a/audio/out/ao_rsound.c +++ b/audio/out/ao_rsound.c @@ -121,8 +121,16 @@ static int init(struct ao *ao, char *params) free(port); } + // Actual channel layout unknown. + struct mp_chmap_sel sel = {0}; + mp_chmap_sel_add_waveext_def(&sel); + if (!ao_chmap_sel_adjust(ao, &sel, &ao->channels)) { + rsd_free(priv->rd); + return -1; + } + 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 +140,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; } @@ -189,7 +197,6 @@ static float get_delay(struct ao *ao) } const struct ao_driver audio_out_rsound = { - .is_new = true, .info = &(const struct ao_info) { .name = "RSound output driver", .short_name = "rsound", |