summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-03-28 20:54:31 +0100
committerwm4 <wm4@nowhere>2020-03-28 20:59:00 +0100
commit4583bd8cc7bf538bce424983d49729c934d13a53 (patch)
tree27f0ef4cc35623287eddced48cf561758c4be6da
parent71d218eae4b4d93ada34ff74906f71ad359c84bc (diff)
downloadmpv-4583bd8cc7bf538bce424983d49729c934d13a53.tar.bz2
mpv-4583bd8cc7bf538bce424983d49729c934d13a53.tar.xz
ao_rsound: remove this audio output
I wonder what this even is. I've never heard of anyone using it, and can't find a corresponding library that actually builds with it. Good enough to remove.
-rw-r--r--DOCS/man/ao.rst8
-rw-r--r--audio/out/ao.c3
-rw-r--r--audio/out/ao_rsound.c154
-rw-r--r--wscript4
-rw-r--r--wscript_build.py1
5 files changed, 0 insertions, 170 deletions
diff --git a/DOCS/man/ao.rst b/DOCS/man/ao.rst
index 41c62069bd..7dace73ec5 100644
--- a/DOCS/man/ao.rst
+++ b/DOCS/man/ao.rst
@@ -233,13 +233,5 @@ Available audio output drivers are:
``no-waveheader`` option - with ``waveheader`` it's broken, because
it will write a WAVE header every time the file is opened.
-``rsound``
- Audio output to an RSound daemon. Use ``--audio-device=rsound/<hostname>``
- to set the host name (with ``<hostname>`` replaced, without the ``< >``).
-
- .. note:: Completely useless, unless you intend to run RSound. Not to be
- confused with RoarAudio, which is something completely
- different.
-
``wasapi``
Audio output to the Windows Audio Session API.
diff --git a/audio/out/ao.c b/audio/out/ao.c
index a414b1b6b9..10717d466e 100644
--- a/audio/out/ao.c
+++ b/audio/out/ao.c
@@ -94,9 +94,6 @@ static const struct ao_driver * const audio_out_drivers[] = {
#endif
&audio_out_pcm,
&audio_out_lavc,
-#if HAVE_RSOUND
- &audio_out_rsound,
-#endif
NULL
};
diff --git a/audio/out/ao_rsound.c b/audio/out/ao_rsound.c
deleted file mode 100644
index 6cfd60d4c9..0000000000
--- a/audio/out/ao_rsound.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * RSound audio output driver
- *
- * Copyright (C) 2011 Hans-Kristian Arntzen
- *
- * This file is part of mpv.
- *
- * mpv is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * mpv is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with mpv. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "config.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <rsound.h>
-
-#include "mpv_talloc.h"
-
-#include "options/m_option.h"
-#include "osdep/timer.h"
-#include "audio/format.h"
-#include "ao.h"
-#include "internal.h"
-
-struct priv {
- rsound_t *rd;
-};
-
-static int set_format(struct ao *ao)
-{
- int rsd_format;
-
- switch (ao->format) {
- case AF_FORMAT_U8:
- rsd_format = RSD_U8;
- break;
- case AF_FORMAT_S32:
- rsd_format = RSD_S32_NE;
- break;
- default:
- rsd_format = RSD_S16_NE;
- ao->format = AF_FORMAT_S16;
- }
-
- return rsd_format;
-}
-
-static int init(struct ao *ao)
-{
- struct priv *priv = ao->priv;
-
- if (rsd_init(&priv->rd) < 0)
- return -1;
-
- if (ao->device)
- rsd_set_param(priv->rd, RSD_HOST, ao->device);
-
- // 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, (int[]) { ao->samplerate });
- rsd_set_param(priv->rd, RSD_CHANNELS, (int[]) { ao->channels.num });
-
- ao->format = af_fmt_from_planar(ao->format);
-
- int rsd_format = set_format(ao);
- rsd_set_param(priv->rd, RSD_FORMAT, &rsd_format);
-
- if (rsd_start(priv->rd) < 0) {
- rsd_free(priv->rd);
- return -1;
- }
-
- return 0;
-}
-
-static void uninit(struct ao *ao)
-{
- struct priv *priv = ao->priv;
-
- rsd_stop(priv->rd);
- rsd_free(priv->rd);
-}
-
-static void reset(struct ao *ao)
-{
- struct priv *priv = ao->priv;
- rsd_stop(priv->rd);
- rsd_start(priv->rd);
-}
-
-static void audio_pause(struct ao *ao)
-{
- struct priv *priv = ao->priv;
- rsd_pause(priv->rd, 1);
-}
-
-static void audio_resume(struct ao *ao)
-{
- struct priv *priv = ao->priv;
- rsd_pause(priv->rd, 0);
-}
-
-static int get_space(struct ao *ao)
-{
- struct priv *priv = ao->priv;
- return rsd_get_avail(priv->rd) / ao->sstride;
-}
-
-static int play(struct ao *ao, void **data, int samples, int flags)
-{
- struct priv *priv = ao->priv;
- return rsd_write(priv->rd, data[0], samples * ao->sstride) / ao->sstride;
-}
-
-static double get_delay(struct ao *ao)
-{
- struct priv *priv = ao->priv;
- return rsd_delay_ms(priv->rd) / 1000.0;
-}
-
-#define OPT_BASE_STRUCT struct priv
-
-const struct ao_driver audio_out_rsound = {
- .description = "RSound output driver",
- .name = "rsound",
- .init = init,
- .uninit = uninit,
- .reset = reset,
- .get_space = get_space,
- .play = play,
- .get_delay = get_delay,
- .pause = audio_pause,
- .resume = audio_resume,
- .priv_size = sizeof(struct priv),
-};
-
diff --git a/wscript b/wscript
index 12edcbf4c7..ccfed67648 100644
--- a/wscript
+++ b/wscript
@@ -445,10 +445,6 @@ audio_output_features = [
'func': check_cc(header_name='sys/soundcard.h'),
'deps': 'posix && gpl',
}, {
- 'name': '--rsound',
- 'desc': 'RSound audio output',
- 'func': check_statement('rsound.h', 'rsd_init(NULL)', lib='rsound')
- }, {
'name': '--pulse',
'desc': 'PulseAudio audio output',
'func': check_pkg_config('libpulse', '>= 1.0')
diff --git a/wscript_build.py b/wscript_build.py
index 712b7d3140..145b415d75 100644
--- a/wscript_build.py
+++ b/wscript_build.py
@@ -258,7 +258,6 @@ def build(ctx):
( "audio/out/ao_oss.c", "oss-audio" ),
( "audio/out/ao_pcm.c" ),
( "audio/out/ao_pulse.c", "pulse" ),
- ( "audio/out/ao_rsound.c", "rsound" ),
( "audio/out/ao_sdl.c", "sdl2-audio" ),
( "audio/out/ao_wasapi.c", "wasapi" ),
( "audio/out/ao_wasapi_changenotify.c", "wasapi" ),