[Pkg-mpd-commits] [SCM] Git repository for pkg-mpd branch, master, updated. debian/0.16.2-1-24-g51e4b01

Alexander Wirt formorer at debian.org
Sat Feb 11 19:31:12 UTC 2012


The following commit has been merged in the master branch:
commit 4b067321b72d39fbf243419d4c3034caab285eb7
Author: Alexander Wirt <formorer at debian.org>
Date:   Sat Feb 11 19:16:42 2012 +0100

    Imported Upstream version 0.16.7

diff --git a/Makefile.am b/Makefile.am
index 45dd631..6401e3a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -85,7 +85,6 @@ mpd_headers = \
 	src/encoder_api.h \
 	src/exclude.h \
 	src/fd_util.h \
-	src/fifo_buffer.h \
 	src/glib_compat.h \
 	src/update.h \
 	src/update_internal.h \
@@ -144,7 +143,6 @@ mpd_headers = \
 	src/output/pulse_output_plugin.h \
 	src/output/winmm_output_plugin.h \
 	src/page.h \
-	src/pcm_buffer.h \
 	src/pcm_utils.h \
 	src/pcm_convert.h \
 	src/pcm_volume.h \
@@ -267,7 +265,8 @@ src_mpd_SOURCES = \
 	src/dirvec.c \
 	src/exclude.c \
 	src/fd_util.c \
-	src/fifo_buffer.c \
+	src/fifo_buffer.c src/fifo_buffer.h \
+	src/growing_fifo.c src/growing_fifo.h \
 	src/filter_config.c \
 	src/filter_plugin.c \
 	src/filter_registry.c \
@@ -300,6 +299,7 @@ src_mpd_SOURCES = \
 	src/path.c \
 	src/mapper.c \
 	src/page.c \
+	src/pcm_buffer.c src/pcm_buffer.h \
 	src/pcm_convert.c \
 	src/pcm_volume.c \
 	src/pcm_mix.c \
@@ -928,6 +928,7 @@ test_run_decoder_SOURCES = test/run_decoder.c \
 	src/audio_check.c \
 	src/audio_format.c \
 	src/timer.c \
+	src/pcm_buffer.c \
 	$(ARCHIVE_SRC) \
 	$(INPUT_SRC) \
 	$(TAG_SRC) \
@@ -950,6 +951,7 @@ test_read_tags_SOURCES = test/read_tags.c \
 	src/fd_util.c \
 	src/audio_check.c \
 	src/timer.c \
+	src/pcm_buffer.c \
 	$(ARCHIVE_SRC) \
 	$(INPUT_SRC) \
 	$(TAG_SRC) \
@@ -968,6 +970,7 @@ test_run_filter_SOURCES = test/run_filter.c \
 	src/pcm_format.c src/pcm_channels.c src/pcm_dither.c \
 	src/pcm_pack.c \
 	src/pcm_resample.c src/pcm_resample_fallback.c \
+	src/pcm_buffer.c \
 	src/audio_check.c \
 	src/audio_format.c \
 	src/audio_parser.c \
@@ -990,6 +993,8 @@ test_run_encoder_SOURCES = test/run_encoder.c \
 	src/audio_check.c \
 	src/audio_format.c \
 	src/audio_parser.c \
+	src/pcm_buffer.c \
+	src/fifo_buffer.c src/growing_fifo.c \
 	$(ENCODER_SRC)
 test_run_encoder_CPPFLAGS = $(AM_CPPFLAGS) \
 	$(ENCODER_CFLAGS)
@@ -1019,6 +1024,7 @@ test_run_convert_SOURCES = test/run_convert.c \
 	src/audio_format.c \
 	src/audio_check.c \
 	src/audio_parser.c \
+	src/pcm_buffer.c \
 	src/pcm_channels.c \
 	src/pcm_format.c \
 	src/pcm_pack.c \
@@ -1052,7 +1058,7 @@ test_run_output_SOURCES = test/run_output.c \
 	src/audio_parser.c \
 	src/timer.c \
 	src/tag.c src/tag_pool.c \
-	src/fifo_buffer.c \
+	src/fifo_buffer.c src/growing_fifo.c \
 	src/page.c \
 	src/socket_util.c \
 	src/output_init.c src/output_list.c \
@@ -1069,6 +1075,7 @@ test_run_output_SOURCES = test/run_output.c \
 	src/filter/normalize_filter_plugin.c \
 	src/filter/volume_filter_plugin.c \
 	src/pcm_volume.c \
+	src/pcm_buffer.c \
 	src/AudioCompress/compress.c \
 	src/replay_gain_info.c \
 	src/replay_gain_config.c \
@@ -1087,6 +1094,7 @@ test_read_mixer_SOURCES = test/read_mixer.c \
 	src/filter_plugin.c \
 	src/filter/volume_filter_plugin.c \
 	src/fd_util.c \
+	src/pcm_buffer.c \
 	$(MIXER_SRC)
 
 if ENABLE_BZIP2_TEST
diff --git a/Makefile.in b/Makefile.in
index 3ebc558..fafce47 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -215,38 +215,37 @@ am__src_mpd_SOURCES_DIST = src/check.h src/notify.h src/ack.h \
 	src/directory.h src/directory_save.h src/directory_print.h \
 	src/database.h src/encoder_plugin.h src/encoder_list.h \
 	src/encoder_api.h src/exclude.h src/fd_util.h \
-	src/fifo_buffer.h src/glib_compat.h src/update.h \
-	src/update_internal.h src/inotify_source.h src/inotify_queue.h \
-	src/inotify_update.h src/dirvec.h src/gcc.h src/decoder_list.h \
-	src/decoder_print.h src/decoder/flac_compat.h \
-	src/decoder/flac_metadata.h src/decoder/flac_pcm.h \
-	src/decoder/_flac_common.h src/decoder/_ogg_common.h \
-	src/input_init.h src/input_plugin.h src/input_registry.h \
-	src/input_stream.h src/input/file_input_plugin.h \
-	src/input/ffmpeg_input_plugin.h src/input/curl_input_plugin.h \
-	src/input/rewind_input_plugin.h src/input/mms_input_plugin.h \
-	src/text_file.h src/text_input_stream.h src/icy_server.h \
-	src/icy_metadata.h src/client.h src/client_internal.h \
-	src/server_socket.h src/listen.h src/log.h src/ls.h src/main.h \
-	src/mixer_all.h src/mixer_api.h src/mixer_control.h \
-	src/mixer_list.h src/event_pipe.h src/mixer_plugin.h \
-	src/mixer_type.h src/mixer/software_mixer_plugin.h \
+	src/glib_compat.h src/update.h src/update_internal.h \
+	src/inotify_source.h src/inotify_queue.h src/inotify_update.h \
+	src/dirvec.h src/gcc.h src/decoder_list.h src/decoder_print.h \
+	src/decoder/flac_compat.h src/decoder/flac_metadata.h \
+	src/decoder/flac_pcm.h src/decoder/_flac_common.h \
+	src/decoder/_ogg_common.h src/input_init.h src/input_plugin.h \
+	src/input_registry.h src/input_stream.h \
+	src/input/file_input_plugin.h src/input/ffmpeg_input_plugin.h \
+	src/input/curl_input_plugin.h src/input/rewind_input_plugin.h \
+	src/input/mms_input_plugin.h src/text_file.h \
+	src/text_input_stream.h src/icy_server.h src/icy_metadata.h \
+	src/client.h src/client_internal.h src/server_socket.h \
+	src/listen.h src/log.h src/ls.h src/main.h src/mixer_all.h \
+	src/mixer_api.h src/mixer_control.h src/mixer_list.h \
+	src/event_pipe.h src/mixer_plugin.h src/mixer_type.h \
+	src/mixer/software_mixer_plugin.h \
 	src/mixer/pulse_mixer_plugin.h src/daemon.h \
 	src/AudioCompress/config.h src/AudioCompress/compress.h \
 	src/buffer.h src/pipe.h src/chunk.h src/path.h src/mapper.h \
 	src/open.h src/output/httpd_client.h \
 	src/output/httpd_internal.h src/output/pulse_output_plugin.h \
-	src/output/winmm_output_plugin.h src/page.h src/pcm_buffer.h \
-	src/pcm_utils.h src/pcm_convert.h src/pcm_volume.h \
-	src/pcm_mix.h src/pcm_byteswap.h src/pcm_channels.h \
-	src/pcm_format.h src/pcm_resample.h \
-	src/pcm_resample_internal.h src/pcm_dither.h src/pcm_pack.h \
-	src/pcm_prng.h src/permission.h src/player_thread.h \
-	src/player_control.h src/playlist.h src/playlist_internal.h \
-	src/playlist_print.h src/playlist_save.h src/playlist_state.h \
-	src/playlist_plugin.h src/playlist_list.h \
-	src/playlist_mapper.h src/playlist_any.h src/playlist_song.h \
-	src/playlist_queue.h src/playlist_vector.h \
+	src/output/winmm_output_plugin.h src/page.h src/pcm_utils.h \
+	src/pcm_convert.h src/pcm_volume.h src/pcm_mix.h \
+	src/pcm_byteswap.h src/pcm_channels.h src/pcm_format.h \
+	src/pcm_resample.h src/pcm_resample_internal.h \
+	src/pcm_dither.h src/pcm_pack.h src/pcm_prng.h \
+	src/permission.h src/player_thread.h src/player_control.h \
+	src/playlist.h src/playlist_internal.h src/playlist_print.h \
+	src/playlist_save.h src/playlist_state.h src/playlist_plugin.h \
+	src/playlist_list.h src/playlist_mapper.h src/playlist_any.h \
+	src/playlist_song.h src/playlist_queue.h src/playlist_vector.h \
 	src/playlist_database.h src/playlist/extm3u_playlist_plugin.h \
 	src/playlist/m3u_playlist_plugin.h \
 	src/playlist/pls_playlist_plugin.h \
@@ -348,6 +347,7 @@ am__src_mpd_SOURCES_DIST = src/check.h src/notify.h src/ack.h \
 	src/decoder_print.c src/directory.c src/directory_save.c \
 	src/directory_print.c src/database.c src/dirvec.c \
 	src/exclude.c src/fd_util.c src/fifo_buffer.c \
+	src/fifo_buffer.h src/growing_fifo.c src/growing_fifo.h \
 	src/filter_config.c src/filter_plugin.c src/filter_registry.c \
 	src/update.c src/update_queue.c src/update_walk.c \
 	src/update_remove.c src/client.c src/client_event.c \
@@ -357,17 +357,18 @@ am__src_mpd_SOURCES_DIST = src/check.h src/notify.h src/ack.h \
 	src/listen.c src/log.c src/ls.c src/main.c src/main_win32.c \
 	src/event_pipe.c src/daemon.c src/AudioCompress/compress.c \
 	src/buffer.c src/pipe.c src/chunk.c src/path.c src/mapper.c \
-	src/page.c src/pcm_convert.c src/pcm_volume.c src/pcm_mix.c \
-	src/pcm_byteswap.c src/pcm_channels.c src/pcm_pack.c \
-	src/pcm_format.c src/pcm_resample.c \
-	src/pcm_resample_fallback.c src/pcm_dither.c src/permission.c \
-	src/player_thread.c src/player_control.c src/playlist.c \
-	src/playlist_global.c src/playlist_control.c \
-	src/playlist_edit.c src/playlist_print.c src/playlist_save.c \
-	src/playlist_mapper.c src/playlist_any.c src/playlist_song.c \
-	src/playlist_state.c src/playlist_queue.c \
-	src/playlist_vector.c src/playlist_database.c src/queue.c \
-	src/queue_print.c src/queue_save.c src/replay_gain_config.c \
+	src/page.c src/pcm_buffer.c src/pcm_buffer.h src/pcm_convert.c \
+	src/pcm_volume.c src/pcm_mix.c src/pcm_byteswap.c \
+	src/pcm_channels.c src/pcm_pack.c src/pcm_format.c \
+	src/pcm_resample.c src/pcm_resample_fallback.c \
+	src/pcm_dither.c src/permission.c src/player_thread.c \
+	src/player_control.c src/playlist.c src/playlist_global.c \
+	src/playlist_control.c src/playlist_edit.c \
+	src/playlist_print.c src/playlist_save.c src/playlist_mapper.c \
+	src/playlist_any.c src/playlist_song.c src/playlist_state.c \
+	src/playlist_queue.c src/playlist_vector.c \
+	src/playlist_database.c src/queue.c src/queue_print.c \
+	src/queue_save.c src/replay_gain_config.c \
 	src/replay_gain_info.c src/sig_handlers.c src/song.c \
 	src/song_update.c src/song_print.c src/song_save.c \
 	src/songvec.c src/socket_util.c src/state_file.c src/stats.c \
@@ -556,6 +557,7 @@ am_src_mpd_OBJECTS = $(am__objects_1) $(am__objects_6) \
 	src/src_mpd-database.$(OBJEXT) src/src_mpd-dirvec.$(OBJEXT) \
 	src/src_mpd-exclude.$(OBJEXT) src/src_mpd-fd_util.$(OBJEXT) \
 	src/src_mpd-fifo_buffer.$(OBJEXT) \
+	src/src_mpd-growing_fifo.$(OBJEXT) \
 	src/src_mpd-filter_config.$(OBJEXT) \
 	src/src_mpd-filter_plugin.$(OBJEXT) \
 	src/src_mpd-filter_registry.$(OBJEXT) \
@@ -582,6 +584,7 @@ am_src_mpd_OBJECTS = $(am__objects_1) $(am__objects_6) \
 	src/src_mpd-buffer.$(OBJEXT) src/src_mpd-pipe.$(OBJEXT) \
 	src/src_mpd-chunk.$(OBJEXT) src/src_mpd-path.$(OBJEXT) \
 	src/src_mpd-mapper.$(OBJEXT) src/src_mpd-page.$(OBJEXT) \
+	src/src_mpd-pcm_buffer.$(OBJEXT) \
 	src/src_mpd-pcm_convert.$(OBJEXT) \
 	src/src_mpd-pcm_volume.$(OBJEXT) src/src_mpd-pcm_mix.$(OBJEXT) \
 	src/src_mpd-pcm_byteswap.$(OBJEXT) \
@@ -748,7 +751,7 @@ am__test_read_mixer_SOURCES_DIST = test/read_mixer.c src/conf.c \
 	src/tokenizer.c src/utils.c src/log.c src/mixer_control.c \
 	src/mixer_api.c src/filter_plugin.c \
 	src/filter/volume_filter_plugin.c src/fd_util.c \
-	src/mixer/software_mixer_plugin.c \
+	src/pcm_buffer.c src/mixer/software_mixer_plugin.c \
 	src/mixer/alsa_mixer_plugin.c src/mixer/oss_mixer_plugin.c \
 	src/mixer/pulse_mixer_plugin.c src/mixer/winmm_mixer_plugin.c
 @HAVE_ALSA_TRUE at am__objects_91 = src/mixer/test_read_mixer-alsa_mixer_plugin.$(OBJEXT)
@@ -770,6 +773,7 @@ am__objects_95 =  \
 @ENABLE_TEST_TRUE@	src/test_read_mixer-filter_plugin.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/filter/test_read_mixer-volume_filter_plugin.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_read_mixer-fd_util.$(OBJEXT) \
+ at ENABLE_TEST_TRUE@	src/test_read_mixer-pcm_buffer.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	$(am__objects_95)
 test_read_mixer_OBJECTS = $(am_test_read_mixer_OBJECTS)
 @ENABLE_TEST_TRUE at test_read_mixer_DEPENDENCIES =  \
@@ -778,7 +782,8 @@ test_read_mixer_OBJECTS = $(am_test_read_mixer_OBJECTS)
 am__test_read_tags_SOURCES_DIST = test/read_tags.c src/conf.c \
 	src/tokenizer.c src/utils.c src/log.c src/tag.c src/tag_pool.c \
 	src/replay_gain_info.c src/uri.c src/fd_util.c \
-	src/audio_check.c src/timer.c src/archive/bz2_archive_plugin.c \
+	src/audio_check.c src/timer.c src/pcm_buffer.c \
+	src/archive/bz2_archive_plugin.c \
 	src/archive/zzip_archive_plugin.c \
 	src/archive/iso9660_archive_plugin.c src/archive_api.c \
 	src/archive_list.c src/archive_plugin.c \
@@ -882,6 +887,7 @@ am__objects_127 = src/test_read_tags-decoder_buffer.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_read_tags-fd_util.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_read_tags-audio_check.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_read_tags-timer.$(OBJEXT) \
+ at ENABLE_TEST_TRUE@	src/test_read_tags-pcm_buffer.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	$(am__objects_100) $(am__objects_104) \
 @ENABLE_TEST_TRUE@	$(am__objects_106) $(am__objects_127)
 test_read_tags_OBJECTS = $(am_test_read_tags_OBJECTS)
@@ -891,10 +897,11 @@ test_read_tags_OBJECTS = $(am_test_read_tags_OBJECTS)
 @ENABLE_TEST_TRUE@	$(am__DEPENDENCIES_1)
 am__test_run_convert_SOURCES_DIST = test/run_convert.c \
 	src/fifo_buffer.c src/audio_format.c src/audio_check.c \
-	src/audio_parser.c src/pcm_channels.c src/pcm_format.c \
-	src/pcm_pack.c src/pcm_dither.c src/pcm_byteswap.c \
-	src/pcm_resample.c src/pcm_resample_fallback.c \
-	src/pcm_convert.c src/pcm_resample_libsamplerate.c
+	src/audio_parser.c src/pcm_buffer.c src/pcm_channels.c \
+	src/pcm_format.c src/pcm_pack.c src/pcm_dither.c \
+	src/pcm_byteswap.c src/pcm_resample.c \
+	src/pcm_resample_fallback.c src/pcm_convert.c \
+	src/pcm_resample_libsamplerate.c
 @ENABLE_TEST_TRUE@@HAVE_LIBSAMPLERATE_TRUE at am__objects_128 = src/test_run_convert-pcm_resample_libsamplerate.$(OBJEXT)
 @ENABLE_TEST_TRUE at am_test_run_convert_OBJECTS =  \
 @ENABLE_TEST_TRUE@	test/test_run_convert-run_convert.$(OBJEXT) \
@@ -902,6 +909,7 @@ am__test_run_convert_SOURCES_DIST = test/run_convert.c \
 @ENABLE_TEST_TRUE@	src/test_run_convert-audio_format.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_run_convert-audio_check.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_run_convert-audio_parser.$(OBJEXT) \
+ at ENABLE_TEST_TRUE@	src/test_run_convert-pcm_buffer.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_run_convert-pcm_channels.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_run_convert-pcm_format.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_run_convert-pcm_pack.$(OBJEXT) \
@@ -918,7 +926,7 @@ am__test_run_decoder_SOURCES_DIST = test/run_decoder.c test/stdbin.h \
 	src/conf.c src/tokenizer.c src/utils.c src/log.c src/tag.c \
 	src/tag_pool.c src/replay_gain_info.c src/uri.c src/fd_util.c \
 	src/audio_check.c src/audio_format.c src/timer.c \
-	src/archive/bz2_archive_plugin.c \
+	src/pcm_buffer.c src/archive/bz2_archive_plugin.c \
 	src/archive/zzip_archive_plugin.c \
 	src/archive/iso9660_archive_plugin.c src/archive_api.c \
 	src/archive_list.c src/archive_plugin.c \
@@ -1022,6 +1030,7 @@ am__objects_160 = src/test_run_decoder-decoder_buffer.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_run_decoder-audio_check.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_run_decoder-audio_format.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_run_decoder-timer.$(OBJEXT) \
+ at ENABLE_TEST_TRUE@	src/test_run_decoder-pcm_buffer.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	$(am__objects_133) $(am__objects_137) \
 @ENABLE_TEST_TRUE@	$(am__objects_139) $(am__objects_160)
 test_run_decoder_OBJECTS = $(am_test_run_decoder_OBJECTS)
@@ -1032,7 +1041,8 @@ test_run_decoder_OBJECTS = $(am_test_run_decoder_OBJECTS)
 am__test_run_encoder_SOURCES_DIST = test/run_encoder.c test/stdbin.h \
 	src/conf.c src/tokenizer.c src/utils.c src/tag.c \
 	src/tag_pool.c src/audio_check.c src/audio_format.c \
-	src/audio_parser.c src/encoder_list.c \
+	src/audio_parser.c src/pcm_buffer.c src/fifo_buffer.c \
+	src/growing_fifo.c src/encoder_list.c \
 	src/encoder/null_encoder.c src/encoder/wave_encoder.c \
 	src/encoder/vorbis_encoder.c src/encoder/lame_encoder.c \
 	src/encoder/twolame_encoder.c src/encoder/flac_encoder.c
@@ -1055,6 +1065,9 @@ am__objects_167 = $(am__objects_161) $(am__objects_162) \
 @ENABLE_ENCODER_TRUE@@ENABLE_TEST_TRUE@	src/test_run_encoder-audio_check.$(OBJEXT) \
 @ENABLE_ENCODER_TRUE@@ENABLE_TEST_TRUE@	src/test_run_encoder-audio_format.$(OBJEXT) \
 @ENABLE_ENCODER_TRUE@@ENABLE_TEST_TRUE@	src/test_run_encoder-audio_parser.$(OBJEXT) \
+ at ENABLE_ENCODER_TRUE@@ENABLE_TEST_TRUE@	src/test_run_encoder-pcm_buffer.$(OBJEXT) \
+ at ENABLE_ENCODER_TRUE@@ENABLE_TEST_TRUE@	src/test_run_encoder-fifo_buffer.$(OBJEXT) \
+ at ENABLE_ENCODER_TRUE@@ENABLE_TEST_TRUE@	src/test_run_encoder-growing_fifo.$(OBJEXT) \
 @ENABLE_ENCODER_TRUE@@ENABLE_TEST_TRUE@	$(am__objects_167)
 test_run_encoder_OBJECTS = $(am_test_run_encoder_OBJECTS)
 @ENABLE_ENCODER_TRUE@@ENABLE_TEST_TRUE at test_run_encoder_DEPENDENCIES =  \
@@ -1066,7 +1079,7 @@ am__test_run_filter_SOURCES_DIST = test/run_filter.c test/stdbin.h \
 	src/tokenizer.c src/utils.c src/pcm_volume.c src/pcm_convert.c \
 	src/pcm_byteswap.c src/pcm_format.c src/pcm_channels.c \
 	src/pcm_dither.c src/pcm_pack.c src/pcm_resample.c \
-	src/pcm_resample_fallback.c src/audio_check.c \
+	src/pcm_resample_fallback.c src/pcm_buffer.c src/audio_check.c \
 	src/audio_format.c src/audio_parser.c src/replay_gain_config.c \
 	src/replay_gain_info.c src/AudioCompress/compress.c \
 	src/filter/null_filter_plugin.c \
@@ -1104,6 +1117,7 @@ am__objects_168 =  \
 @ENABLE_TEST_TRUE@	src/test_run_filter-pcm_pack.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_run_filter-pcm_resample.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_run_filter-pcm_resample_fallback.$(OBJEXT) \
+ at ENABLE_TEST_TRUE@	src/test_run_filter-pcm_buffer.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_run_filter-audio_check.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_run_filter-audio_format.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_run_filter-audio_parser.$(OBJEXT) \
@@ -1185,8 +1199,8 @@ am__test_run_output_SOURCES_DIST = test/run_output.c test/stdbin.h \
 	src/conf.c src/tokenizer.c src/utils.c src/log.c \
 	src/audio_check.c src/audio_format.c src/audio_parser.c \
 	src/timer.c src/tag.c src/tag_pool.c src/fifo_buffer.c \
-	src/page.c src/socket_util.c src/output_init.c \
-	src/output_list.c src/encoder_list.c \
+	src/growing_fifo.c src/page.c src/socket_util.c \
+	src/output_init.c src/output_list.c src/encoder_list.c \
 	src/encoder/null_encoder.c src/encoder/wave_encoder.c \
 	src/encoder/vorbis_encoder.c src/encoder/lame_encoder.c \
 	src/encoder/twolame_encoder.c src/encoder/flac_encoder.c \
@@ -1200,11 +1214,11 @@ am__test_run_output_SOURCES_DIST = test/run_output.c test/stdbin.h \
 	src/filter/replay_gain_filter_plugin.c \
 	src/filter/normalize_filter_plugin.c \
 	src/filter/volume_filter_plugin.c src/pcm_volume.c \
-	src/AudioCompress/compress.c src/replay_gain_info.c \
-	src/replay_gain_config.c src/fd_util.c src/server_socket.c \
-	src/output/null_plugin.c src/output/alsa_plugin.c \
-	src/output/ffado_output_plugin.c src/output/ao_plugin.c \
-	src/output/fifo_output_plugin.c \
+	src/pcm_buffer.c src/AudioCompress/compress.c \
+	src/replay_gain_info.c src/replay_gain_config.c src/fd_util.c \
+	src/server_socket.c src/output/null_plugin.c \
+	src/output/alsa_plugin.c src/output/ffado_output_plugin.c \
+	src/output/ao_plugin.c src/output/fifo_output_plugin.c \
 	src/output/pipe_output_plugin.c \
 	src/output/jack_output_plugin.c src/output/mvp_plugin.c \
 	src/output/oss_plugin.c src/output/openal_plugin.c \
@@ -1271,6 +1285,7 @@ am__objects_207 = src/output/test_run_output-null_plugin.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_run_output-tag.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_run_output-tag_pool.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_run_output-fifo_buffer.$(OBJEXT) \
+ at ENABLE_TEST_TRUE@	src/test_run_output-growing_fifo.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_run_output-page.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_run_output-socket_util.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_run_output-output_init.$(OBJEXT) \
@@ -1289,6 +1304,7 @@ am__objects_207 = src/output/test_run_output-null_plugin.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/filter/test_run_output-normalize_filter_plugin.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/filter/test_run_output-volume_filter_plugin.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_run_output-pcm_volume.$(OBJEXT) \
+ at ENABLE_TEST_TRUE@	src/test_run_output-pcm_buffer.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/AudioCompress/test_run_output-compress.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_run_output-replay_gain_info.$(OBJEXT) \
 @ENABLE_TEST_TRUE@	src/test_run_output-replay_gain_config.$(OBJEXT) \
@@ -1659,7 +1675,6 @@ mpd_headers = \
 	src/encoder_api.h \
 	src/exclude.h \
 	src/fd_util.h \
-	src/fifo_buffer.h \
 	src/glib_compat.h \
 	src/update.h \
 	src/update_internal.h \
@@ -1718,7 +1733,6 @@ mpd_headers = \
 	src/output/pulse_output_plugin.h \
 	src/output/winmm_output_plugin.h \
 	src/page.h \
-	src/pcm_buffer.h \
 	src/pcm_utils.h \
 	src/pcm_convert.h \
 	src/pcm_volume.h \
@@ -1817,6 +1831,7 @@ src_mpd_SOURCES = $(mpd_headers) $(ARCHIVE_SRC) $(INPUT_SRC) \
 	src/decoder_print.c src/directory.c src/directory_save.c \
 	src/directory_print.c src/database.c src/dirvec.c \
 	src/exclude.c src/fd_util.c src/fifo_buffer.c \
+	src/fifo_buffer.h src/growing_fifo.c src/growing_fifo.h \
 	src/filter_config.c src/filter_plugin.c src/filter_registry.c \
 	src/update.c src/update_queue.c src/update_walk.c \
 	src/update_remove.c src/client.c src/client_event.c \
@@ -1826,17 +1841,18 @@ src_mpd_SOURCES = $(mpd_headers) $(ARCHIVE_SRC) $(INPUT_SRC) \
 	src/listen.c src/log.c src/ls.c src/main.c src/main_win32.c \
 	src/event_pipe.c src/daemon.c src/AudioCompress/compress.c \
 	src/buffer.c src/pipe.c src/chunk.c src/path.c src/mapper.c \
-	src/page.c src/pcm_convert.c src/pcm_volume.c src/pcm_mix.c \
-	src/pcm_byteswap.c src/pcm_channels.c src/pcm_pack.c \
-	src/pcm_format.c src/pcm_resample.c \
-	src/pcm_resample_fallback.c src/pcm_dither.c src/permission.c \
-	src/player_thread.c src/player_control.c src/playlist.c \
-	src/playlist_global.c src/playlist_control.c \
-	src/playlist_edit.c src/playlist_print.c src/playlist_save.c \
-	src/playlist_mapper.c src/playlist_any.c src/playlist_song.c \
-	src/playlist_state.c src/playlist_queue.c \
-	src/playlist_vector.c src/playlist_database.c src/queue.c \
-	src/queue_print.c src/queue_save.c src/replay_gain_config.c \
+	src/page.c src/pcm_buffer.c src/pcm_buffer.h src/pcm_convert.c \
+	src/pcm_volume.c src/pcm_mix.c src/pcm_byteswap.c \
+	src/pcm_channels.c src/pcm_pack.c src/pcm_format.c \
+	src/pcm_resample.c src/pcm_resample_fallback.c \
+	src/pcm_dither.c src/permission.c src/player_thread.c \
+	src/player_control.c src/playlist.c src/playlist_global.c \
+	src/playlist_control.c src/playlist_edit.c \
+	src/playlist_print.c src/playlist_save.c src/playlist_mapper.c \
+	src/playlist_any.c src/playlist_song.c src/playlist_state.c \
+	src/playlist_queue.c src/playlist_vector.c \
+	src/playlist_database.c src/queue.c src/queue_print.c \
+	src/queue_save.c src/replay_gain_config.c \
 	src/replay_gain_info.c src/sig_handlers.c src/song.c \
 	src/song_update.c src/song_print.c src/song_save.c \
 	src/songvec.c src/socket_util.c src/state_file.c src/stats.c \
@@ -2104,6 +2120,7 @@ SPARSE_CPPFLAGS = $(DEFAULT_INCLUDES) -I$(shell $(CC) \
 @ENABLE_TEST_TRUE@	src/audio_check.c \
 @ENABLE_TEST_TRUE@	src/audio_format.c \
 @ENABLE_TEST_TRUE@	src/timer.c \
+ at ENABLE_TEST_TRUE@	src/pcm_buffer.c \
 @ENABLE_TEST_TRUE@	$(ARCHIVE_SRC) \
 @ENABLE_TEST_TRUE@	$(INPUT_SRC) \
 @ENABLE_TEST_TRUE@	$(TAG_SRC) \
@@ -2128,6 +2145,7 @@ SPARSE_CPPFLAGS = $(DEFAULT_INCLUDES) -I$(shell $(CC) \
 @ENABLE_TEST_TRUE@	src/fd_util.c \
 @ENABLE_TEST_TRUE@	src/audio_check.c \
 @ENABLE_TEST_TRUE@	src/timer.c \
+ at ENABLE_TEST_TRUE@	src/pcm_buffer.c \
 @ENABLE_TEST_TRUE@	$(ARCHIVE_SRC) \
 @ENABLE_TEST_TRUE@	$(INPUT_SRC) \
 @ENABLE_TEST_TRUE@	$(TAG_SRC) \
@@ -2146,7 +2164,7 @@ SPARSE_CPPFLAGS = $(DEFAULT_INCLUDES) -I$(shell $(CC) \
 @ENABLE_TEST_TRUE@	src/pcm_format.c src/pcm_channels.c \
 @ENABLE_TEST_TRUE@	src/pcm_dither.c src/pcm_pack.c \
 @ENABLE_TEST_TRUE@	src/pcm_resample.c \
- at ENABLE_TEST_TRUE@	src/pcm_resample_fallback.c \
+ at ENABLE_TEST_TRUE@	src/pcm_resample_fallback.c src/pcm_buffer.c \
 @ENABLE_TEST_TRUE@	src/audio_check.c src/audio_format.c \
 @ENABLE_TEST_TRUE@	src/audio_parser.c src/replay_gain_config.c \
 @ENABLE_TEST_TRUE@	src/replay_gain_info.c \
@@ -2160,6 +2178,8 @@ SPARSE_CPPFLAGS = $(DEFAULT_INCLUDES) -I$(shell $(CC) \
 @ENABLE_ENCODER_TRUE@@ENABLE_TEST_TRUE@	src/audio_check.c \
 @ENABLE_ENCODER_TRUE@@ENABLE_TEST_TRUE@	src/audio_format.c \
 @ENABLE_ENCODER_TRUE@@ENABLE_TEST_TRUE@	src/audio_parser.c \
+ at ENABLE_ENCODER_TRUE@@ENABLE_TEST_TRUE@	src/pcm_buffer.c \
+ at ENABLE_ENCODER_TRUE@@ENABLE_TEST_TRUE@	src/fifo_buffer.c src/growing_fifo.c \
 @ENABLE_ENCODER_TRUE@@ENABLE_TEST_TRUE@	$(ENCODER_SRC)
 
 @ENABLE_ENCODER_TRUE@@ENABLE_TEST_TRUE at test_run_encoder_CPPFLAGS = $(AM_CPPFLAGS) \
@@ -2190,9 +2210,10 @@ SPARSE_CPPFLAGS = $(DEFAULT_INCLUDES) -I$(shell $(CC) \
 @ENABLE_TEST_TRUE at test_run_convert_SOURCES = test/run_convert.c \
 @ENABLE_TEST_TRUE@	src/fifo_buffer.c src/audio_format.c \
 @ENABLE_TEST_TRUE@	src/audio_check.c src/audio_parser.c \
- at ENABLE_TEST_TRUE@	src/pcm_channels.c src/pcm_format.c \
- at ENABLE_TEST_TRUE@	src/pcm_pack.c src/pcm_dither.c \
- at ENABLE_TEST_TRUE@	src/pcm_byteswap.c src/pcm_resample.c \
+ at ENABLE_TEST_TRUE@	src/pcm_buffer.c src/pcm_channels.c \
+ at ENABLE_TEST_TRUE@	src/pcm_format.c src/pcm_pack.c \
+ at ENABLE_TEST_TRUE@	src/pcm_dither.c src/pcm_byteswap.c \
+ at ENABLE_TEST_TRUE@	src/pcm_resample.c \
 @ENABLE_TEST_TRUE@	src/pcm_resample_fallback.c \
 @ENABLE_TEST_TRUE@	src/pcm_convert.c $(am__append_71)
 @ENABLE_TEST_TRUE at test_run_convert_CPPFLAGS = $(AM_CPPFLAGS) $(SAMPLERATE_CFLAGS)
@@ -2218,7 +2239,7 @@ SPARSE_CPPFLAGS = $(DEFAULT_INCLUDES) -I$(shell $(CC) \
 @ENABLE_TEST_TRUE@	src/audio_parser.c \
 @ENABLE_TEST_TRUE@	src/timer.c \
 @ENABLE_TEST_TRUE@	src/tag.c src/tag_pool.c \
- at ENABLE_TEST_TRUE@	src/fifo_buffer.c \
+ at ENABLE_TEST_TRUE@	src/fifo_buffer.c src/growing_fifo.c \
 @ENABLE_TEST_TRUE@	src/page.c \
 @ENABLE_TEST_TRUE@	src/socket_util.c \
 @ENABLE_TEST_TRUE@	src/output_init.c src/output_list.c \
@@ -2235,6 +2256,7 @@ SPARSE_CPPFLAGS = $(DEFAULT_INCLUDES) -I$(shell $(CC) \
 @ENABLE_TEST_TRUE@	src/filter/normalize_filter_plugin.c \
 @ENABLE_TEST_TRUE@	src/filter/volume_filter_plugin.c \
 @ENABLE_TEST_TRUE@	src/pcm_volume.c \
+ at ENABLE_TEST_TRUE@	src/pcm_buffer.c \
 @ENABLE_TEST_TRUE@	src/AudioCompress/compress.c \
 @ENABLE_TEST_TRUE@	src/replay_gain_info.c \
 @ENABLE_TEST_TRUE@	src/replay_gain_config.c \
@@ -2255,6 +2277,7 @@ SPARSE_CPPFLAGS = $(DEFAULT_INCLUDES) -I$(shell $(CC) \
 @ENABLE_TEST_TRUE@	src/filter_plugin.c \
 @ENABLE_TEST_TRUE@	src/filter/volume_filter_plugin.c \
 @ENABLE_TEST_TRUE@	src/fd_util.c \
+ at ENABLE_TEST_TRUE@	src/pcm_buffer.c \
 @ENABLE_TEST_TRUE@	$(MIXER_SRC)
 
 @ENABLE_INOTIFY_TRUE@@ENABLE_TEST_TRUE at test_run_inotify_SOURCES = test/run_inotify.c \
@@ -2776,6 +2799,8 @@ src/src_mpd-fd_util.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
 src/src_mpd-fifo_buffer.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
+src/src_mpd-growing_fifo.$(OBJEXT): src/$(am__dirstamp) \
+	src/$(DEPDIR)/$(am__dirstamp)
 src/src_mpd-filter_config.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
 src/src_mpd-filter_plugin.$(OBJEXT): src/$(am__dirstamp) \
@@ -2847,6 +2872,8 @@ src/src_mpd-mapper.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
 src/src_mpd-page.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
+src/src_mpd-pcm_buffer.$(OBJEXT): src/$(am__dirstamp) \
+	src/$(DEPDIR)/$(am__dirstamp)
 src/src_mpd-pcm_convert.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
 src/src_mpd-pcm_volume.$(OBJEXT): src/$(am__dirstamp) \
@@ -3114,6 +3141,8 @@ src/filter/test_read_mixer-volume_filter_plugin.$(OBJEXT):  \
 	src/filter/$(DEPDIR)/$(am__dirstamp)
 src/test_read_mixer-fd_util.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
+src/test_read_mixer-pcm_buffer.$(OBJEXT): src/$(am__dirstamp) \
+	src/$(DEPDIR)/$(am__dirstamp)
 src/mixer/test_read_mixer-software_mixer_plugin.$(OBJEXT):  \
 	src/mixer/$(am__dirstamp) src/mixer/$(DEPDIR)/$(am__dirstamp)
 src/mixer/test_read_mixer-alsa_mixer_plugin.$(OBJEXT):  \
@@ -3151,6 +3180,8 @@ src/test_read_tags-audio_check.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
 src/test_read_tags-timer.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
+src/test_read_tags-pcm_buffer.$(OBJEXT): src/$(am__dirstamp) \
+	src/$(DEPDIR)/$(am__dirstamp)
 src/archive/test_read_tags-bz2_archive_plugin.$(OBJEXT):  \
 	src/archive/$(am__dirstamp) \
 	src/archive/$(DEPDIR)/$(am__dirstamp)
@@ -3284,6 +3315,8 @@ src/test_run_convert-audio_check.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
 src/test_run_convert-audio_parser.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
+src/test_run_convert-pcm_buffer.$(OBJEXT): src/$(am__dirstamp) \
+	src/$(DEPDIR)/$(am__dirstamp)
 src/test_run_convert-pcm_channels.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
 src/test_run_convert-pcm_format.$(OBJEXT): src/$(am__dirstamp) \
@@ -3331,6 +3364,8 @@ src/test_run_decoder-audio_format.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
 src/test_run_decoder-timer.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
+src/test_run_decoder-pcm_buffer.$(OBJEXT): src/$(am__dirstamp) \
+	src/$(DEPDIR)/$(am__dirstamp)
 src/archive/test_run_decoder-bz2_archive_plugin.$(OBJEXT):  \
 	src/archive/$(am__dirstamp) \
 	src/archive/$(DEPDIR)/$(am__dirstamp)
@@ -3472,6 +3507,12 @@ src/test_run_encoder-audio_format.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
 src/test_run_encoder-audio_parser.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
+src/test_run_encoder-pcm_buffer.$(OBJEXT): src/$(am__dirstamp) \
+	src/$(DEPDIR)/$(am__dirstamp)
+src/test_run_encoder-fifo_buffer.$(OBJEXT): src/$(am__dirstamp) \
+	src/$(DEPDIR)/$(am__dirstamp)
+src/test_run_encoder-growing_fifo.$(OBJEXT): src/$(am__dirstamp) \
+	src/$(DEPDIR)/$(am__dirstamp)
 src/test_run_encoder-encoder_list.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
 src/encoder/test_run_encoder-null_encoder.$(OBJEXT):  \
@@ -3525,6 +3566,8 @@ src/test_run_filter-pcm_resample.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
 src/test_run_filter-pcm_resample_fallback.$(OBJEXT):  \
 	src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
+src/test_run_filter-pcm_buffer.$(OBJEXT): src/$(am__dirstamp) \
+	src/$(DEPDIR)/$(am__dirstamp)
 src/test_run_filter-audio_check.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
 src/test_run_filter-audio_format.$(OBJEXT): src/$(am__dirstamp) \
@@ -3668,6 +3711,8 @@ src/test_run_output-tag_pool.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
 src/test_run_output-fifo_buffer.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
+src/test_run_output-growing_fifo.$(OBJEXT): src/$(am__dirstamp) \
+	src/$(DEPDIR)/$(am__dirstamp)
 src/test_run_output-page.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
 src/test_run_output-socket_util.$(OBJEXT): src/$(am__dirstamp) \
@@ -3736,6 +3781,8 @@ src/filter/test_run_output-volume_filter_plugin.$(OBJEXT):  \
 	src/filter/$(DEPDIR)/$(am__dirstamp)
 src/test_run_output-pcm_volume.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
+src/test_run_output-pcm_buffer.$(OBJEXT): src/$(am__dirstamp) \
+	src/$(DEPDIR)/$(am__dirstamp)
 src/AudioCompress/test_run_output-compress.$(OBJEXT):  \
 	src/AudioCompress/$(am__dirstamp) \
 	src/AudioCompress/$(DEPDIR)/$(am__dirstamp)
@@ -4098,6 +4145,7 @@ mostlyclean-compile:
 	-rm -f src/src_mpd-filter_config.$(OBJEXT)
 	-rm -f src/src_mpd-filter_plugin.$(OBJEXT)
 	-rm -f src/src_mpd-filter_registry.$(OBJEXT)
+	-rm -f src/src_mpd-growing_fifo.$(OBJEXT)
 	-rm -f src/src_mpd-icy_metadata.$(OBJEXT)
 	-rm -f src/src_mpd-icy_server.$(OBJEXT)
 	-rm -f src/src_mpd-idle.$(OBJEXT)
@@ -4129,6 +4177,7 @@ mostlyclean-compile:
 	-rm -f src/src_mpd-output_thread.$(OBJEXT)
 	-rm -f src/src_mpd-page.$(OBJEXT)
 	-rm -f src/src_mpd-path.$(OBJEXT)
+	-rm -f src/src_mpd-pcm_buffer.$(OBJEXT)
 	-rm -f src/src_mpd-pcm_byteswap.$(OBJEXT)
 	-rm -f src/src_mpd-pcm_channels.$(OBJEXT)
 	-rm -f src/src_mpd-pcm_convert.$(OBJEXT)
@@ -4230,6 +4279,7 @@ mostlyclean-compile:
 	-rm -f src/test_read_mixer-log.$(OBJEXT)
 	-rm -f src/test_read_mixer-mixer_api.$(OBJEXT)
 	-rm -f src/test_read_mixer-mixer_control.$(OBJEXT)
+	-rm -f src/test_read_mixer-pcm_buffer.$(OBJEXT)
 	-rm -f src/test_read_mixer-tokenizer.$(OBJEXT)
 	-rm -f src/test_read_mixer-utils.$(OBJEXT)
 	-rm -f src/test_read_tags-aiff.$(OBJEXT)
@@ -4248,6 +4298,7 @@ mostlyclean-compile:
 	-rm -f src/test_read_tags-input_registry.$(OBJEXT)
 	-rm -f src/test_read_tags-input_stream.$(OBJEXT)
 	-rm -f src/test_read_tags-log.$(OBJEXT)
+	-rm -f src/test_read_tags-pcm_buffer.$(OBJEXT)
 	-rm -f src/test_read_tags-replay_gain_ape.$(OBJEXT)
 	-rm -f src/test_read_tags-replay_gain_info.$(OBJEXT)
 	-rm -f src/test_read_tags-riff.$(OBJEXT)
@@ -4264,6 +4315,7 @@ mostlyclean-compile:
 	-rm -f src/test_run_convert-audio_format.$(OBJEXT)
 	-rm -f src/test_run_convert-audio_parser.$(OBJEXT)
 	-rm -f src/test_run_convert-fifo_buffer.$(OBJEXT)
+	-rm -f src/test_run_convert-pcm_buffer.$(OBJEXT)
 	-rm -f src/test_run_convert-pcm_byteswap.$(OBJEXT)
 	-rm -f src/test_run_convert-pcm_channels.$(OBJEXT)
 	-rm -f src/test_run_convert-pcm_convert.$(OBJEXT)
@@ -4290,6 +4342,7 @@ mostlyclean-compile:
 	-rm -f src/test_run_decoder-input_registry.$(OBJEXT)
 	-rm -f src/test_run_decoder-input_stream.$(OBJEXT)
 	-rm -f src/test_run_decoder-log.$(OBJEXT)
+	-rm -f src/test_run_decoder-pcm_buffer.$(OBJEXT)
 	-rm -f src/test_run_decoder-replay_gain_ape.$(OBJEXT)
 	-rm -f src/test_run_decoder-replay_gain_info.$(OBJEXT)
 	-rm -f src/test_run_decoder-riff.$(OBJEXT)
@@ -4307,6 +4360,9 @@ mostlyclean-compile:
 	-rm -f src/test_run_encoder-audio_parser.$(OBJEXT)
 	-rm -f src/test_run_encoder-conf.$(OBJEXT)
 	-rm -f src/test_run_encoder-encoder_list.$(OBJEXT)
+	-rm -f src/test_run_encoder-fifo_buffer.$(OBJEXT)
+	-rm -f src/test_run_encoder-growing_fifo.$(OBJEXT)
+	-rm -f src/test_run_encoder-pcm_buffer.$(OBJEXT)
 	-rm -f src/test_run_encoder-tag.$(OBJEXT)
 	-rm -f src/test_run_encoder-tag_pool.$(OBJEXT)
 	-rm -f src/test_run_encoder-tokenizer.$(OBJEXT)
@@ -4317,6 +4373,7 @@ mostlyclean-compile:
 	-rm -f src/test_run_filter-conf.$(OBJEXT)
 	-rm -f src/test_run_filter-filter_plugin.$(OBJEXT)
 	-rm -f src/test_run_filter-filter_registry.$(OBJEXT)
+	-rm -f src/test_run_filter-pcm_buffer.$(OBJEXT)
 	-rm -f src/test_run_filter-pcm_byteswap.$(OBJEXT)
 	-rm -f src/test_run_filter-pcm_channels.$(OBJEXT)
 	-rm -f src/test_run_filter-pcm_convert.$(OBJEXT)
@@ -4354,6 +4411,7 @@ mostlyclean-compile:
 	-rm -f src/test_run_output-fifo_buffer.$(OBJEXT)
 	-rm -f src/test_run_output-filter_config.$(OBJEXT)
 	-rm -f src/test_run_output-filter_plugin.$(OBJEXT)
+	-rm -f src/test_run_output-growing_fifo.$(OBJEXT)
 	-rm -f src/test_run_output-icy_server.$(OBJEXT)
 	-rm -f src/test_run_output-log.$(OBJEXT)
 	-rm -f src/test_run_output-mixer_api.$(OBJEXT)
@@ -4362,6 +4420,7 @@ mostlyclean-compile:
 	-rm -f src/test_run_output-output_init.$(OBJEXT)
 	-rm -f src/test_run_output-output_list.$(OBJEXT)
 	-rm -f src/test_run_output-page.$(OBJEXT)
+	-rm -f src/test_run_output-pcm_buffer.$(OBJEXT)
 	-rm -f src/test_run_output-pcm_volume.$(OBJEXT)
 	-rm -f src/test_run_output-replay_gain_config.$(OBJEXT)
 	-rm -f src/test_run_output-replay_gain_info.$(OBJEXT)
@@ -4443,6 +4502,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/src_mpd-filter_config.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/src_mpd-filter_plugin.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/src_mpd-filter_registry.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/src_mpd-growing_fifo.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/src_mpd-icy_metadata.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/src_mpd-icy_server.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/src_mpd-idle.Po at am__quote@
@@ -4474,6 +4534,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/src_mpd-output_thread.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/src_mpd-page.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/src_mpd-path.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/src_mpd-pcm_buffer.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/src_mpd-pcm_byteswap.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/src_mpd-pcm_channels.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/src_mpd-pcm_convert.Po at am__quote@
@@ -4575,6 +4636,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_read_mixer-log.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_read_mixer-mixer_api.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_read_mixer-mixer_control.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_read_mixer-pcm_buffer.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_read_mixer-tokenizer.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_read_mixer-utils.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_read_tags-aiff.Po at am__quote@
@@ -4593,6 +4655,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_read_tags-input_registry.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_read_tags-input_stream.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_read_tags-log.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_read_tags-pcm_buffer.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_read_tags-replay_gain_ape.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_read_tags-replay_gain_info.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_read_tags-riff.Po at am__quote@
@@ -4609,6 +4672,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_convert-audio_format.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_convert-audio_parser.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_convert-fifo_buffer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_convert-pcm_buffer.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_convert-pcm_byteswap.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_convert-pcm_channels.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_convert-pcm_convert.Po at am__quote@
@@ -4635,6 +4699,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_decoder-input_registry.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_decoder-input_stream.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_decoder-log.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_decoder-pcm_buffer.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_decoder-replay_gain_ape.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_decoder-replay_gain_info.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_decoder-riff.Po at am__quote@
@@ -4652,6 +4717,9 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_encoder-audio_parser.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_encoder-conf.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_encoder-encoder_list.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_encoder-fifo_buffer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_encoder-growing_fifo.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_encoder-pcm_buffer.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_encoder-tag.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_encoder-tag_pool.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_encoder-tokenizer.Po at am__quote@
@@ -4662,6 +4730,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_filter-conf.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_filter-filter_plugin.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_filter-filter_registry.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_filter-pcm_buffer.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_filter-pcm_byteswap.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_filter-pcm_channels.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_filter-pcm_convert.Po at am__quote@
@@ -4699,6 +4768,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_output-fifo_buffer.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_output-filter_config.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_output-filter_plugin.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_output-growing_fifo.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_output-icy_server.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_output-log.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_output-mixer_api.Po at am__quote@
@@ -4707,6 +4777,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_output-output_init.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_output-output_list.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_output-page.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_output-pcm_buffer.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_output-pcm_volume.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_output-replay_gain_config.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at src/$(DEPDIR)/test_run_output-replay_gain_info.Po at am__quote@
@@ -6837,6 +6908,20 @@ src/src_mpd-fifo_buffer.obj: src/fifo_buffer.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_mpd_CPPFLAGS) $(CPPFLAGS) $(src_mpd_CFLAGS) $(CFLAGS) -c -o src/src_mpd-fifo_buffer.obj `if test -f 'src/fifo_buffer.c'; then $(CYGPATH_W) 'src/fifo_buffer.c'; else $(CYGPATH_W) '$(srcdir)/src/fifo_buffer.c'; fi`
 
+src/src_mpd-growing_fifo.o: src/growing_fifo.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_mpd_CPPFLAGS) $(CPPFLAGS) $(src_mpd_CFLAGS) $(CFLAGS) -MT src/src_mpd-growing_fifo.o -MD -MP -MF src/$(DEPDIR)/src_mpd-growing_fifo.Tpo -c -o src/src_mpd-growing_fifo.o `test -f 'src/growing_fifo.c' || echo '$(srcdir)/'`src/growing_fifo.c
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/src_mpd-growing_fifo.Tpo src/$(DEPDIR)/src_mpd-growing_fifo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/growing_fifo.c' object='src/src_mpd-growing_fifo.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_mpd_CPPFLAGS) $(CPPFLAGS) $(src_mpd_CFLAGS) $(CFLAGS) -c -o src/src_mpd-growing_fifo.o `test -f 'src/growing_fifo.c' || echo '$(srcdir)/'`src/growing_fifo.c
+
+src/src_mpd-growing_fifo.obj: src/growing_fifo.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_mpd_CPPFLAGS) $(CPPFLAGS) $(src_mpd_CFLAGS) $(CFLAGS) -MT src/src_mpd-growing_fifo.obj -MD -MP -MF src/$(DEPDIR)/src_mpd-growing_fifo.Tpo -c -o src/src_mpd-growing_fifo.obj `if test -f 'src/growing_fifo.c'; then $(CYGPATH_W) 'src/growing_fifo.c'; else $(CYGPATH_W) '$(srcdir)/src/growing_fifo.c'; fi`
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/src_mpd-growing_fifo.Tpo src/$(DEPDIR)/src_mpd-growing_fifo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/growing_fifo.c' object='src/src_mpd-growing_fifo.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_mpd_CPPFLAGS) $(CPPFLAGS) $(src_mpd_CFLAGS) $(CFLAGS) -c -o src/src_mpd-growing_fifo.obj `if test -f 'src/growing_fifo.c'; then $(CYGPATH_W) 'src/growing_fifo.c'; else $(CYGPATH_W) '$(srcdir)/src/growing_fifo.c'; fi`
+
 src/src_mpd-filter_config.o: src/filter_config.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_mpd_CPPFLAGS) $(CPPFLAGS) $(src_mpd_CFLAGS) $(CFLAGS) -MT src/src_mpd-filter_config.o -MD -MP -MF src/$(DEPDIR)/src_mpd-filter_config.Tpo -c -o src/src_mpd-filter_config.o `test -f 'src/filter_config.c' || echo '$(srcdir)/'`src/filter_config.c
 @am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/src_mpd-filter_config.Tpo src/$(DEPDIR)/src_mpd-filter_config.Po
@@ -7285,6 +7370,20 @@ src/src_mpd-page.obj: src/page.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_mpd_CPPFLAGS) $(CPPFLAGS) $(src_mpd_CFLAGS) $(CFLAGS) -c -o src/src_mpd-page.obj `if test -f 'src/page.c'; then $(CYGPATH_W) 'src/page.c'; else $(CYGPATH_W) '$(srcdir)/src/page.c'; fi`
 
+src/src_mpd-pcm_buffer.o: src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_mpd_CPPFLAGS) $(CPPFLAGS) $(src_mpd_CFLAGS) $(CFLAGS) -MT src/src_mpd-pcm_buffer.o -MD -MP -MF src/$(DEPDIR)/src_mpd-pcm_buffer.Tpo -c -o src/src_mpd-pcm_buffer.o `test -f 'src/pcm_buffer.c' || echo '$(srcdir)/'`src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/src_mpd-pcm_buffer.Tpo src/$(DEPDIR)/src_mpd-pcm_buffer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/pcm_buffer.c' object='src/src_mpd-pcm_buffer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_mpd_CPPFLAGS) $(CPPFLAGS) $(src_mpd_CFLAGS) $(CFLAGS) -c -o src/src_mpd-pcm_buffer.o `test -f 'src/pcm_buffer.c' || echo '$(srcdir)/'`src/pcm_buffer.c
+
+src/src_mpd-pcm_buffer.obj: src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_mpd_CPPFLAGS) $(CPPFLAGS) $(src_mpd_CFLAGS) $(CFLAGS) -MT src/src_mpd-pcm_buffer.obj -MD -MP -MF src/$(DEPDIR)/src_mpd-pcm_buffer.Tpo -c -o src/src_mpd-pcm_buffer.obj `if test -f 'src/pcm_buffer.c'; then $(CYGPATH_W) 'src/pcm_buffer.c'; else $(CYGPATH_W) '$(srcdir)/src/pcm_buffer.c'; fi`
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/src_mpd-pcm_buffer.Tpo src/$(DEPDIR)/src_mpd-pcm_buffer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/pcm_buffer.c' object='src/src_mpd-pcm_buffer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_mpd_CPPFLAGS) $(CPPFLAGS) $(src_mpd_CFLAGS) $(CFLAGS) -c -o src/src_mpd-pcm_buffer.obj `if test -f 'src/pcm_buffer.c'; then $(CYGPATH_W) 'src/pcm_buffer.c'; else $(CYGPATH_W) '$(srcdir)/src/pcm_buffer.c'; fi`
+
 src/src_mpd-pcm_convert.o: src/pcm_convert.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_mpd_CPPFLAGS) $(CPPFLAGS) $(src_mpd_CFLAGS) $(CFLAGS) -MT src/src_mpd-pcm_convert.o -MD -MP -MF src/$(DEPDIR)/src_mpd-pcm_convert.Tpo -c -o src/src_mpd-pcm_convert.o `test -f 'src/pcm_convert.c' || echo '$(srcdir)/'`src/pcm_convert.c
 @am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/src_mpd-pcm_convert.Tpo src/$(DEPDIR)/src_mpd-pcm_convert.Po
@@ -8951,6 +9050,20 @@ src/test_read_mixer-fd_util.obj: src/fd_util.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_read_mixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/test_read_mixer-fd_util.obj `if test -f 'src/fd_util.c'; then $(CYGPATH_W) 'src/fd_util.c'; else $(CYGPATH_W) '$(srcdir)/src/fd_util.c'; fi`
 
+src/test_read_mixer-pcm_buffer.o: src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_read_mixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/test_read_mixer-pcm_buffer.o -MD -MP -MF src/$(DEPDIR)/test_read_mixer-pcm_buffer.Tpo -c -o src/test_read_mixer-pcm_buffer.o `test -f 'src/pcm_buffer.c' || echo '$(srcdir)/'`src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_read_mixer-pcm_buffer.Tpo src/$(DEPDIR)/test_read_mixer-pcm_buffer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/pcm_buffer.c' object='src/test_read_mixer-pcm_buffer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_read_mixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/test_read_mixer-pcm_buffer.o `test -f 'src/pcm_buffer.c' || echo '$(srcdir)/'`src/pcm_buffer.c
+
+src/test_read_mixer-pcm_buffer.obj: src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_read_mixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/test_read_mixer-pcm_buffer.obj -MD -MP -MF src/$(DEPDIR)/test_read_mixer-pcm_buffer.Tpo -c -o src/test_read_mixer-pcm_buffer.obj `if test -f 'src/pcm_buffer.c'; then $(CYGPATH_W) 'src/pcm_buffer.c'; else $(CYGPATH_W) '$(srcdir)/src/pcm_buffer.c'; fi`
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_read_mixer-pcm_buffer.Tpo src/$(DEPDIR)/test_read_mixer-pcm_buffer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/pcm_buffer.c' object='src/test_read_mixer-pcm_buffer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_read_mixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/test_read_mixer-pcm_buffer.obj `if test -f 'src/pcm_buffer.c'; then $(CYGPATH_W) 'src/pcm_buffer.c'; else $(CYGPATH_W) '$(srcdir)/src/pcm_buffer.c'; fi`
+
 src/mixer/test_read_mixer-software_mixer_plugin.o: src/mixer/software_mixer_plugin.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_read_mixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/mixer/test_read_mixer-software_mixer_plugin.o -MD -MP -MF src/mixer/$(DEPDIR)/test_read_mixer-software_mixer_plugin.Tpo -c -o src/mixer/test_read_mixer-software_mixer_plugin.o `test -f 'src/mixer/software_mixer_plugin.c' || echo '$(srcdir)/'`src/mixer/software_mixer_plugin.c
 @am__fastdepCC_TRUE@	$(am__mv) src/mixer/$(DEPDIR)/test_read_mixer-software_mixer_plugin.Tpo src/mixer/$(DEPDIR)/test_read_mixer-software_mixer_plugin.Po
@@ -9189,6 +9302,20 @@ src/test_read_tags-timer.obj: src/timer.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_read_tags_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/test_read_tags-timer.obj `if test -f 'src/timer.c'; then $(CYGPATH_W) 'src/timer.c'; else $(CYGPATH_W) '$(srcdir)/src/timer.c'; fi`
 
+src/test_read_tags-pcm_buffer.o: src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_read_tags_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/test_read_tags-pcm_buffer.o -MD -MP -MF src/$(DEPDIR)/test_read_tags-pcm_buffer.Tpo -c -o src/test_read_tags-pcm_buffer.o `test -f 'src/pcm_buffer.c' || echo '$(srcdir)/'`src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_read_tags-pcm_buffer.Tpo src/$(DEPDIR)/test_read_tags-pcm_buffer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/pcm_buffer.c' object='src/test_read_tags-pcm_buffer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_read_tags_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/test_read_tags-pcm_buffer.o `test -f 'src/pcm_buffer.c' || echo '$(srcdir)/'`src/pcm_buffer.c
+
+src/test_read_tags-pcm_buffer.obj: src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_read_tags_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/test_read_tags-pcm_buffer.obj -MD -MP -MF src/$(DEPDIR)/test_read_tags-pcm_buffer.Tpo -c -o src/test_read_tags-pcm_buffer.obj `if test -f 'src/pcm_buffer.c'; then $(CYGPATH_W) 'src/pcm_buffer.c'; else $(CYGPATH_W) '$(srcdir)/src/pcm_buffer.c'; fi`
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_read_tags-pcm_buffer.Tpo src/$(DEPDIR)/test_read_tags-pcm_buffer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/pcm_buffer.c' object='src/test_read_tags-pcm_buffer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_read_tags_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/test_read_tags-pcm_buffer.obj `if test -f 'src/pcm_buffer.c'; then $(CYGPATH_W) 'src/pcm_buffer.c'; else $(CYGPATH_W) '$(srcdir)/src/pcm_buffer.c'; fi`
+
 src/archive/test_read_tags-bz2_archive_plugin.o: src/archive/bz2_archive_plugin.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_read_tags_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/archive/test_read_tags-bz2_archive_plugin.o -MD -MP -MF src/archive/$(DEPDIR)/test_read_tags-bz2_archive_plugin.Tpo -c -o src/archive/test_read_tags-bz2_archive_plugin.o `test -f 'src/archive/bz2_archive_plugin.c' || echo '$(srcdir)/'`src/archive/bz2_archive_plugin.c
 @am__fastdepCC_TRUE@	$(am__mv) src/archive/$(DEPDIR)/test_read_tags-bz2_archive_plugin.Tpo src/archive/$(DEPDIR)/test_read_tags-bz2_archive_plugin.Po
@@ -9917,6 +10044,20 @@ src/test_run_convert-audio_parser.obj: src/audio_parser.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_convert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/test_run_convert-audio_parser.obj `if test -f 'src/audio_parser.c'; then $(CYGPATH_W) 'src/audio_parser.c'; else $(CYGPATH_W) '$(srcdir)/src/audio_parser.c'; fi`
 
+src/test_run_convert-pcm_buffer.o: src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_convert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/test_run_convert-pcm_buffer.o -MD -MP -MF src/$(DEPDIR)/test_run_convert-pcm_buffer.Tpo -c -o src/test_run_convert-pcm_buffer.o `test -f 'src/pcm_buffer.c' || echo '$(srcdir)/'`src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_run_convert-pcm_buffer.Tpo src/$(DEPDIR)/test_run_convert-pcm_buffer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/pcm_buffer.c' object='src/test_run_convert-pcm_buffer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_convert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/test_run_convert-pcm_buffer.o `test -f 'src/pcm_buffer.c' || echo '$(srcdir)/'`src/pcm_buffer.c
+
+src/test_run_convert-pcm_buffer.obj: src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_convert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/test_run_convert-pcm_buffer.obj -MD -MP -MF src/$(DEPDIR)/test_run_convert-pcm_buffer.Tpo -c -o src/test_run_convert-pcm_buffer.obj `if test -f 'src/pcm_buffer.c'; then $(CYGPATH_W) 'src/pcm_buffer.c'; else $(CYGPATH_W) '$(srcdir)/src/pcm_buffer.c'; fi`
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_run_convert-pcm_buffer.Tpo src/$(DEPDIR)/test_run_convert-pcm_buffer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/pcm_buffer.c' object='src/test_run_convert-pcm_buffer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_convert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/test_run_convert-pcm_buffer.obj `if test -f 'src/pcm_buffer.c'; then $(CYGPATH_W) 'src/pcm_buffer.c'; else $(CYGPATH_W) '$(srcdir)/src/pcm_buffer.c'; fi`
+
 src/test_run_convert-pcm_channels.o: src/pcm_channels.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_convert_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/test_run_convert-pcm_channels.o -MD -MP -MF src/$(DEPDIR)/test_run_convert-pcm_channels.Tpo -c -o src/test_run_convert-pcm_channels.o `test -f 'src/pcm_channels.c' || echo '$(srcdir)/'`src/pcm_channels.c
 @am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_run_convert-pcm_channels.Tpo src/$(DEPDIR)/test_run_convert-pcm_channels.Po
@@ -10225,6 +10366,20 @@ src/test_run_decoder-timer.obj: src/timer.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_decoder_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/test_run_decoder-timer.obj `if test -f 'src/timer.c'; then $(CYGPATH_W) 'src/timer.c'; else $(CYGPATH_W) '$(srcdir)/src/timer.c'; fi`
 
+src/test_run_decoder-pcm_buffer.o: src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_decoder_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/test_run_decoder-pcm_buffer.o -MD -MP -MF src/$(DEPDIR)/test_run_decoder-pcm_buffer.Tpo -c -o src/test_run_decoder-pcm_buffer.o `test -f 'src/pcm_buffer.c' || echo '$(srcdir)/'`src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_run_decoder-pcm_buffer.Tpo src/$(DEPDIR)/test_run_decoder-pcm_buffer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/pcm_buffer.c' object='src/test_run_decoder-pcm_buffer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_decoder_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/test_run_decoder-pcm_buffer.o `test -f 'src/pcm_buffer.c' || echo '$(srcdir)/'`src/pcm_buffer.c
+
+src/test_run_decoder-pcm_buffer.obj: src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_decoder_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/test_run_decoder-pcm_buffer.obj -MD -MP -MF src/$(DEPDIR)/test_run_decoder-pcm_buffer.Tpo -c -o src/test_run_decoder-pcm_buffer.obj `if test -f 'src/pcm_buffer.c'; then $(CYGPATH_W) 'src/pcm_buffer.c'; else $(CYGPATH_W) '$(srcdir)/src/pcm_buffer.c'; fi`
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_run_decoder-pcm_buffer.Tpo src/$(DEPDIR)/test_run_decoder-pcm_buffer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/pcm_buffer.c' object='src/test_run_decoder-pcm_buffer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_decoder_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/test_run_decoder-pcm_buffer.obj `if test -f 'src/pcm_buffer.c'; then $(CYGPATH_W) 'src/pcm_buffer.c'; else $(CYGPATH_W) '$(srcdir)/src/pcm_buffer.c'; fi`
+
 src/archive/test_run_decoder-bz2_archive_plugin.o: src/archive/bz2_archive_plugin.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_decoder_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/archive/test_run_decoder-bz2_archive_plugin.o -MD -MP -MF src/archive/$(DEPDIR)/test_run_decoder-bz2_archive_plugin.Tpo -c -o src/archive/test_run_decoder-bz2_archive_plugin.o `test -f 'src/archive/bz2_archive_plugin.c' || echo '$(srcdir)/'`src/archive/bz2_archive_plugin.c
 @am__fastdepCC_TRUE@	$(am__mv) src/archive/$(DEPDIR)/test_run_decoder-bz2_archive_plugin.Tpo src/archive/$(DEPDIR)/test_run_decoder-bz2_archive_plugin.Po
@@ -11009,6 +11164,48 @@ src/test_run_encoder-audio_parser.obj: src/audio_parser.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_encoder_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/test_run_encoder-audio_parser.obj `if test -f 'src/audio_parser.c'; then $(CYGPATH_W) 'src/audio_parser.c'; else $(CYGPATH_W) '$(srcdir)/src/audio_parser.c'; fi`
 
+src/test_run_encoder-pcm_buffer.o: src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_encoder_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/test_run_encoder-pcm_buffer.o -MD -MP -MF src/$(DEPDIR)/test_run_encoder-pcm_buffer.Tpo -c -o src/test_run_encoder-pcm_buffer.o `test -f 'src/pcm_buffer.c' || echo '$(srcdir)/'`src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_run_encoder-pcm_buffer.Tpo src/$(DEPDIR)/test_run_encoder-pcm_buffer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/pcm_buffer.c' object='src/test_run_encoder-pcm_buffer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_encoder_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/test_run_encoder-pcm_buffer.o `test -f 'src/pcm_buffer.c' || echo '$(srcdir)/'`src/pcm_buffer.c
+
+src/test_run_encoder-pcm_buffer.obj: src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_encoder_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/test_run_encoder-pcm_buffer.obj -MD -MP -MF src/$(DEPDIR)/test_run_encoder-pcm_buffer.Tpo -c -o src/test_run_encoder-pcm_buffer.obj `if test -f 'src/pcm_buffer.c'; then $(CYGPATH_W) 'src/pcm_buffer.c'; else $(CYGPATH_W) '$(srcdir)/src/pcm_buffer.c'; fi`
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_run_encoder-pcm_buffer.Tpo src/$(DEPDIR)/test_run_encoder-pcm_buffer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/pcm_buffer.c' object='src/test_run_encoder-pcm_buffer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_encoder_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/test_run_encoder-pcm_buffer.obj `if test -f 'src/pcm_buffer.c'; then $(CYGPATH_W) 'src/pcm_buffer.c'; else $(CYGPATH_W) '$(srcdir)/src/pcm_buffer.c'; fi`
+
+src/test_run_encoder-fifo_buffer.o: src/fifo_buffer.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_encoder_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/test_run_encoder-fifo_buffer.o -MD -MP -MF src/$(DEPDIR)/test_run_encoder-fifo_buffer.Tpo -c -o src/test_run_encoder-fifo_buffer.o `test -f 'src/fifo_buffer.c' || echo '$(srcdir)/'`src/fifo_buffer.c
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_run_encoder-fifo_buffer.Tpo src/$(DEPDIR)/test_run_encoder-fifo_buffer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/fifo_buffer.c' object='src/test_run_encoder-fifo_buffer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_encoder_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/test_run_encoder-fifo_buffer.o `test -f 'src/fifo_buffer.c' || echo '$(srcdir)/'`src/fifo_buffer.c
+
+src/test_run_encoder-fifo_buffer.obj: src/fifo_buffer.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_encoder_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/test_run_encoder-fifo_buffer.obj -MD -MP -MF src/$(DEPDIR)/test_run_encoder-fifo_buffer.Tpo -c -o src/test_run_encoder-fifo_buffer.obj `if test -f 'src/fifo_buffer.c'; then $(CYGPATH_W) 'src/fifo_buffer.c'; else $(CYGPATH_W) '$(srcdir)/src/fifo_buffer.c'; fi`
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_run_encoder-fifo_buffer.Tpo src/$(DEPDIR)/test_run_encoder-fifo_buffer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/fifo_buffer.c' object='src/test_run_encoder-fifo_buffer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_encoder_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/test_run_encoder-fifo_buffer.obj `if test -f 'src/fifo_buffer.c'; then $(CYGPATH_W) 'src/fifo_buffer.c'; else $(CYGPATH_W) '$(srcdir)/src/fifo_buffer.c'; fi`
+
+src/test_run_encoder-growing_fifo.o: src/growing_fifo.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_encoder_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/test_run_encoder-growing_fifo.o -MD -MP -MF src/$(DEPDIR)/test_run_encoder-growing_fifo.Tpo -c -o src/test_run_encoder-growing_fifo.o `test -f 'src/growing_fifo.c' || echo '$(srcdir)/'`src/growing_fifo.c
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_run_encoder-growing_fifo.Tpo src/$(DEPDIR)/test_run_encoder-growing_fifo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/growing_fifo.c' object='src/test_run_encoder-growing_fifo.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_encoder_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/test_run_encoder-growing_fifo.o `test -f 'src/growing_fifo.c' || echo '$(srcdir)/'`src/growing_fifo.c
+
+src/test_run_encoder-growing_fifo.obj: src/growing_fifo.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_encoder_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/test_run_encoder-growing_fifo.obj -MD -MP -MF src/$(DEPDIR)/test_run_encoder-growing_fifo.Tpo -c -o src/test_run_encoder-growing_fifo.obj `if test -f 'src/growing_fifo.c'; then $(CYGPATH_W) 'src/growing_fifo.c'; else $(CYGPATH_W) '$(srcdir)/src/growing_fifo.c'; fi`
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_run_encoder-growing_fifo.Tpo src/$(DEPDIR)/test_run_encoder-growing_fifo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/growing_fifo.c' object='src/test_run_encoder-growing_fifo.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_encoder_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/test_run_encoder-growing_fifo.obj `if test -f 'src/growing_fifo.c'; then $(CYGPATH_W) 'src/growing_fifo.c'; else $(CYGPATH_W) '$(srcdir)/src/growing_fifo.c'; fi`
+
 src/test_run_encoder-encoder_list.o: src/encoder_list.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_encoder_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/test_run_encoder-encoder_list.o -MD -MP -MF src/$(DEPDIR)/test_run_encoder-encoder_list.Tpo -c -o src/test_run_encoder-encoder_list.o `test -f 'src/encoder_list.c' || echo '$(srcdir)/'`src/encoder_list.c
 @am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_run_encoder-encoder_list.Tpo src/$(DEPDIR)/test_run_encoder-encoder_list.Po
@@ -11317,6 +11514,20 @@ src/test_run_filter-pcm_resample_fallback.obj: src/pcm_resample_fallback.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_filter_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/test_run_filter-pcm_resample_fallback.obj `if test -f 'src/pcm_resample_fallback.c'; then $(CYGPATH_W) 'src/pcm_resample_fallback.c'; else $(CYGPATH_W) '$(srcdir)/src/pcm_resample_fallback.c'; fi`
 
+src/test_run_filter-pcm_buffer.o: src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_filter_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/test_run_filter-pcm_buffer.o -MD -MP -MF src/$(DEPDIR)/test_run_filter-pcm_buffer.Tpo -c -o src/test_run_filter-pcm_buffer.o `test -f 'src/pcm_buffer.c' || echo '$(srcdir)/'`src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_run_filter-pcm_buffer.Tpo src/$(DEPDIR)/test_run_filter-pcm_buffer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/pcm_buffer.c' object='src/test_run_filter-pcm_buffer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_filter_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/test_run_filter-pcm_buffer.o `test -f 'src/pcm_buffer.c' || echo '$(srcdir)/'`src/pcm_buffer.c
+
+src/test_run_filter-pcm_buffer.obj: src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_filter_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/test_run_filter-pcm_buffer.obj -MD -MP -MF src/$(DEPDIR)/test_run_filter-pcm_buffer.Tpo -c -o src/test_run_filter-pcm_buffer.obj `if test -f 'src/pcm_buffer.c'; then $(CYGPATH_W) 'src/pcm_buffer.c'; else $(CYGPATH_W) '$(srcdir)/src/pcm_buffer.c'; fi`
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_run_filter-pcm_buffer.Tpo src/$(DEPDIR)/test_run_filter-pcm_buffer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/pcm_buffer.c' object='src/test_run_filter-pcm_buffer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_filter_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/test_run_filter-pcm_buffer.obj `if test -f 'src/pcm_buffer.c'; then $(CYGPATH_W) 'src/pcm_buffer.c'; else $(CYGPATH_W) '$(srcdir)/src/pcm_buffer.c'; fi`
+
 src/test_run_filter-audio_check.o: src/audio_check.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_filter_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/test_run_filter-audio_check.o -MD -MP -MF src/$(DEPDIR)/test_run_filter-audio_check.Tpo -c -o src/test_run_filter-audio_check.o `test -f 'src/audio_check.c' || echo '$(srcdir)/'`src/audio_check.c
 @am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_run_filter-audio_check.Tpo src/$(DEPDIR)/test_run_filter-audio_check.Po
@@ -12031,6 +12242,20 @@ src/test_run_output-fifo_buffer.obj: src/fifo_buffer.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_output_CPPFLAGS) $(CPPFLAGS) $(test_run_output_CFLAGS) $(CFLAGS) -c -o src/test_run_output-fifo_buffer.obj `if test -f 'src/fifo_buffer.c'; then $(CYGPATH_W) 'src/fifo_buffer.c'; else $(CYGPATH_W) '$(srcdir)/src/fifo_buffer.c'; fi`
 
+src/test_run_output-growing_fifo.o: src/growing_fifo.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_output_CPPFLAGS) $(CPPFLAGS) $(test_run_output_CFLAGS) $(CFLAGS) -MT src/test_run_output-growing_fifo.o -MD -MP -MF src/$(DEPDIR)/test_run_output-growing_fifo.Tpo -c -o src/test_run_output-growing_fifo.o `test -f 'src/growing_fifo.c' || echo '$(srcdir)/'`src/growing_fifo.c
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_run_output-growing_fifo.Tpo src/$(DEPDIR)/test_run_output-growing_fifo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/growing_fifo.c' object='src/test_run_output-growing_fifo.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_output_CPPFLAGS) $(CPPFLAGS) $(test_run_output_CFLAGS) $(CFLAGS) -c -o src/test_run_output-growing_fifo.o `test -f 'src/growing_fifo.c' || echo '$(srcdir)/'`src/growing_fifo.c
+
+src/test_run_output-growing_fifo.obj: src/growing_fifo.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_output_CPPFLAGS) $(CPPFLAGS) $(test_run_output_CFLAGS) $(CFLAGS) -MT src/test_run_output-growing_fifo.obj -MD -MP -MF src/$(DEPDIR)/test_run_output-growing_fifo.Tpo -c -o src/test_run_output-growing_fifo.obj `if test -f 'src/growing_fifo.c'; then $(CYGPATH_W) 'src/growing_fifo.c'; else $(CYGPATH_W) '$(srcdir)/src/growing_fifo.c'; fi`
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_run_output-growing_fifo.Tpo src/$(DEPDIR)/test_run_output-growing_fifo.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/growing_fifo.c' object='src/test_run_output-growing_fifo.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_output_CPPFLAGS) $(CPPFLAGS) $(test_run_output_CFLAGS) $(CFLAGS) -c -o src/test_run_output-growing_fifo.obj `if test -f 'src/growing_fifo.c'; then $(CYGPATH_W) 'src/growing_fifo.c'; else $(CYGPATH_W) '$(srcdir)/src/growing_fifo.c'; fi`
+
 src/test_run_output-page.o: src/page.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_output_CPPFLAGS) $(CPPFLAGS) $(test_run_output_CFLAGS) $(CFLAGS) -MT src/test_run_output-page.o -MD -MP -MF src/$(DEPDIR)/test_run_output-page.Tpo -c -o src/test_run_output-page.o `test -f 'src/page.c' || echo '$(srcdir)/'`src/page.c
 @am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_run_output-page.Tpo src/$(DEPDIR)/test_run_output-page.Po
@@ -12423,6 +12648,20 @@ src/test_run_output-pcm_volume.obj: src/pcm_volume.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_output_CPPFLAGS) $(CPPFLAGS) $(test_run_output_CFLAGS) $(CFLAGS) -c -o src/test_run_output-pcm_volume.obj `if test -f 'src/pcm_volume.c'; then $(CYGPATH_W) 'src/pcm_volume.c'; else $(CYGPATH_W) '$(srcdir)/src/pcm_volume.c'; fi`
 
+src/test_run_output-pcm_buffer.o: src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_output_CPPFLAGS) $(CPPFLAGS) $(test_run_output_CFLAGS) $(CFLAGS) -MT src/test_run_output-pcm_buffer.o -MD -MP -MF src/$(DEPDIR)/test_run_output-pcm_buffer.Tpo -c -o src/test_run_output-pcm_buffer.o `test -f 'src/pcm_buffer.c' || echo '$(srcdir)/'`src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_run_output-pcm_buffer.Tpo src/$(DEPDIR)/test_run_output-pcm_buffer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/pcm_buffer.c' object='src/test_run_output-pcm_buffer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_output_CPPFLAGS) $(CPPFLAGS) $(test_run_output_CFLAGS) $(CFLAGS) -c -o src/test_run_output-pcm_buffer.o `test -f 'src/pcm_buffer.c' || echo '$(srcdir)/'`src/pcm_buffer.c
+
+src/test_run_output-pcm_buffer.obj: src/pcm_buffer.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_output_CPPFLAGS) $(CPPFLAGS) $(test_run_output_CFLAGS) $(CFLAGS) -MT src/test_run_output-pcm_buffer.obj -MD -MP -MF src/$(DEPDIR)/test_run_output-pcm_buffer.Tpo -c -o src/test_run_output-pcm_buffer.obj `if test -f 'src/pcm_buffer.c'; then $(CYGPATH_W) 'src/pcm_buffer.c'; else $(CYGPATH_W) '$(srcdir)/src/pcm_buffer.c'; fi`
+ at am__fastdepCC_TRUE@	$(am__mv) src/$(DEPDIR)/test_run_output-pcm_buffer.Tpo src/$(DEPDIR)/test_run_output-pcm_buffer.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='src/pcm_buffer.c' object='src/test_run_output-pcm_buffer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_output_CPPFLAGS) $(CPPFLAGS) $(test_run_output_CFLAGS) $(CFLAGS) -c -o src/test_run_output-pcm_buffer.obj `if test -f 'src/pcm_buffer.c'; then $(CYGPATH_W) 'src/pcm_buffer.c'; else $(CYGPATH_W) '$(srcdir)/src/pcm_buffer.c'; fi`
+
 src/AudioCompress/test_run_output-compress.o: src/AudioCompress/compress.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_run_output_CPPFLAGS) $(CPPFLAGS) $(test_run_output_CFLAGS) $(CFLAGS) -MT src/AudioCompress/test_run_output-compress.o -MD -MP -MF src/AudioCompress/$(DEPDIR)/test_run_output-compress.Tpo -c -o src/AudioCompress/test_run_output-compress.o `test -f 'src/AudioCompress/compress.c' || echo '$(srcdir)/'`src/AudioCompress/compress.c
 @am__fastdepCC_TRUE@	$(am__mv) src/AudioCompress/$(DEPDIR)/test_run_output-compress.Tpo src/AudioCompress/$(DEPDIR)/test_run_output-compress.Po
diff --git a/NEWS b/NEWS
index ab2eaf4..d66811a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,33 @@
-ver 0.16.5 (2010/10/09)
+ver 0.16.7 (2012/02/04)
+* input:
+  - ffmpeg: support libavformat 0.7
+* decoder:
+  - ffmpeg: support libavformat 0.8, libavcodec 0.9
+  - ffmpeg: support all MPD tags
+* output:
+  - httpd: fix excessive buffering
+  - openal: force 16 bit playback, as 8 bit doesn't work
+  - osx: remove sleep call from render callback
+  - osx: clear render buffer when there's not enough data
+* fix moving after current song
+
+
+ver 0.16.6 (2011/12/01)
+* decoder:
+  - fix assertion failure when resuming streams
+  - ffmpeg: work around bogus channel count
+* encoder:
+  - flac, null, wave: fix buffer corruption bug
+  - wave: support packed 24 bit samples
+* mapper: fix the bogus "not a directory" error message
+* mapper: check "x" and "r" permissions on music directory
+* log: print reason for failure
+* event_pipe: fix WIN32 regression
+* define WINVER in ./configure
+* WIN32: autodetect filesystem encoding
+
+
+ver 0.16.5 (2011/10/09)
 * configure.ac
   - disable assertions in the non-debugging build
   - show solaris plugin result correctly
diff --git a/configure b/configure
index 209c717..855bf1b 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for mpd 0.16.5.
+# Generated by GNU Autoconf 2.68 for mpd 0.16.7.
 #
 # Report bugs to <musicpd-dev-team at lists.sourceforge.net>.
 #
@@ -560,8 +560,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='mpd'
 PACKAGE_TARNAME='mpd'
-PACKAGE_VERSION='0.16.5'
-PACKAGE_STRING='mpd 0.16.5'
+PACKAGE_VERSION='0.16.7'
+PACKAGE_STRING='mpd 0.16.7'
 PACKAGE_BUGREPORT='musicpd-dev-team at lists.sourceforge.net'
 PACKAGE_URL=''
 
@@ -1606,7 +1606,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures mpd 0.16.5 to adapt to many kinds of systems.
+\`configure' configures mpd 0.16.7 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1676,7 +1676,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of mpd 0.16.5:";;
+     short | recursive ) echo "Configuration of mpd 0.16.7:";;
    esac
   cat <<\_ACEOF
 
@@ -1950,7 +1950,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-mpd configure 0.16.5
+mpd configure 0.16.7
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2460,7 +2460,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by mpd $as_me 0.16.5, which was
+It was created by mpd $as_me 0.16.7, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -3276,7 +3276,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='mpd'
- VERSION='0.16.5'
+ VERSION='0.16.7'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -5279,6 +5279,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 case "$host_os" in
 mingw32* | windows*)
+	AM_CPPFLAGS="$AM_CPPFLAGS -DWINVER=0x0501"
 	MPD_LIBS="$MPD_LIBS -lws2_32"
 	;;
 esac
@@ -6680,6 +6681,11 @@ $as_echo "yes" >&6; }
 	:
 fi
 
+if test x$GCC = xyes; then
+	# suppress warnings in the GLib headers
+	GLIB_CFLAGS=`echo $GLIB_CFLAGS |sed -e 's,-I/,-isystem /,g'`
+fi
+
 
 if test x$enable_tcp = xno; then
 	# if we don't support TCP, we don't need IPv6 either
@@ -6693,7 +6699,11 @@ $as_echo_n "checking for ipv6... " >&6; }
 /* end confdefs.h.  */
 
 #include <sys/types.h>
+#ifdef WIN32
+#include <winsock2.h>
+#else
 #include <sys/socket.h>
+#endif
 #include <netdb.h>
 #ifdef PF_INET6
 #ifdef AF_INET6
@@ -13177,40 +13187,6 @@ $as_echo "$ac_res" >&6; }
   fi
 
 
-  var=`echo "-Wno-deprecated-declarations" | tr "=-" "__"`
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wno-deprecated-declarations" >&5
-$as_echo_n "checking whether the C compiler accepts -Wno-deprecated-declarations... " >&6; }
-if eval \${mpd_check_cflag_$var+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-    save_CFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS -Wno-deprecated-declarations"
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-     int main(void) { return 0; }
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-   eval "mpd_check_cflag_$var=yes"
-
-else
-   eval "mpd_check_cflag_$var=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    CFLAGS="$save_CFLAGS"
-
-fi
-eval ac_res=\$mpd_check_cflag_$var
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  if eval "test x`echo '$mpd_check_cflag_'$var` = xyes"
-  then
-    AM_CFLAGS="$AM_CFLAGS -Wno-deprecated-declarations"
-  fi
-
-
   var=`echo "-Wmissing-prototypes" | tr "=-" "__"`
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wmissing-prototypes" >&5
 $as_echo_n "checking whether the C compiler accepts -Wmissing-prototypes... " >&6; }
@@ -15304,7 +15280,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by mpd $as_me 0.16.5, which was
+This file was extended by mpd $as_me 0.16.7, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15370,7 +15346,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-mpd config.status 0.16.5
+mpd config.status 0.16.7
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
@@ -17034,7 +17010,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by mpd $as_me 0.16.5, which was
+This file was extended by mpd $as_me 0.16.7, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -17100,7 +17076,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-mpd config.status 0.16.5
+mpd config.status 0.16.7
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 0ef9970..d3f4b39 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ(2.60)
-AC_INIT(mpd, 0.16.5, musicpd-dev-team at lists.sourceforge.net)
+AC_INIT(mpd, 0.16.7, musicpd-dev-team at lists.sourceforge.net)
 AC_CONFIG_SRCDIR([src/main.c])
 AM_INIT_AUTOMAKE([foreign 1.10 dist-bzip2 subdir-objects])
 AM_CONFIG_HEADER(config.h)
@@ -68,6 +68,7 @@ AC_CANONICAL_HOST
 
 case "$host_os" in
 mingw32* | windows*)
+	AM_CPPFLAGS="$AM_CPPFLAGS -DWINVER=0x0501"
 	MPD_LIBS="$MPD_LIBS -lws2_32"
 	;;
 esac
@@ -431,6 +432,11 @@ dnl ---------------------------------------------------------------------------
 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.12 gthread-2.0],,
 		[AC_MSG_ERROR([GLib 2.12 is required])])
 
+if test x$GCC = xyes; then
+	# suppress warnings in the GLib headers
+	GLIB_CFLAGS=`echo $GLIB_CFLAGS |sed -e 's,-I/,-isystem /,g'`
+fi
+
 dnl ---------------------------------------------------------------------------
 dnl Protocol Options
 dnl ---------------------------------------------------------------------------
@@ -445,7 +451,11 @@ if test x$enable_ipv6 = xyes; then
 	AC_EGREP_CPP([AP_maGiC_VALUE],
 	[
 #include <sys/types.h>
+#ifdef WIN32
+#include <winsock2.h>
+#else
 #include <sys/socket.h>
+#endif
 #include <netdb.h>
 #ifdef PF_INET6
 #ifdef AF_INET6
@@ -1486,7 +1496,6 @@ if test x$GCC = xyes
 then
 	MPD_CHECK_FLAG([-Wall])
 	MPD_CHECK_FLAG([-Wextra])
-	MPD_CHECK_FLAG([-Wno-deprecated-declarations])
 	MPD_CHECK_FLAG([-Wmissing-prototypes])
 	MPD_CHECK_FLAG([-Wshadow])
 	MPD_CHECK_FLAG([-Wpointer-arith])
diff --git a/src/cmdline.c b/src/cmdline.c
index 2c1db89..d986c8e 100644
--- a/src/cmdline.c
+++ b/src/cmdline.c
@@ -194,8 +194,6 @@ parse_cmdline(int argc, char **argv, struct options *options,
 				if(g_file_test(system_path,
 						G_FILE_TEST_IS_REGULAR)) {
 					ret = config_read_file(system_path,error_r);
-					g_free(system_path);
-					g_free(&system_config_dirs);
 					break;
 				}
 				++i;;
diff --git a/src/decoder/ffmpeg_decoder_plugin.c b/src/decoder/ffmpeg_decoder_plugin.c
index ba47b2c..52632dc 100644
--- a/src/decoder/ffmpeg_decoder_plugin.c
+++ b/src/decoder/ffmpeg_decoder_plugin.c
@@ -40,7 +40,12 @@
 #include <libavcodec/avcodec.h>
 #include <libavformat/avformat.h>
 #include <libavformat/avio.h>
+#include <libavutil/avutil.h>
 #include <libavutil/log.h>
+#include <libavutil/mathematics.h>
+#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51,5,0)
+#include <libavutil/dict.h>
+#endif
 #endif
 
 #undef G_LOG_DOMAIN
@@ -126,11 +131,19 @@ mpd_ffmpeg_stream_open(struct decoder *decoder, struct input_stream *input)
 	struct mpd_ffmpeg_stream *stream = g_new(struct mpd_ffmpeg_stream, 1);
 	stream->decoder = decoder;
 	stream->input = input;
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52,101,0)
+	stream->io = avio_alloc_context(stream->buffer, sizeof(stream->buffer),
+					false, stream,
+					mpd_ffmpeg_stream_read, NULL,
+					input->seekable
+					? mpd_ffmpeg_stream_seek : NULL);
+#else
 	stream->io = av_alloc_put_byte(stream->buffer, sizeof(stream->buffer),
 				       false, stream,
 				       mpd_ffmpeg_stream_read, NULL,
 				       input->seekable
 				       ? mpd_ffmpeg_stream_seek : NULL);
+#endif
 	if (stream->io == NULL) {
 		g_free(stream);
 		return NULL;
@@ -199,6 +212,7 @@ ffmpeg_find_audio_stream(const AVFormatContext *format_context)
 	return -1;
 }
 
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(53,25,0)
 /**
  * On some platforms, libavcodec wants the output buffer aligned to 16
  * bytes (because it uses SSE/Altivec internally).  This function
@@ -213,6 +227,7 @@ align16(void *p, size_t *length_p)
 	*length_p -= add;
 	return (char *)p + add;
 }
+#endif
 
 G_GNUC_CONST
 static double
@@ -232,6 +247,40 @@ time_to_ffmpeg(double t, const AVRational time_base)
 			    time_base);
 }
 
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,25,0)
+/**
+ * Copy PCM data from a AVFrame to an interleaved buffer.
+ */
+static int
+copy_interleave_frame(const AVCodecContext *codec_context,
+		      const AVFrame *frame,
+		      uint8_t *buffer, size_t buffer_size)
+{
+	int plane_size;
+	const int data_size =
+		av_samples_get_buffer_size(&plane_size,
+					   codec_context->channels,
+					   frame->nb_samples,
+					   codec_context->sample_fmt, 1);
+	if (buffer_size < (size_t)data_size)
+		/* buffer is too small - shouldn't happen */
+		return AVERROR(EINVAL);
+
+	if (av_sample_fmt_is_planar(codec_context->sample_fmt) &&
+	    codec_context->channels > 1) {
+		for (int i = 0, channels = codec_context->channels;
+		     i < channels; i++) {
+			memcpy(buffer, frame->extended_data[i], plane_size);
+			buffer += plane_size;
+		}
+	} else {
+		memcpy(buffer, frame->extended_data[0], data_size);
+	}
+
+	return data_size;
+}
+#endif
+
 static enum decoder_command
 ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is,
 		   const AVPacket *packet,
@@ -249,9 +298,15 @@ ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is,
 	int packet_size = packet->size;
 #endif
 
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,25,0)
+	uint8_t aligned_buffer[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2 + 16];
+	const size_t buffer_size = sizeof(aligned_buffer);
+#else
+	/* libavcodec < 0.8 needs an aligned buffer */
 	uint8_t audio_buf[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2 + 16];
 	size_t buffer_size = sizeof(audio_buf);
 	int16_t *aligned_buffer = align16(audio_buf, &buffer_size);
+#endif
 
 	enum decoder_command cmd = DECODE_COMMAND_NONE;
 	while (
@@ -262,7 +317,22 @@ ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is,
 #endif
 	       cmd == DECODE_COMMAND_NONE) {
 		int audio_size = buffer_size;
-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52,25,0)
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,25,0)
+		AVFrame frame;
+		int got_frame = 0;
+		int len = avcodec_decode_audio4(codec_context,
+						&frame, &got_frame,
+						&packet2);
+		if (len >= 0 && got_frame) {
+			audio_size = copy_interleave_frame(codec_context,
+							   &frame,
+							   aligned_buffer,
+							   buffer_size);
+			if (audio_size < 0)
+				len = audio_size;
+		} else if (len >= 0)
+			len = -1;
+#elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52,25,0)
 		int len = avcodec_decode_audio3(codec_context,
 						aligned_buffer, &audio_size,
 						&packet2);
@@ -301,10 +371,18 @@ ffmpeg_sample_format(G_GNUC_UNUSED const AVCodecContext *codec_context)
 {
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(51, 41, 0)
 	switch (codec_context->sample_fmt) {
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 94, 1)
+	case AV_SAMPLE_FMT_S16:
+#else
 	case SAMPLE_FMT_S16:
+#endif
 		return SAMPLE_FORMAT_S16;
 
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 94, 1)
+	case AV_SAMPLE_FMT_S32:
+#else
 	case SAMPLE_FMT_S32:
+#endif
 		return SAMPLE_FORMAT_S32;
 
 	default:
@@ -377,9 +455,19 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
 		return;
 	}
 
-	if (av_find_stream_info(format_context)<0) {
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,6,0)
+	const int find_result =
+		avformat_find_stream_info(format_context, NULL);
+#else
+	const int find_result = av_find_stream_info(format_context);
+#endif
+	if (find_result < 0) {
 		g_warning("Couldn't find stream info\n");
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,17,0)
+		avformat_close_input(&format_context);
+#else
 		av_close_input_stream(format_context);
+#endif
 		mpd_ffmpeg_stream_close(stream);
 		return;
 	}
@@ -387,7 +475,11 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
 	int audio_stream = ffmpeg_find_audio_stream(format_context);
 	if (audio_stream == -1) {
 		g_warning("No audio stream inside\n");
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,17,0)
+		avformat_close_input(&format_context);
+#else
 		av_close_input_stream(format_context);
+#endif
 		mpd_ffmpeg_stream_close(stream);
 		return;
 	}
@@ -402,14 +494,11 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
 
 	if (!codec) {
 		g_warning("Unsupported audio codec\n");
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,17,0)
+		avformat_close_input(&format_context);
+#else
 		av_close_input_stream(format_context);
-		mpd_ffmpeg_stream_close(stream);
-		return;
-	}
-
-	if (avcodec_open(codec_context, codec)<0) {
-		g_warning("Could not open codec\n");
-		av_close_input_stream(format_context);
+#endif
 		mpd_ffmpeg_stream_close(stream);
 		return;
 	}
@@ -422,8 +511,32 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
 				       codec_context->channels, &error)) {
 		g_warning("%s", error->message);
 		g_error_free(error);
-		avcodec_close(codec_context);
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,17,0)
+		avformat_close_input(&format_context);
+#else
+		av_close_input_stream(format_context);
+#endif
+		mpd_ffmpeg_stream_close(stream);
+		return;
+	}
+
+	/* the audio format must be read from AVCodecContext by now,
+	   because avcodec_open() has been demonstrated to fill bogus
+	   values into AVCodecContext.channels - a change that will be
+	   reverted later by avcodec_decode_audio3() */
+
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,6,0)
+	const int open_result = avcodec_open2(codec_context, codec, NULL);
+#else
+	const int open_result = avcodec_open(codec_context, codec);
+#endif
+	if (open_result < 0) {
+		g_warning("Could not open codec\n");
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,17,0)
+		avformat_close_input(&format_context);
+#else
 		av_close_input_stream(format_context);
+#endif
 		mpd_ffmpeg_stream_close(stream);
 		return;
 	}
@@ -467,7 +580,11 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
 	} while (cmd != DECODE_COMMAND_STOP);
 
 	avcodec_close(codec_context);
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,17,0)
+	avformat_close_input(&format_context);
+#else
 	av_close_input_stream(format_context);
+#endif
 	mpd_ffmpeg_stream_close(stream);
 }
 
@@ -478,48 +595,44 @@ typedef struct ffmpeg_tag_map {
 } ffmpeg_tag_map;
 
 static const ffmpeg_tag_map ffmpeg_tag_maps[] = {
-	{ TAG_TITLE,             "title" },
-#if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(50<<8))
-	{ TAG_ARTIST,            "artist" },
-	{ TAG_DATE,              "date" },
-#else
+#if LIBAVFORMAT_VERSION_INT < ((52<<16)+(50<<8))
 	{ TAG_ARTIST,            "author" },
 	{ TAG_DATE,              "year" },
 #endif
-	{ TAG_ALBUM,             "album" },
-	{ TAG_COMMENT,           "comment" },
-	{ TAG_GENRE,             "genre" },
-	{ TAG_TRACK,             "track" },
 	{ TAG_ARTIST_SORT,       "author-sort" },
 	{ TAG_ALBUM_ARTIST,      "album_artist" },
 	{ TAG_ALBUM_ARTIST_SORT, "album_artist-sort" },
-	{ TAG_COMPOSER,          "composer" },
-	{ TAG_PERFORMER,         "performer" },
-	{ TAG_DISC,              "disc" },
+
+	/* sentinel */
+	{ TAG_NUM_OF_ITEM_TYPES, NULL }
 };
 
-static bool
-ffmpeg_copy_metadata(struct tag *tag,
-#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,1,0)
-		     AVDictionary *m,
-#else
-		     AVMetadata *m,
+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(53,1,0)
+#define AVDictionary AVMetadata
+#define AVDictionaryEntry AVMetadataTag
+#define av_dict_get av_metadata_get
 #endif
-		     const ffmpeg_tag_map tag_map)
+
+static void
+ffmpeg_copy_metadata(struct tag *tag, enum tag_type type,
+		     AVDictionary *m, const char *name)
 {
-#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,1,0)
 	AVDictionaryEntry *mt = NULL;
 
-	while ((mt = av_dict_get(m, tag_map.name, mt, 0)) != NULL)
-		tag_add_item(tag, tag_map.type, mt->value);
-#else
-	AVMetadataTag *mt = NULL;
+	while ((mt = av_dict_get(m, name, mt, 0)) != NULL)
+		tag_add_item(tag, type, mt->value);
+}
 
-	while ((mt = av_metadata_get(m, tag_map.name, mt, 0)) != NULL)
-		tag_add_item(tag, tag_map.type, mt->value);
-#endif
+static void
+ffmpeg_copy_dictionary(struct tag *tag, AVDictionary *dict)
+{
+	for (unsigned i = 0; i < TAG_NUM_OF_ITEM_TYPES; ++i)
+		ffmpeg_copy_metadata(tag, i,
+				     dict, tag_item_names[i]);
 
-	return mt != NULL;
+	for (const struct ffmpeg_tag_map *i = ffmpeg_tag_maps;
+	     i->name != NULL; ++i)
+		ffmpeg_copy_metadata(tag, i->type, dict, i->name);
 }
 
 #endif
@@ -543,8 +656,18 @@ ffmpeg_stream_tag(struct input_stream *is)
 		return NULL;
 	}
 
-	if (av_find_stream_info(f) < 0) {
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,6,0)
+	const int find_result =
+		avformat_find_stream_info(f, NULL);
+#else
+	const int find_result = av_find_stream_info(f);
+#endif
+	if (find_result < 0) {
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,17,0)
+		avformat_close_input(&f);
+#else
 		av_close_input_stream(f);
+#endif
 		mpd_ffmpeg_stream_close(stream);
 		return NULL;
 	}
@@ -556,14 +679,14 @@ ffmpeg_stream_tag(struct input_stream *is)
 		: 0;
 
 #if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(31<<8)+0)
+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(52,101,0)
 	av_metadata_conv(f, NULL, f->iformat->metadata_conv);
+#endif
 
-	for (unsigned i = 0; i < sizeof(ffmpeg_tag_maps)/sizeof(ffmpeg_tag_map); i++) {
-		int idx = ffmpeg_find_audio_stream(f);
-		ffmpeg_copy_metadata(tag, f->metadata, ffmpeg_tag_maps[i]);
-		if (idx >= 0)
-			ffmpeg_copy_metadata(tag, f->streams[idx]->metadata, ffmpeg_tag_maps[i]);
-	}
+	ffmpeg_copy_dictionary(tag, f->metadata);
+	int idx = ffmpeg_find_audio_stream(f);
+	if (idx >= 0)
+		ffmpeg_copy_dictionary(tag, f->streams[idx]->metadata);
 #else
 	if (f->author[0])
 		tag_add_item(tag, TAG_ARTIST, f->author);
@@ -590,7 +713,11 @@ ffmpeg_stream_tag(struct input_stream *is)
 
 #endif
 
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,17,0)
+	avformat_close_input(&f);
+#else
 	av_close_input_stream(f);
+#endif
 	mpd_ffmpeg_stream_close(stream);
 
 	return tag;
diff --git a/src/decoder/mp4ff_decoder_plugin.c b/src/decoder/mp4ff_decoder_plugin.c
index 861b081..cd85778 100644
--- a/src/decoder/mp4ff_decoder_plugin.c
+++ b/src/decoder/mp4ff_decoder_plugin.c
@@ -94,6 +94,12 @@ mp4_read(void *user_data, void *buffer, uint32_t length)
 {
 	struct mp4ff_input_stream *mis = user_data;
 
+	if (length == 0)
+		/* libmp4ff is known to attempt to read 0 bytes - make
+		   this a special case, because the input_stream API
+		   would not allow this */
+		return 0;
+
 	return decoder_read(mis->decoder, mis->input_stream, buffer, length);
 }
 
diff --git a/src/decoder_api.c b/src/decoder_api.c
index 6dcca32..695ca02 100644
--- a/src/decoder_api.c
+++ b/src/decoder_api.c
@@ -95,6 +95,12 @@ decoder_prepare_initial_seek(struct decoder *decoder)
 		return true;
 
 	if (decoder->initial_seek_pending) {
+		if (!dc->seekable) {
+			/* seeking is not possible */
+			decoder->initial_seek_pending = false;
+			return false;
+		}
+
 		if (dc->command == DECODE_COMMAND_NONE) {
 			/* begin initial seek */
 
diff --git a/src/decoder_thread.c b/src/decoder_thread.c
index 201cd5a..bb3ef93 100644
--- a/src/decoder_thread.c
+++ b/src/decoder_thread.c
@@ -38,6 +38,7 @@
 #include <glib.h>
 
 #include <unistd.h>
+#include <stdio.h> /* for SEEK_SET */
 
 #undef G_LOG_DOMAIN
 #define G_LOG_DOMAIN "decoder_thread"
diff --git a/src/directory.h b/src/directory.h
index 151cf54..9c0a9b5 100644
--- a/src/directory.h
+++ b/src/directory.h
@@ -43,7 +43,7 @@ struct directory {
 	time_t mtime;
 	ino_t inode;
 	dev_t device;
-	unsigned stat; /* not needed if ino_t == dev_t == 0 is impossible */
+	bool have_stat; /* not needed if ino_t == dev_t == 0 is impossible */
 	char path[sizeof(long)];
 };
 
diff --git a/src/encoder/flac_encoder.c b/src/encoder/flac_encoder.c
index c34faad..6389513 100644
--- a/src/encoder/flac_encoder.c
+++ b/src/encoder/flac_encoder.c
@@ -22,6 +22,8 @@
 #include "encoder_plugin.h"
 #include "audio_format.h"
 #include "pcm_buffer.h"
+#include "fifo_buffer.h"
+#include "growing_fifo.h"
 
 #include <assert.h>
 #include <string.h>
@@ -38,8 +40,11 @@ struct flac_encoder {
 
 	struct pcm_buffer expand_buffer;
 
-	struct pcm_buffer buffer;
-	size_t buffer_length;
+	/**
+	 * This buffer will hold encoded data from libFLAC until it is
+	 * picked up with flac_encoder_read().
+	 */
+	struct fifo_buffer *output_buffer;
 };
 
 extern const struct encoder_plugin flac_encoder_plugin;
@@ -140,11 +145,8 @@ flac_write_callback(G_GNUC_UNUSED const FLAC__StreamEncoder *fse,
 {
 	struct flac_encoder *encoder = (struct flac_encoder *) client_data;
 
-	char *buffer = pcm_buffer_get(&encoder->buffer, encoder->buffer_length + bytes);
-
 	//transfer data to buffer
-	memcpy( buffer + encoder->buffer_length, data, bytes);
-	encoder->buffer_length += bytes;
+	growing_fifo_append(&encoder->output_buffer, data, bytes);
 
 	return FLAC__STREAM_ENCODER_WRITE_STATUS_OK;
 }
@@ -156,8 +158,8 @@ flac_encoder_close(struct encoder *_encoder)
 
 	FLAC__stream_encoder_delete(encoder->fse);
 
-	pcm_buffer_deinit(&encoder->buffer);
 	pcm_buffer_deinit(&encoder->expand_buffer);
+	fifo_buffer_free(encoder->output_buffer);
 }
 
 static bool
@@ -201,10 +203,10 @@ flac_encoder_open(struct encoder *_encoder, struct audio_format *audio_format,
 		return false;
 	}
 
-	encoder->buffer_length = 0;
-	pcm_buffer_init(&encoder->buffer);
 	pcm_buffer_init(&encoder->expand_buffer);
 
+	encoder->output_buffer = growing_fifo_new();
+
 	/* this immediatelly outputs data throught callback */
 
 #if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT <= 7
@@ -325,16 +327,18 @@ static size_t
 flac_encoder_read(struct encoder *_encoder, void *dest, size_t length)
 {
 	struct flac_encoder *encoder = (struct flac_encoder *)_encoder;
-	char *buffer = pcm_buffer_get(&encoder->buffer, encoder->buffer_length);
-
-	if (length > encoder->buffer_length)
-		length = encoder->buffer_length;
 
-	memcpy(dest, buffer, length);
+	size_t max_length;
+	const char *src = fifo_buffer_read(encoder->output_buffer,
+					   &max_length);
+	if (src == NULL)
+		return 0;
 
-	encoder->buffer_length -= length;
-	memmove(buffer, buffer + length, encoder->buffer_length);
+	if (length > max_length)
+		length = max_length;
 
+	memcpy(dest, src, length);
+	fifo_buffer_consume(encoder->output_buffer, length);
 	return length;
 }
 
diff --git a/src/encoder/null_encoder.c b/src/encoder/null_encoder.c
index bf7e61c..4e45f43 100644
--- a/src/encoder/null_encoder.c
+++ b/src/encoder/null_encoder.c
@@ -20,7 +20,8 @@
 #include "config.h"
 #include "encoder_api.h"
 #include "encoder_plugin.h"
-#include "pcm_buffer.h"
+#include "fifo_buffer.h"
+#include "growing_fifo.h"
 
 #include <assert.h>
 #include <string.h>
@@ -28,8 +29,7 @@
 struct null_encoder {
 	struct encoder encoder;
 
-	struct pcm_buffer buffer;
-	size_t buffer_length;
+	struct fifo_buffer *buffer;
 };
 
 extern const struct encoder_plugin null_encoder_plugin;
@@ -65,7 +65,7 @@ null_encoder_close(struct encoder *_encoder)
 {
 	struct null_encoder *encoder = (struct null_encoder *)_encoder;
 
-	pcm_buffer_deinit(&encoder->buffer);
+	fifo_buffer_free(encoder->buffer);
 }
 
 
@@ -76,9 +76,7 @@ null_encoder_open(struct encoder *_encoder,
 {
 	struct null_encoder *encoder = (struct null_encoder *)_encoder;
 
-	encoder->buffer_length = 0;
-	pcm_buffer_init(&encoder->buffer);
-
+	encoder->buffer = growing_fifo_new();
 	return true;
 }
 
@@ -88,28 +86,26 @@ null_encoder_write(struct encoder *_encoder,
 		   G_GNUC_UNUSED GError **error)
 {
 	struct null_encoder *encoder = (struct null_encoder *)_encoder;
-	char *buffer = pcm_buffer_get(&encoder->buffer, encoder->buffer_length + length);
-
-	memcpy(buffer+encoder->buffer_length, data, length);
 
-	encoder->buffer_length += length;
-	return true;
+	growing_fifo_append(&encoder->buffer, data, length);
+	return length;
 }
 
 static size_t
 null_encoder_read(struct encoder *_encoder, void *dest, size_t length)
 {
 	struct null_encoder *encoder = (struct null_encoder *)_encoder;
-	char *buffer = pcm_buffer_get(&encoder->buffer, encoder->buffer_length);
-
-	if (length > encoder->buffer_length)
-		length = encoder->buffer_length;
 
-	memcpy(dest, buffer, length);
+	size_t max_length;
+	const void *src = fifo_buffer_read(encoder->buffer, &max_length);
+	if (src == NULL)
+		return 0;
 
-	encoder->buffer_length -= length;
-	memmove(buffer, buffer + length, encoder->buffer_length);
+	if (length > max_length)
+		length = max_length;
 
+	memcpy(dest, src, length);
+	fifo_buffer_consume(encoder->buffer, length);
 	return length;
 }
 
diff --git a/src/encoder/wave_encoder.c b/src/encoder/wave_encoder.c
index 938be5e..3a64c51 100644
--- a/src/encoder/wave_encoder.c
+++ b/src/encoder/wave_encoder.c
@@ -20,7 +20,8 @@
 #include "config.h"
 #include "encoder_api.h"
 #include "encoder_plugin.h"
-#include "pcm_buffer.h"
+#include "fifo_buffer.h"
+#include "growing_fifo.h"
 
 #include <assert.h>
 #include <string.h>
@@ -29,8 +30,7 @@ struct wave_encoder {
 	struct encoder encoder;
 	unsigned bits;
 
-	struct pcm_buffer buffer;
-	size_t buffer_length;
+	struct fifo_buffer *buffer;
 };
 
 struct wave_header {
@@ -92,7 +92,6 @@ wave_encoder_init(G_GNUC_UNUSED const struct config_param *param,
 
 	encoder = g_new(struct wave_encoder, 1);
 	encoder_struct_init(&encoder->encoder, &wave_encoder_plugin);
-	pcm_buffer_init(&encoder->buffer);
 
 	return &encoder->encoder;
 }
@@ -102,7 +101,6 @@ wave_encoder_finish(struct encoder *_encoder)
 {
 	struct wave_encoder *encoder = (struct wave_encoder *)_encoder;
 
-	pcm_buffer_deinit(&encoder->buffer);
 	g_free(encoder);
 }
 
@@ -112,7 +110,6 @@ wave_encoder_open(struct encoder *_encoder,
 		  G_GNUC_UNUSED GError **error)
 {
 	struct wave_encoder *encoder = (struct wave_encoder *)_encoder;
-	void *buffer;
 
 	assert(audio_format_valid(audio_format));
 
@@ -125,6 +122,11 @@ wave_encoder_open(struct encoder *_encoder,
 		encoder->bits = 16;
 		break;
 
+	case SAMPLE_FORMAT_S24:
+		audio_format->format = SAMPLE_FORMAT_S24_P32;
+		encoder->bits = 24;
+		break;
+
 	case SAMPLE_FORMAT_S24_P32:
 		encoder->bits = 24;
 		break;
@@ -139,19 +141,29 @@ wave_encoder_open(struct encoder *_encoder,
 		break;
 	}
 
-	buffer = pcm_buffer_get(&encoder->buffer, sizeof(struct wave_header) );
+	encoder->buffer = growing_fifo_new();
+	struct wave_header *header =
+		growing_fifo_write(&encoder->buffer, sizeof(*header));
 
 	/* create PCM wave header in initial buffer */
-	fill_wave_header((struct wave_header *) buffer,
+	fill_wave_header(header,
 			audio_format->channels,
 			 encoder->bits,
 			audio_format->sample_rate,
 			 (encoder->bits / 8) * audio_format->channels );
+	fifo_buffer_append(encoder->buffer, sizeof(*header));
 
-	encoder->buffer_length = sizeof(struct wave_header);
 	return true;
 }
 
+static void
+wave_encoder_close(struct encoder *_encoder)
+{
+	struct wave_encoder *encoder = (struct wave_encoder *)_encoder;
+
+	fifo_buffer_free(encoder->buffer);
+}
+
 static inline size_t
 pcm16_to_wave(uint16_t *dst16, const uint16_t *src16, size_t length)
 {
@@ -198,9 +210,8 @@ wave_encoder_write(struct encoder *_encoder,
 		   G_GNUC_UNUSED GError **error)
 {
 	struct wave_encoder *encoder = (struct wave_encoder *)_encoder;
-	void *dst;
 
-	dst = pcm_buffer_get(&encoder->buffer, encoder->buffer_length + length);
+	void *dst = growing_fifo_write(&encoder->buffer, length);
 
 #if (G_BYTE_ORDER == G_LITTLE_ENDIAN)
 	switch (encoder->bits) {
@@ -232,7 +243,7 @@ wave_encoder_write(struct encoder *_encoder,
 #error G_BYTE_ORDER set to G_PDP_ENDIAN is not supported by wave_encoder
 #endif
 
-	encoder->buffer_length += length;
+	fifo_buffer_append(encoder->buffer, length);
 	return true;
 }
 
@@ -240,16 +251,17 @@ static size_t
 wave_encoder_read(struct encoder *_encoder, void *dest, size_t length)
 {
 	struct wave_encoder *encoder = (struct wave_encoder *)_encoder;
-	uint8_t *buffer = pcm_buffer_get(&encoder->buffer, encoder->buffer_length );
-
-	if (length > encoder->buffer_length)
-		length = encoder->buffer_length;
 
-	memcpy(dest, buffer, length);
+	size_t max_length;
+	const void *src = fifo_buffer_read(encoder->buffer, &max_length);
+	if (src == NULL)
+		return 0;
 
-	encoder->buffer_length -= length;
-	memmove(buffer, buffer + length, encoder->buffer_length);
+	if (length > max_length)
+		length = max_length;
 
+	memcpy(dest, src, length);
+	fifo_buffer_consume(encoder->buffer, length);
 	return length;
 }
 
@@ -264,6 +276,7 @@ const struct encoder_plugin wave_encoder_plugin = {
 	.init = wave_encoder_init,
 	.finish = wave_encoder_finish,
 	.open = wave_encoder_open,
+	.close = wave_encoder_close,
 	.write = wave_encoder_write,
 	.read = wave_encoder_read,
 	.get_mime_type = wave_encoder_get_mime_type,
diff --git a/src/event_pipe.c b/src/event_pipe.c
index edfd40e..5b51998 100644
--- a/src/event_pipe.c
+++ b/src/event_pipe.c
@@ -21,7 +21,6 @@
 #include "event_pipe.h"
 #include "fd_util.h"
 #include "mpd_error.h"
-#include "glib_socket.h"
 
 #include <stdbool.h>
 #include <assert.h>
@@ -95,7 +94,11 @@ void event_pipe_init(void)
 	if (ret < 0)
 		MPD_ERROR("Couldn't open pipe: %s", strerror(errno));
 
-	channel = g_io_channel_new_socket(event_pipe[0]);
+#ifndef G_OS_WIN32
+	channel = g_io_channel_unix_new(event_pipe[0]);
+#else
+	channel = g_io_channel_win32_new_fd(event_pipe[0]);
+#endif
 	g_io_channel_set_encoding(channel, NULL, NULL);
 	g_io_channel_set_buffered(channel, false);
 
diff --git a/src/fifo_buffer.c b/src/fifo_buffer.c
index 9ac7270..915fb05 100644
--- a/src/fifo_buffer.c
+++ b/src/fifo_buffer.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2003-2010 The Music Player Daemon Project
+ * Copyright (C) 2003-2011 The Music Player Daemon Project
  * http://www.musicpd.org
  *
  * Redistribution and use in source and binary forms, with or without
@@ -58,6 +58,39 @@ fifo_buffer_new(size_t size)
 	return buffer;
 }
 
+static void
+fifo_buffer_move(struct fifo_buffer *buffer);
+
+struct fifo_buffer *
+fifo_buffer_realloc(struct fifo_buffer *buffer, size_t new_size)
+{
+	if (buffer == NULL)
+		return new_size > 0
+			? fifo_buffer_new(new_size)
+			: NULL;
+
+	/* existing data must fit in new size */
+	assert(new_size >= buffer->end - buffer->start);
+
+	if (new_size == 0) {
+		fifo_buffer_free(buffer);
+		return NULL;
+	}
+
+	/* compress the buffer when we're shrinking and the tail of
+	   the buffer would exceed the new size */
+	if (buffer->end > new_size)
+		fifo_buffer_move(buffer);
+
+	/* existing data must fit in new size: second check */
+	assert(buffer->end <= new_size);
+
+	buffer = g_realloc(buffer, sizeof(*buffer) - sizeof(buffer->buffer) +
+			   new_size);
+	buffer->size = new_size;
+	return buffer;
+}
+
 void
 fifo_buffer_free(struct fifo_buffer *buffer)
 {
@@ -66,6 +99,22 @@ fifo_buffer_free(struct fifo_buffer *buffer)
 	g_free(buffer);
 }
 
+size_t
+fifo_buffer_capacity(const struct fifo_buffer *buffer)
+{
+	assert(buffer != NULL);
+
+	return buffer->size;
+}
+
+size_t
+fifo_buffer_available(const struct fifo_buffer *buffer)
+{
+	assert(buffer != NULL);
+
+	return buffer->end - buffer->start;
+}
+
 void
 fifo_buffer_clear(struct fifo_buffer *buffer)
 {
diff --git a/src/fifo_buffer.h b/src/fifo_buffer.h
index 661dfd5..3bdb239 100644
--- a/src/fifo_buffer.h
+++ b/src/fifo_buffer.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2003-2010 The Music Player Daemon Project
+ * Copyright (C) 2003-2011 The Music Player Daemon Project
  * http://www.musicpd.org
  *
  * Redistribution and use in source and binary forms, with or without
@@ -57,12 +57,37 @@ struct fifo_buffer *
 fifo_buffer_new(size_t size);
 
 /**
+ * Change the capacity of the #fifo_buffer, while preserving existing
+ * data.
+ *
+ * @param buffer the old buffer, may be NULL
+ * @param new_size the requested new size of the #fifo_buffer; must
+ * not be smaller than the data which is stored in the old buffer
+ * @return the new buffer, may be NULL if the requested new size is 0
+ */
+struct fifo_buffer *
+fifo_buffer_realloc(struct fifo_buffer *buffer, size_t new_size);
+
+/**
  * Frees the resources consumed by this #fifo_buffer object.
  */
 void
 fifo_buffer_free(struct fifo_buffer *buffer);
 
 /**
+ * Return the capacity of the buffer, i.e. the size that was passed to
+ * fifo_buffer_new().
+ */
+size_t
+fifo_buffer_capacity(const struct fifo_buffer *buffer);
+
+/**
+ * Return the number of bytes currently stored in the buffer.
+ */
+size_t
+fifo_buffer_available(const struct fifo_buffer *buffer);
+
+/**
  * Clears all data currently in this #fifo_buffer object.  This does
  * not overwrite the actuall buffer; it just resets the internal
  * pointers.
diff --git a/src/refcount.h b/src/growing_fifo.c
similarity index 50%
copy from src/refcount.h
copy to src/growing_fifo.c
index 87a2715..88431f6 100644
--- a/src/refcount.h
+++ b/src/growing_fifo.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2003-2010 The Music Player Daemon Project
+ * Copyright (C) 2003-2011 The Music Player Daemon Project
  * http://www.musicpd.org
  *
  * Redistribution and use in source and binary forms, with or without
@@ -28,39 +28,63 @@
  * OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-/** \file
- *
- * A very simple reference counting library.
- */
+#include "growing_fifo.h"
+#include "fifo_buffer.h"
 
-#ifndef MPD_REFCOUNT_H
-#define MPD_REFCOUNT_H
+#include <assert.h>
+#include <string.h>
 
-#include <glib.h>
-
-struct refcount {
-	gint n;
-};
+/**
+ * Align buffer sizes at 8 kB boundaries.  Must be a power of two.
+ */
+static const size_t GROWING_FIFO_ALIGN = 8192;
 
-static inline void
-refcount_init(struct refcount *r)
+/**
+ * Align the specified size to the next #GROWING_FIFO_ALIGN boundary.
+ */
+static size_t
+align(size_t size)
 {
-	r->n = 1;
+	return ((size - 1) | (GROWING_FIFO_ALIGN - 1)) + 1;
 }
 
-static inline void
-refcount_inc(struct refcount *r)
+struct fifo_buffer *
+growing_fifo_new(void)
 {
-	g_atomic_int_inc(&r->n);
+	return fifo_buffer_new(GROWING_FIFO_ALIGN);
 }
 
-/**
- * @return true if the number of references has been dropped to 0
- */
-static inline bool
-refcount_dec(struct refcount *r)
+void *
+growing_fifo_write(struct fifo_buffer **buffer_p, size_t length)
 {
-	return g_atomic_int_dec_and_test(&r->n);
+	assert(buffer_p != NULL);
+
+	struct fifo_buffer *buffer = *buffer_p;
+	assert(buffer != NULL);
+
+	size_t max_length;
+	void *p = fifo_buffer_write(buffer, &max_length);
+	if (p != NULL && max_length >= length)
+		return p;
+
+	/* grow */
+	size_t new_size = fifo_buffer_available(buffer) + length;
+	assert(new_size > fifo_buffer_capacity(buffer));
+	*buffer_p = buffer = fifo_buffer_realloc(buffer, align(new_size));
+
+	/* try again */
+	p = fifo_buffer_write(buffer, &max_length);
+	assert(p != NULL);
+	assert(max_length >= length);
+
+	return p;
 }
 
-#endif
+void
+growing_fifo_append(struct fifo_buffer **buffer_p,
+		    const void *data, size_t length)
+{
+	void *p = growing_fifo_write(buffer_p, length);
+	memcpy(p, data, length);
+	fifo_buffer_append(*buffer_p, length);
+}
diff --git a/src/refcount.h b/src/growing_fifo.h
similarity index 56%
copy from src/refcount.h
copy to src/growing_fifo.h
index 87a2715..723c3b3 100644
--- a/src/refcount.h
+++ b/src/growing_fifo.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2003-2010 The Music Player Daemon Project
+ * Copyright (C) 2003-2011 The Music Player Daemon Project
  * http://www.musicpd.org
  *
  * Redistribution and use in source and binary forms, with or without
@@ -30,37 +30,44 @@
 
 /** \file
  *
- * A very simple reference counting library.
+ * Helper functions for our FIFO buffer library (fifo_buffer.h) that
+ * allows growing the buffer on demand.
+ *
+ * This library is not thread safe.
  */
 
-#ifndef MPD_REFCOUNT_H
-#define MPD_REFCOUNT_H
+#ifndef MPD_GROWING_FIFO_H
+#define MPD_GROWING_FIFO_H
 
-#include <glib.h>
+#include <stddef.h>
 
-struct refcount {
-	gint n;
-};
+struct fifo_buffer;
 
-static inline void
-refcount_init(struct refcount *r)
-{
-	r->n = 1;
-}
+/**
+ * Allocate a new #fifo_buffer with the default size.
+ */
+struct fifo_buffer *
+growing_fifo_new(void);
 
-static inline void
-refcount_inc(struct refcount *r)
-{
-	g_atomic_int_inc(&r->n);
-}
+/**
+ * Prepares writing to the buffer, see fifo_buffer_write() for
+ * details.  The difference is that this function will automatically
+ * grow the buffer if it is too small.
+ *
+ * The caller is responsible for limiting the capacity of the buffer.
+ *
+ * @param length the number of bytes that will be written
+ * @return a pointer to the end of the buffer (will not be NULL)
+ */
+void *
+growing_fifo_write(struct fifo_buffer **buffer_p, size_t length);
 
 /**
- * @return true if the number of references has been dropped to 0
+ * A helper function that combines growing_fifo_write(), memcpy(),
+ * fifo_buffer_append().
  */
-static inline bool
-refcount_dec(struct refcount *r)
-{
-	return g_atomic_int_dec_and_test(&r->n);
-}
+void
+growing_fifo_append(struct fifo_buffer **buffer_p,
+		    const void *data, size_t length);
 
 #endif
diff --git a/src/input/ffmpeg_input_plugin.c b/src/input/ffmpeg_input_plugin.c
index 0a6be29..8ff66c5 100644
--- a/src/input/ffmpeg_input_plugin.c
+++ b/src/input/ffmpeg_input_plugin.c
@@ -32,10 +32,18 @@
 #undef G_LOG_DOMAIN
 #define G_LOG_DOMAIN "input_ffmpeg"
 
+#ifndef AV_VERSION_INT
+#define AV_VERSION_INT(a, b, c) (a<<16 | b<<8 | c)
+#endif
+
 struct input_ffmpeg {
 	struct input_stream base;
 
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,0,0)
+	AVIOContext *h;
+#else
 	URLContext *h;
+#endif
 
 	bool eof;
 };
@@ -46,6 +54,17 @@ ffmpeg_quark(void)
 	return g_quark_from_static_string("ffmpeg");
 }
 
+static inline bool
+input_ffmpeg_supported(void)
+{
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,0,0)
+	void *opaque = NULL;
+	return avio_enum_protocols(&opaque, 0) != NULL;
+#else
+	return av_protocol_next(NULL) != NULL;
+#endif
+}
+
 static bool
 input_ffmpeg_init(G_GNUC_UNUSED const struct config_param *param,
 		  G_GNUC_UNUSED GError **error_r)
@@ -54,7 +73,7 @@ input_ffmpeg_init(G_GNUC_UNUSED const struct config_param *param,
 
 #if LIBAVFORMAT_VERSION_MAJOR >= 52
 	/* disable this plugin if there's no registered protocol */
-	if (av_protocol_next(NULL) == NULL) {
+	if (!input_ffmpeg_supported()) {
 		g_set_error(error_r, ffmpeg_quark(), 0,
 			    "No protocol");
 		return false;
@@ -80,7 +99,11 @@ input_ffmpeg_open(const char *uri, GError **error_r)
 	i = g_new(struct input_ffmpeg, 1);
 	input_stream_init(&i->base, &input_plugin_ffmpeg, uri);
 
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,0,0)
+	int ret = avio_open(&i->h, uri, AVIO_FLAG_READ);
+#else
 	int ret = url_open(&i->h, uri, URL_RDONLY);
+#endif
 	if (ret != 0) {
 		g_free(i);
 		g_set_error(error_r, ffmpeg_quark(), ret,
@@ -91,8 +114,13 @@ input_ffmpeg_open(const char *uri, GError **error_r)
 	i->eof = false;
 
 	i->base.ready = true;
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,0,0)
+	i->base.seekable = (i->h->seekable & AVIO_SEEKABLE_NORMAL) != 0;
+	i->base.size = avio_size(i->h);
+#else
 	i->base.seekable = !i->h->is_streamed;
 	i->base.size = url_filesize(i->h);
+#endif
 
 	/* hack to make MPD select the "ffmpeg" decoder plugin - since
 	   avio.h doesn't tell us the MIME type of the resource, we
@@ -109,7 +137,11 @@ input_ffmpeg_read(struct input_stream *is, void *ptr, size_t size,
 {
 	struct input_ffmpeg *i = (struct input_ffmpeg *)is;
 
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,0,0)
+	int ret = avio_read(i->h, ptr, size);
+#else
 	int ret = url_read(i->h, ptr, size);
+#endif
 	if (ret <= 0) {
 		if (ret < 0)
 			g_set_error(error_r, ffmpeg_quark(), 0,
@@ -128,7 +160,11 @@ input_ffmpeg_close(struct input_stream *is)
 {
 	struct input_ffmpeg *i = (struct input_ffmpeg *)is;
 
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,0,0)
+	avio_close(i->h);
+#else
 	url_close(i->h);
+#endif
 	input_stream_deinit(&i->base);
 	g_free(i);
 }
@@ -146,7 +182,11 @@ input_ffmpeg_seek(struct input_stream *is, goffset offset, int whence,
 		  G_GNUC_UNUSED GError **error_r)
 {
 	struct input_ffmpeg *i = (struct input_ffmpeg *)is;
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,0,0)
+	int64_t ret = avio_seek(i->h, offset, whence);
+#else
 	int64_t ret = url_seek(i->h, offset, whence);
+#endif
 
 	if (ret >= 0) {
 		i->eof = false;
diff --git a/src/log.c b/src/log.c
index 556c8b0..99a9a8f 100644
--- a/src/log.c
+++ b/src/log.c
@@ -139,8 +139,8 @@ log_init_file(const char *path, unsigned line)
 	out_filename = path;
 	out_fd = open_log_file();
 	if (out_fd < 0)
-		MPD_ERROR("problem opening log file \"%s\" (config line %u) "
-			  "for writing\n", path, line);
+		MPD_ERROR("failed to open log file \"%s\" (config line %u): %s",
+			  path, line, g_strerror(errno));
 
 	g_log_set_default_handler(file_log_func, NULL);
 }
diff --git a/src/main_win32.c b/src/main_win32.c
index 543d8ba..e1ddb53 100644
--- a/src/main_win32.c
+++ b/src/main_win32.c
@@ -27,7 +27,6 @@
 
 #include <glib.h>
 
-#define WINVER 0x0501
 #include <windows.h>
 
 static int service_argc;
diff --git a/src/mapper.c b/src/mapper.c
index 108de95..3cee41e 100644
--- a/src/mapper.c
+++ b/src/mapper.c
@@ -31,6 +31,10 @@
 
 #include <assert.h>
 #include <string.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <errno.h>
+#include <dirent.h>
 
 static char *music_dir;
 static size_t music_dir_length;
@@ -52,24 +56,50 @@ strdup_chop_slash(const char *path_fs)
 }
 
 static void
+check_directory(const char *path)
+{
+	struct stat st;
+	if (stat(path, &st) < 0) {
+		g_warning("Failed to stat directory \"%s\": %s",
+			  path, g_strerror(errno));
+		return;
+	}
+
+	if (!S_ISDIR(st.st_mode)) {
+		g_warning("Not a directory: %s", path);
+		return;
+	}
+
+#ifndef WIN32
+	char *x = g_build_filename(path, ".", NULL);
+	if (stat(x, &st) < 0 && errno == EACCES)
+		g_warning("No permission to traverse (\"execute\") directory: %s",
+			  path);
+	g_free(x);
+#endif
+
+	DIR *dir = opendir(path);
+	if (dir == NULL && errno == EACCES)
+		g_warning("No permission to read directory: %s", path);
+	else
+		closedir(dir);
+}
+
+static void
 mapper_set_music_dir(const char *path)
 {
+	check_directory(path);
+
 	music_dir = strdup_chop_slash(path);
 	music_dir_length = strlen(music_dir);
-
-	if (!g_file_test(music_dir, G_FILE_TEST_IS_DIR))
-		g_warning("music directory is not a directory: \"%s\"",
-			  music_dir);
 }
 
 static void
 mapper_set_playlist_dir(const char *path)
 {
-	playlist_dir = g_strdup(path);
+	check_directory(path);
 
-	if (!g_file_test(playlist_dir, G_FILE_TEST_IS_DIR))
-		g_warning("playlist directory is not a directory: \"%s\"",
-			  playlist_dir);
+	playlist_dir = g_strdup(path);
 }
 
 void mapper_init(const char *_music_dir, const char *_playlist_dir)
diff --git a/src/output/openal_plugin.c b/src/output/openal_plugin.c
index 0a8f253..e5db8ac 100644
--- a/src/output/openal_plugin.c
+++ b/src/output/openal_plugin.c
@@ -58,6 +58,10 @@ openal_output_quark(void)
 static ALenum
 openal_audio_format(struct audio_format *audio_format)
 {
+	/* note: cannot map SAMPLE_FORMAT_S8 to AL_FORMAT_STEREO8 or
+	   AL_FORMAT_MONO8 since OpenAL expects unsigned 8 bit
+	   samples, while MPD uses signed samples */
+
 	switch (audio_format->format) {
 	case SAMPLE_FORMAT_S16:
 		if (audio_format->channels == 2)
@@ -69,16 +73,6 @@ openal_audio_format(struct audio_format *audio_format)
 		audio_format->channels = 1;
 		return openal_audio_format(audio_format);
 
-	case SAMPLE_FORMAT_S8:
-		if (audio_format->channels == 2)
-			return AL_FORMAT_STEREO8;
-		if (audio_format->channels == 1)
-			return AL_FORMAT_MONO8;
-
-		/* fall back to mono */
-		audio_format->channels = 1;
-		return openal_audio_format(audio_format);
-
 	default:
 		/* fall back to 16 bit */
 		audio_format->format = SAMPLE_FORMAT_S16;
diff --git a/src/output/osx_plugin.c b/src/output/osx_plugin.c
index 7639f3b..5284afc 100644
--- a/src/output/osx_plugin.c
+++ b/src/output/osx_plugin.c
@@ -118,7 +118,6 @@ osx_render(void *vdata,
 	g_mutex_lock(od->mutex);
 
 	bytes_to_copy = MIN(od->len, buffer_size);
-	buffer_size = bytes_to_copy;
 	od->len -= bytes_to_copy;
 
 	trailer_length = od->buffer_size - od->pos;
@@ -140,11 +139,9 @@ osx_render(void *vdata,
 	g_cond_signal(od->condition);
 	g_mutex_unlock(od->mutex);
 
-	buffer->mDataByteSize = buffer_size;
-
-	if (!buffer_size) {
-		g_usleep(1000);
-	}
+	if (bytes_to_copy < buffer_size)
+		memset((unsigned char*)buffer->mData + bytes_to_copy, 0,
+		       buffer_size - bytes_to_copy);
 
 	return 0;
 }
diff --git a/src/path.c b/src/path.c
index 5e39c16..d1b9ad6 100644
--- a/src/path.c
+++ b/src/path.c
@@ -27,6 +27,11 @@
 #include <assert.h>
 #include <string.h>
 
+#ifdef G_OS_WIN32
+#include <windows.h> // for GetACP()
+#include <stdio.h> // for sprintf()
+#endif
+
 #undef G_LOG_DOMAIN
 #define G_LOG_DOMAIN "path"
 
@@ -85,11 +90,22 @@ void path_global_init(void)
 
 	charset = config_get_string(CONF_FS_CHARSET, NULL);
 	if (charset == NULL) {
+#ifndef G_OS_WIN32
 		const gchar **encodings;
 		g_get_filename_charsets(&encodings);
 
 		if (encodings[0] != NULL && *encodings[0] != '\0')
 			charset = encodings[0];
+#else /* G_OS_WIN32 */
+		/* Glib claims that file system encoding is always utf-8
+		 * on native Win32 (i.e. not Cygwin).
+		 * However this is true only if <gstdio.h> helpers are used.
+		 * MPD uses regular <stdio.h> functions.
+		 * Those functions use encoding determined by GetACP(). */
+		char win_charset[13];
+		sprintf(win_charset, "cp%u", GetACP());
+		charset = win_charset;
+#endif
 	}
 
 	if (charset) {
diff --git a/src/inotify_update.h b/src/pcm_buffer.c
similarity index 63%
copy from src/inotify_update.h
copy to src/pcm_buffer.c
index 92b4e0c..b0449d4 100644
--- a/src/inotify_update.h
+++ b/src/pcm_buffer.c
@@ -17,31 +17,32 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#ifndef MPD_INOTIFY_UPDATE_H
-#define MPD_INOTIFY_UPDATE_H
+#include "pcm_buffer.h"
 
-#include "check.h"
-
-#ifdef HAVE_INOTIFY_INIT
-
-void
-mpd_inotify_init(unsigned max_depth);
-
-void
-mpd_inotify_finish(void);
-
-#else /* !HAVE_INOTIFY_INIT */
-
-static inline void
-mpd_inotify_init(G_GNUC_UNUSED unsigned max_depth)
+/**
+ * Align the specified size to the next 8k boundary.
+ */
+G_GNUC_CONST
+static size_t
+align_8k(size_t size)
 {
+	return ((size - 1) | 0x1fff) + 1;
 }
 
-static inline void
-mpd_inotify_finish(void)
+void *
+pcm_buffer_get(struct pcm_buffer *buffer, size_t size)
 {
-}
+	assert(buffer != NULL);
+
+	if (buffer->size < size) {
+		/* free the old buffer */
+		g_free(buffer->buffer);
 
-#endif /* !HAVE_INOTIFY_INIT */
+		buffer->size = align_8k(size);
+		buffer->buffer = g_malloc(buffer->size);
+	}
 
-#endif
+	assert(buffer->size >= size);
+
+	return buffer->buffer;
+}
diff --git a/src/pcm_buffer.h b/src/pcm_buffer.h
index 73959ea..fe223c7 100644
--- a/src/pcm_buffer.h
+++ b/src/pcm_buffer.h
@@ -22,6 +22,8 @@
 
 #include <glib.h>
 
+#include <assert.h>
+
 /**
  * Manager for a temporary buffer which grows as needed.  We could
  * allocate a new buffer every time pcm_convert() is called, but that
@@ -39,6 +41,8 @@ struct pcm_buffer {
 static inline void
 pcm_buffer_init(struct pcm_buffer *buffer)
 {
+	assert(buffer != NULL);
+
 	buffer->buffer = NULL;
 	buffer->size = 0;
 }
@@ -49,6 +53,8 @@ pcm_buffer_init(struct pcm_buffer *buffer)
 static inline void
 pcm_buffer_deinit(struct pcm_buffer *buffer)
 {
+	assert(buffer != NULL);
+
 	g_free(buffer->buffer);
 
 	buffer->buffer = NULL;
@@ -58,19 +64,8 @@ pcm_buffer_deinit(struct pcm_buffer *buffer)
  * Get the buffer, and guarantee a minimum size.  This buffer becomes
  * invalid with the next pcm_buffer_get() call.
  */
-static inline void *
-pcm_buffer_get(struct pcm_buffer *buffer, size_t size)
-{
-	if (buffer->size < size) {
-		/* free the old buffer */
-		g_free(buffer->buffer);
-
-		/* allocate a new buffer; align at 8 kB boundaries */
-		buffer->size = ((size - 1) | 0x1fff) + 1;
-		buffer->buffer = g_malloc(buffer->size);
-	}
-
-	return buffer->buffer;
-}
+G_GNUC_MALLOC
+void *
+pcm_buffer_get(struct pcm_buffer *buffer, size_t size);
 
 #endif
diff --git a/src/playlist_edit.c b/src/playlist_edit.c
index c54b727..3bcb2ce 100644
--- a/src/playlist_edit.c
+++ b/src/playlist_edit.c
@@ -356,7 +356,7 @@ playlist_move_range(struct playlist *playlist,
 					      playlist->current)
 		: -1;
 	if (to < 0 && playlist->current >= 0) {
-		if (start <= (unsigned)currentSong && (unsigned)currentSong <= end)
+		if (start <= (unsigned)currentSong && (unsigned)currentSong < end)
 			/* no-op, can't be moved to offset of itself */
 			return PLAYLIST_RESULT_SUCCESS;
 		to = (currentSong + abs(to)) % queue_length(&playlist->queue);
diff --git a/src/server_socket.c b/src/server_socket.c
index b4114d2..482e0cd 100644
--- a/src/server_socket.c
+++ b/src/server_socket.c
@@ -34,7 +34,6 @@
 #include <assert.h>
 
 #ifdef WIN32
-#define WINVER 0x0501
 #include <ws2tcpip.h>
 #include <winsock.h>
 #else
diff --git a/src/socket_util.c b/src/socket_util.c
index 3f7075e..d165106 100644
--- a/src/socket_util.c
+++ b/src/socket_util.c
@@ -28,7 +28,6 @@
 #include <sys/socket.h>
 #include <netdb.h>
 #else /* G_OS_WIN32 */
-#define WINVER 0x0501
 #include <ws2tcpip.h>
 #include <winsock.h>
 #endif /* G_OS_WIN32 */
diff --git a/src/stats.c b/src/stats.c
index 673d531..718d863 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -116,6 +116,6 @@ int stats_print(struct client *client)
 		      (long)g_timer_elapsed(stats.timer, NULL),
 		      (long)(pc_get_total_play_time() + 0.5),
 		      stats.song_duration,
-		      db_get_mtime());
+		      (long)db_get_mtime());
 	return 0;
 }
diff --git a/src/timer.c b/src/timer.c
index 0b3b119..ba82fc5 100644
--- a/src/timer.c
+++ b/src/timer.c
@@ -81,7 +81,7 @@ timer_delay(const Timer *timer)
 	if (delay > G_MAXINT)
 		delay = G_MAXINT;
 
-	return delay / 1000;
+	return delay;
 }
 
 void timer_sync(Timer *timer)
diff --git a/src/update_walk.c b/src/update_walk.c
index bf3c8f5..03fa784 100644
--- a/src/update_walk.c
+++ b/src/update_walk.c
@@ -86,7 +86,7 @@ directory_set_stat(struct directory *dir, const struct stat *st)
 {
 	dir->inode = st->st_ino;
 	dir->device = st->st_dev;
-	dir->stat = 1;
+	dir->have_stat = true;
 }
 
 static void
@@ -346,7 +346,7 @@ inodeFoundInParent(struct directory *parent, ino_t inode, dev_t device)
 {
 #ifndef G_OS_WIN32
 	while (parent) {
-		if (!parent->stat && statDirectory(parent) < 0)
+		if (!parent->have_stat && statDirectory(parent) < 0)
 			return -1;
 		if (parent->inode == inode && parent->device == device) {
 			g_debug("recursive directory found");
@@ -616,6 +616,8 @@ update_regular_file(struct directory *directory,
 		}
 
 		if (song == NULL) {
+			g_debug("reading %s/%s",
+				directory_get_path(directory), name);
 			song = song_file_load(name, directory);
 			if (song == NULL) {
 				g_debug("ignoring unrecognized file %s/%s",
diff --git a/src/utils.c b/src/utils.c
index 53494cc..6e85dd5 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -33,7 +33,11 @@
 #include <pwd.h>
 #endif
 
-#ifdef HAVE_IPV6
+#if HAVE_IPV6 && WIN32
+#include <winsock2.h>
+#endif 
+
+#if HAVE_IPV6 && ! WIN32
 #include <sys/socket.h>
 #endif
 
diff --git a/test/read_tags.c b/test/read_tags.c
index 3e5e523..07d1afc 100644
--- a/test/read_tags.c
+++ b/test/read_tags.c
@@ -24,6 +24,7 @@
 #include "input_stream.h"
 #include "audio_format.h"
 #include "pcm_volume.h"
+#include "tag_pool.h"
 #include "tag_ape.h"
 #include "tag_id3.h"
 #include "idle.h"
@@ -164,6 +165,8 @@ int main(int argc, char **argv)
 	decoder_name = argv[1];
 	path = argv[2];
 
+	tag_pool_init();
+
 	if (!input_stream_global_init(&error)) {
 		g_warning("%s", error->message);
 		g_error_free(error);
@@ -215,5 +218,7 @@ int main(int argc, char **argv)
 		}
 	}
 
+	tag_pool_deinit();
+
 	return 0;
 }
diff --git a/test/run_decoder.c b/test/run_decoder.c
index c997ebf..8dbd530 100644
--- a/test/run_decoder.c
+++ b/test/run_decoder.c
@@ -20,6 +20,7 @@
 #include "config.h"
 #include "decoder_list.h"
 #include "decoder_api.h"
+#include "tag_pool.h"
 #include "input_init.h"
 #include "input_stream.h"
 #include "audio_format.h"
@@ -180,6 +181,8 @@ int main(int argc, char **argv)
 
 	g_log_set_default_handler(my_log_func, NULL);
 
+	tag_pool_init();
+
 	if (!input_stream_global_init(&error)) {
 		g_warning("%s", error->message);
 		g_error_free(error);
@@ -228,5 +231,7 @@ int main(int argc, char **argv)
 		return 1;
 	}
 
+	tag_pool_deinit();
+
 	return 0;
 }

-- 
Git repository for pkg-mpd



More information about the Pkg-mpd-commits mailing list