From 0a0659d737e8788fc1ba02e8c113e55204782716 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 6 Feb 2014 21:10:12 +0100 Subject: mixer/Plugin: pass AudioOutput reference to init() Passing a void pointer is unsafe. --- src/mixer/MixerPlugin.hxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mixer/MixerPlugin.hxx') diff --git a/src/mixer/MixerPlugin.hxx b/src/mixer/MixerPlugin.hxx index 27e59accf..bf9af14e3 100644 --- a/src/mixer/MixerPlugin.hxx +++ b/src/mixer/MixerPlugin.hxx @@ -28,6 +28,7 @@ #define MPD_MIXER_PLUGIN_HXX struct config_param; +struct AudioOutput; class Mixer; class EventLoop; class Error; @@ -36,13 +37,13 @@ struct MixerPlugin { /** * Alocates and configures a mixer device. * - * @param ao the pointer returned by AudioOutputPlugin.init + * @param ao the associated AudioOutput * @param param the configuration section * @param error_r location to store the error occurring, or * nullptr to ignore errors * @return a mixer object, or nullptr on error */ - Mixer *(*init)(EventLoop &event_loop, void *ao, + Mixer *(*init)(EventLoop &event_loop, AudioOutput &ao, const config_param ¶m, Error &error); -- cgit v1.2.3