aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_api.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-24 07:20:36 +0200
committerMax Kellermann <max@duempel.org>2008-09-24 07:20:36 +0200
commit3cae6856b8c6096b3f932a4ab30476a8d1187e58 (patch)
treece4a7dfea71105b723779b08d37108ec3f258bdd /src/output_api.h
parentd32f49a90ba69525884ee6fe4f2055792aa10430 (diff)
downloadmpd-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/output_api.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/output_api.h b/src/output_api.h
index bea5c5b4c..8744fa08e 100644
--- a/src/output_api.h
+++ b/src/output_api.h
@@ -38,11 +38,14 @@ struct audio_output_plugin {
int (*test_default_device)(void);
- int (*init)(struct audio_output *ao, ConfigParam *param);
+ int (*init)(struct audio_output *ao,
+ const struct audio_format *audio_format,
+ ConfigParam *param);
void (*finish)(struct audio_output *ao);
- int (*open)(struct audio_output *ao);
+ int (*open)(struct audio_output *ao,
+ struct audio_format *audio_format);
int (*play)(struct audio_output *ao,
const char *playChunk, size_t size);