mixer: removed mixer_configure(), configure mixer in mixer_new()

Allocate the mixer object when it is configured.

Merged mixer_configure() into mixer_new().  mixer_new() was quite
useless anyway.
This commit is contained in:
Max Kellermann
2009-01-25 17:37:59 +01:00
parent 763dd8c1dd
commit 8695b94232
4 changed files with 7 additions and 20 deletions

View File

@@ -38,11 +38,13 @@ void mixer_finish(struct mixer *mixer)
}
struct mixer *
mixer_new(const struct mixer_plugin *plugin)
mixer_new(const struct mixer_plugin *plugin, const struct config_param *param)
{
struct mixer *mixer = g_new(struct mixer, 1);
mixer_init(mixer, plugin);
plugin->configure(mixer->data, param);
return mixer;
}
@@ -53,12 +55,6 @@ mixer_free(struct mixer *mixer)
g_free(mixer);
}
void mixer_configure(struct mixer *mixer, const struct config_param *param)
{
assert(mixer != NULL && mixer->plugin != NULL);
mixer->plugin->configure(mixer->data, param);
}
bool mixer_open(struct mixer *mixer)
{
assert(mixer != NULL && mixer->plugin != NULL);