output_plugin: replaced output_plugin.get_mixer() with mixer_plugin
The mixer core library is now responsible for creating and managing the mixer object. This removes duplicated code from the output plugins.
This commit is contained in:
@@ -66,15 +66,6 @@ struct audio_output_plugin {
|
||||
*/
|
||||
void (*finish)(void *data);
|
||||
|
||||
/**
|
||||
* Returns the mixer device associated with this audio output.
|
||||
* This does not actually open the mixer device yet.
|
||||
*
|
||||
* @return the mixer object, or NULL if there is no mixer
|
||||
* attached to this audio output
|
||||
*/
|
||||
struct mixer *(*get_mixer)(void *data);
|
||||
|
||||
/**
|
||||
* Really open the device.
|
||||
*
|
||||
@@ -125,6 +116,14 @@ struct audio_output_plugin {
|
||||
* for continue to pause
|
||||
*/
|
||||
bool (*pause)(void *data);
|
||||
|
||||
/**
|
||||
* The mixer plugin associated with this output plugin. This
|
||||
* may be NULL if no mixer plugin is implemented. When
|
||||
* created, this mixer plugin gets the same #config_param as
|
||||
* this audio output device.
|
||||
*/
|
||||
const struct mixer_plugin *mixer_plugin;
|
||||
};
|
||||
|
||||
static inline bool
|
||||
@@ -150,14 +149,6 @@ ao_plugin_finish(const struct audio_output_plugin *plugin, void *data)
|
||||
plugin->finish(data);
|
||||
}
|
||||
|
||||
static inline struct mixer *
|
||||
ao_plugin_get_mixer(const struct audio_output_plugin *plugin, void *data)
|
||||
{
|
||||
return plugin->get_mixer != NULL
|
||||
? plugin->get_mixer(data)
|
||||
: NULL;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
ao_plugin_open(const struct audio_output_plugin *plugin,
|
||||
void *data, struct audio_format *audio_format,
|
||||
|
||||
Reference in New Issue
Block a user