aboutsummaryrefslogtreecommitdiffstats
path: root/test/read_mixer.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-06 21:10:12 +0100
committerMax Kellermann <max@duempel.org>2014-02-06 21:10:12 +0100
commit0a0659d737e8788fc1ba02e8c113e55204782716 (patch)
tree8855ba68e8648bbb81ea94899406e4b2988ae489 /test/read_mixer.cxx
parentb6df4680df08db7827af56d5adf2a04264f2dcb9 (diff)
downloadmpd-0a0659d737e8788fc1ba02e8c113e55204782716.tar.gz
mpd-0a0659d737e8788fc1ba02e8c113e55204782716.tar.xz
mpd-0a0659d737e8788fc1ba02e8c113e55204782716.zip
mixer/Plugin: pass AudioOutput reference to init()
Passing a void pointer is unsafe.
Diffstat (limited to 'test/read_mixer.cxx')
-rw-r--r--test/read_mixer.cxx56
1 files changed, 2 insertions, 54 deletions
diff --git a/test/read_mixer.cxx b/test/read_mixer.cxx
index a2071c4bf..881f517c7 100644
--- a/test/read_mixer.cxx
+++ b/test/read_mixer.cxx
@@ -35,59 +35,6 @@
#include <string.h>
#include <unistd.h>
-#ifdef HAVE_PULSE
-#include "output/plugins/PulseOutputPlugin.hxx"
-
-void
-pulse_output_lock(gcc_unused PulseOutput *po)
-{
-}
-
-void
-pulse_output_unlock(gcc_unused PulseOutput *po)
-{
-}
-
-void
-pulse_output_set_mixer(gcc_unused PulseOutput *po,
- gcc_unused PulseMixer *pm)
-{
-}
-
-void
-pulse_output_clear_mixer(gcc_unused PulseOutput *po,
- gcc_unused PulseMixer *pm)
-{
-}
-
-bool
-pulse_output_set_volume(gcc_unused PulseOutput *po,
- gcc_unused const struct pa_cvolume *volume,
- gcc_unused Error &error)
-{
- return false;
-}
-
-#endif
-
-#ifdef HAVE_ROAR
-#include "output/plugins/RoarOutputPlugin.hxx"
-
-int
-roar_output_get_volume(gcc_unused RoarOutput *roar)
-{
- return -1;
-}
-
-bool
-roar_output_set_volume(gcc_unused RoarOutput *roar,
- gcc_unused unsigned volume)
-{
- return true;
-}
-
-#endif
-
void
GlobalEvents::Emit(gcc_unused Event event)
{
@@ -116,7 +63,8 @@ int main(int argc, gcc_unused char **argv)
EventLoop event_loop;
Error error;
- Mixer *mixer = mixer_new(event_loop, alsa_mixer_plugin, nullptr,
+ Mixer *mixer = mixer_new(event_loop, alsa_mixer_plugin,
+ *(AudioOutput *)nullptr,
config_param(), error);
if (mixer == NULL) {
LogError(error, "mixer_new() failed");