diff options
author | Max Kellermann <max@duempel.org> | 2008-09-24 07:20:36 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-24 07:20:36 +0200 |
commit | 3cae6856b8c6096b3f932a4ab30476a8d1187e58 (patch) | |
tree | ce4a7dfea71105b723779b08d37108ec3f258bdd /src/audioOutputs/audioOutput_alsa.c | |
parent | d32f49a90ba69525884ee6fe4f2055792aa10430 (diff) | |
download | mpd-3cae6856b8c6096b3f932a4ab30476a8d1187e58.tar.gz mpd-3cae6856b8c6096b3f932a4ab30476a8d1187e58.tar.xz mpd-3cae6856b8c6096b3f932a4ab30476a8d1187e58.zip |
output: pass audio_format to plugin.init() and plugin.open()
Pass the globally configured audio_format as a const pointer to
plugin.init(). plugin.open() gets a writable pointer which contains
the audio_format requested by the plugin. Its initial value is either
the configured audio_format or the input file's audio_format.
Diffstat (limited to '')
-rw-r--r-- | src/audioOutputs/audioOutput_alsa.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/audioOutputs/audioOutput_alsa.c b/src/audioOutputs/audioOutput_alsa.c index 995ee3a9a..b2e4b9025 100644 --- a/src/audioOutputs/audioOutput_alsa.c +++ b/src/audioOutputs/audioOutput_alsa.c @@ -73,6 +73,7 @@ static void freeAlsaData(AlsaData * ad) } static int alsa_initDriver(struct audio_output *audioOutput, + mpd_unused const struct audio_format *audio_format, ConfigParam * param) { /* no need for pthread_once thread-safety when reading config */ @@ -136,10 +137,10 @@ static snd_pcm_format_t get_bitformat(const struct audio_format *af) return SND_PCM_FORMAT_UNKNOWN; } -static int alsa_openDevice(struct audio_output *audioOutput) +static int alsa_openDevice(struct audio_output *audioOutput, + struct audio_format *audioFormat) { AlsaData *ad = audioOutput->data; - struct audio_format *audioFormat = &audioOutput->outAudioFormat; snd_pcm_format_t bitformat; snd_pcm_hw_params_t *hwparams; snd_pcm_sw_params_t *swparams; |