diff options
Diffstat (limited to 'src/mixer_api.c')
-rw-r--r-- | src/mixer_api.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mixer_api.c b/src/mixer_api.c index bd5e1ca05..cd216415a 100644 --- a/src/mixer_api.c +++ b/src/mixer_api.c @@ -37,6 +37,22 @@ void mixer_finish(struct mixer *mixer) mixer->plugin = NULL; } +struct mixer * +mixer_new(const struct mixer_plugin *plugin) +{ + struct mixer *mixer = g_new(struct mixer, 1); + + mixer_init(mixer, plugin); + return mixer; +} + +void +mixer_free(struct mixer *mixer) +{ + mixer_finish(mixer); + g_free(mixer); +} + void mixer_configure(struct mixer *mixer, const struct config_param *param) { assert(mixer != NULL && mixer->plugin != NULL); |