decoder/fluidsynth: remove throttle (requires libfluidsynth 1.1)
The libfluidsynth API is now sane, and does not require real-time decoding.
This commit is contained in:
parent
dc22846d58
commit
e291f3d257
@ -1070,7 +1070,6 @@ test_dump_playlist_SOURCES = test/dump_playlist.c \
|
|||||||
src/audio_check.c src/pcm_buffer.c \
|
src/audio_check.c src/pcm_buffer.c \
|
||||||
src/text_input_stream.c src/fifo_buffer.c \
|
src/text_input_stream.c src/fifo_buffer.c \
|
||||||
src/cue/cue_parser.c src/cue/cue_parser.h \
|
src/cue/cue_parser.c src/cue/cue_parser.h \
|
||||||
src/timer.c src/clock.c \
|
|
||||||
src/fd_util.c
|
src/fd_util.c
|
||||||
|
|
||||||
if HAVE_FLAC
|
if HAVE_FLAC
|
||||||
@ -1097,7 +1096,6 @@ test_run_decoder_SOURCES = test/run_decoder.c \
|
|||||||
src/fd_util.c \
|
src/fd_util.c \
|
||||||
src/audio_check.c \
|
src/audio_check.c \
|
||||||
src/audio_format.c \
|
src/audio_format.c \
|
||||||
src/timer.c src/clock.c \
|
|
||||||
$(ARCHIVE_SRC) \
|
$(ARCHIVE_SRC) \
|
||||||
$(INPUT_SRC) \
|
$(INPUT_SRC) \
|
||||||
$(TAG_SRC) \
|
$(TAG_SRC) \
|
||||||
@ -1119,7 +1117,6 @@ test_read_tags_SOURCES = test/read_tags.c \
|
|||||||
src/uri.c \
|
src/uri.c \
|
||||||
src/fd_util.c \
|
src/fd_util.c \
|
||||||
src/audio_check.c \
|
src/audio_check.c \
|
||||||
src/timer.c src/clock.c \
|
|
||||||
$(DECODER_SRC)
|
$(DECODER_SRC)
|
||||||
|
|
||||||
if HAVE_ID3TAG
|
if HAVE_ID3TAG
|
||||||
|
2
NEWS
2
NEWS
@ -1,6 +1,8 @@
|
|||||||
ver 0.17.2 (2012/??/??)
|
ver 0.17.2 (2012/??/??)
|
||||||
* protocol:
|
* protocol:
|
||||||
- fix crash in local file check
|
- fix crash in local file check
|
||||||
|
* decoder:
|
||||||
|
- fluidsynth: remove throttle (requires libfluidsynth 1.1)
|
||||||
* output:
|
* output:
|
||||||
- httpd: use monotonic clock, avoid hiccups after system clock adjustment
|
- httpd: use monotonic clock, avoid hiccups after system clock adjustment
|
||||||
- httpd: fix throttling bug after resuming playback
|
- httpd: fix throttling bug after resuming playback
|
||||||
|
@ -845,7 +845,7 @@ enable_flac_encoder=$enable_flac
|
|||||||
|
|
||||||
dnl -------------------------------- FluidSynth -------------------------------
|
dnl -------------------------------- FluidSynth -------------------------------
|
||||||
if test x$enable_fluidsynth = xyes; then
|
if test x$enable_fluidsynth = xyes; then
|
||||||
PKG_CHECK_MODULES(FLUIDSYNTH, [fluidsynth],
|
PKG_CHECK_MODULES(FLUIDSYNTH, [fluidsynth >= 1.1],
|
||||||
AC_DEFINE(ENABLE_FLUIDSYNTH, 1, [Define for fluidsynth support]),
|
AC_DEFINE(ENABLE_FLUIDSYNTH, 1, [Define for fluidsynth support]),
|
||||||
enable_fluidsynth=no)
|
enable_fluidsynth=no)
|
||||||
fi
|
fi
|
||||||
|
@ -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
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -28,7 +28,6 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "decoder_api.h"
|
#include "decoder_api.h"
|
||||||
#include "timer.h"
|
|
||||||
#include "conf.h"
|
#include "conf.h"
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
@ -102,7 +101,6 @@ fluidsynth_file_decode(struct decoder *decoder, const char *path_fs)
|
|||||||
fluid_player_t *player;
|
fluid_player_t *player;
|
||||||
char *path_dup;
|
char *path_dup;
|
||||||
int ret;
|
int ret;
|
||||||
struct timer *timer;
|
|
||||||
enum decoder_command cmd;
|
enum decoder_command cmd;
|
||||||
|
|
||||||
soundfont_path =
|
soundfont_path =
|
||||||
@ -170,13 +168,6 @@ fluidsynth_file_decode(struct decoder *decoder, const char *path_fs)
|
|||||||
return;
|
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
|
/* initialization complete - announce the audio format to the
|
||||||
MPD core */
|
MPD core */
|
||||||
|
|
||||||
@ -186,11 +177,6 @@ fluidsynth_file_decode(struct decoder *decoder, const char *path_fs)
|
|||||||
int16_t buffer[2048];
|
int16_t buffer[2048];
|
||||||
const unsigned max_frames = G_N_ELEMENTS(buffer) / 2;
|
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
|
/* read samples from fluidsynth and send them to the
|
||||||
MPD core */
|
MPD core */
|
||||||
|
|
||||||
@ -209,8 +195,6 @@ fluidsynth_file_decode(struct decoder *decoder, const char *path_fs)
|
|||||||
|
|
||||||
/* clean up */
|
/* clean up */
|
||||||
|
|
||||||
timer_free(timer);
|
|
||||||
|
|
||||||
fluid_player_stop(player);
|
fluid_player_stop(player);
|
||||||
fluid_player_join(player);
|
fluid_player_join(player);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user