aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-10-08 13:14:29 +0200
committerMax Kellermann <max@duempel.org>2011-10-08 13:14:29 +0200
commit2b3fd0d4d34be365e44fd53b3bf3c72f8b0a69ea (patch)
tree645214575b9f1aab54312120694d60c591993fce /src/main.c
parent894b9cfdb9fb69dbdde937c32726508472601402 (diff)
downloadmpd-2b3fd0d4d34be365e44fd53b3bf3c72f8b0a69ea.tar.gz
mpd-2b3fd0d4d34be365e44fd53b3bf3c72f8b0a69ea.tar.xz
mpd-2b3fd0d4d34be365e44fd53b3bf3c72f8b0a69ea.zip
pcm_resample: one-time global initialization
Load the samplerate_converter on MPD startup. Fail if the converter name is invalid.
Diffstat (limited to '')
-rw-r--r--src/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 49ce6e125..addf439d2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -44,6 +44,7 @@
#include "volume.h"
#include "log.h"
#include "permission.h"
+#include "pcm_resample.h"
#include "replay_gain_config.h"
#include "decoder_list.h"
#include "input_init.h"
@@ -403,6 +404,13 @@ int mpd_main(int argc, char *argv[])
#ifdef ENABLE_ARCHIVE
archive_plugin_init_all();
#endif
+
+ if (!pcm_resample_global_init(&error)) {
+ g_warning("%s", error->message);
+ g_error_free(error);
+ return EXIT_FAILURE;
+ }
+
decoder_plugin_init_all();
update_global_init();