diff options
author | Max Kellermann <max@duempel.org> | 2009-01-25 17:37:55 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-25 17:37:55 +0100 |
commit | 763dd8c1dd4de451663474bafd13068eb6017bbb (patch) | |
tree | 04d25b3107b170987ba6b2b1340f313a760c2e05 /src/output/alsa_plugin.c | |
parent | ad8561bfdc76d05812efc7fa802df48c37fcf770 (diff) | |
download | mpd-763dd8c1dd4de451663474bafd13068eb6017bbb.tar.gz mpd-763dd8c1dd4de451663474bafd13068eb6017bbb.tar.xz mpd-763dd8c1dd4de451663474bafd13068eb6017bbb.zip |
mixer: return a mixer struct pointer
Don't use statically allocated mixer objects.
Diffstat (limited to 'src/output/alsa_plugin.c')
-rw-r--r-- | src/output/alsa_plugin.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/output/alsa_plugin.c b/src/output/alsa_plugin.c index 23a9089cd..f08e99041 100644 --- a/src/output/alsa_plugin.c +++ b/src/output/alsa_plugin.c @@ -71,7 +71,7 @@ struct alsa_data { size_t frame_size; /** the mixer object associated with this output */ - struct mixer mixer; + struct mixer *mixer; }; static const char * @@ -90,7 +90,7 @@ alsa_data_new(void) ret->writei = snd_pcm_writei; //use alsa mixer by default - mixer_init(&ret->mixer, &alsa_mixer); + ret->mixer = mixer_new(&alsa_mixer); return ret; } @@ -99,7 +99,7 @@ static void alsa_data_free(struct alsa_data *ad) { g_free(ad->device); - mixer_finish(&ad->mixer); + mixer_free(ad->mixer); free(ad); } @@ -148,7 +148,7 @@ alsa_init(G_GNUC_UNUSED struct audio_output *ao, alsa_configure(ad, param); if (param) { - mixer_configure(&ad->mixer, param); + mixer_configure(ad->mixer, param); } return ad; @@ -208,7 +208,7 @@ alsa_open(void *data, struct audio_format *audio_format) unsigned int period_time, period_time_ro; unsigned int buffer_time; - mixer_open(&ad->mixer); + mixer_open(ad->mixer); if ((bitformat = get_bitformat(audio_format)) == SND_PCM_FORMAT_UNKNOWN) g_warning("ALSA device \"%s\" doesn't support %u bit audio\n", @@ -436,7 +436,7 @@ alsa_close(void *data) ad->pcm = NULL; } - mixer_close(&ad->mixer); + mixer_close(ad->mixer); } static bool @@ -475,7 +475,7 @@ static bool alsa_control(void *data, int cmd, void *arg) { struct alsa_data *ad = data; - return mixer_control(&ad->mixer, cmd, arg); + return mixer_control(ad->mixer, cmd, arg); } const struct audio_output_plugin alsaPlugin = { |