aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-08-15 00:29:38 +0200
committerMax Kellermann <max@duempel.org>2012-08-15 00:29:38 +0200
commite291f3d257360667e12754154acac9ba3fe3316a (patch)
treea4ff1dc50b3d9dbd07b6c018060e079630561929 /src
parentdc22846d58264bfae3b4516e2de1614b3b97a5ca (diff)
downloadmpd-e291f3d257360667e12754154acac9ba3fe3316a.tar.gz
mpd-e291f3d257360667e12754154acac9ba3fe3316a.tar.xz
mpd-e291f3d257360667e12754154acac9ba3fe3316a.zip
decoder/fluidsynth: remove throttle (requires libfluidsynth 1.1)
The libfluidsynth API is now sane, and does not require real-time decoding.
Diffstat (limited to '')
-rw-r--r--src/decoder/fluidsynth_decoder_plugin.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/decoder/fluidsynth_decoder_plugin.c b/src/decoder/fluidsynth_decoder_plugin.c
index 085f84f14..9e2511d3e 100644
--- a/src/decoder/fluidsynth_decoder_plugin.c
+++ b/src/decoder/fluidsynth_decoder_plugin.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2011 The Music Player Daemon Project
+ * Copyright (C) 2003-2012 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -28,7 +28,6 @@
#include "config.h"
#include "decoder_api.h"
-#include "timer.h"
#include "conf.h"
#include <glib.h>
@@ -102,7 +101,6 @@ fluidsynth_file_decode(struct decoder *decoder, const char *path_fs)
fluid_player_t *player;
char *path_dup;
int ret;
- struct timer *timer;
enum decoder_command cmd;
soundfont_path =
@@ -170,13 +168,6 @@ fluidsynth_file_decode(struct decoder *decoder, const char *path_fs)
return;
}
- /* set up a timer for synchronization; fluidsynth always
- decodes in real time, which forces us to synchronize */
- /* XXX is there any way to switch off real-time decoding? */
-
- timer = timer_new(&audio_format);
- timer_start(timer);
-
/* initialization complete - announce the audio format to the
MPD core */
@@ -186,11 +177,6 @@ fluidsynth_file_decode(struct decoder *decoder, const char *path_fs)
int16_t buffer[2048];
const unsigned max_frames = G_N_ELEMENTS(buffer) / 2;
- /* synchronize with the fluid player */
-
- timer_add(timer, sizeof(buffer));
- timer_sync(timer);
-
/* read samples from fluidsynth and send them to the
MPD core */
@@ -209,8 +195,6 @@ fluidsynth_file_decode(struct decoder *decoder, const char *path_fs)
/* clean up */
- timer_free(timer);
-
fluid_player_stop(player);
fluid_player_join(player);