From fd8aa54a90c7e18ab4ff3e4be7bc40e2c475839f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 18 Aug 2009 11:32:54 +0200 Subject: output_init: initialize the "pause" flag Fix stuttering due to uninitialized variable. --- src/output_init.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/output_init.c b/src/output_init.c index 04609bb76..927424324 100644 --- a/src/output_init.c +++ b/src/output_init.c @@ -109,6 +109,7 @@ audio_output_init(struct audio_output *ao, const struct config_param *param, ao->plugin = plugin; ao->enabled = config_get_block_bool(param, "enabled", true); ao->open = false; + ao->pause = false; ao->fail_timer = NULL; pcm_convert_init(&ao->convert_state); -- cgit v1.2.3 From 9d42f4e0ed81969b4fcf1c20e60e867a2defe636 Mon Sep 17 00:00:00 2001 From: Igor Kuzmin Date: Wed, 19 Aug 2009 21:21:29 +0200 Subject: update: don't re-read unchanged container files MPD checks if every flac (possibly other types as well) file contains cuesheet on every update, which produces unneeded I/O. My music collection is on NFS share, so it's quite noticeable. IMHO, it shouldn't re-read unchanged files, so I wrote simple patch to fix it. --- src/update.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/update.c b/src/update.c index bdf84ce36..593198cb9 100644 --- a/src/update.c +++ b/src/update.c @@ -502,7 +502,8 @@ update_regular_file(struct directory *directory, { struct song* song = songvec_find(&directory->songs, name); - if (plugin->container_scan != NULL) + if (!(song != NULL && st->st_mtime == song->mtime) && + plugin->container_scan != NULL) { if (update_container_file(directory, name, st, plugin)) { -- cgit v1.2.3 From 408f723701526926a2eba3435a079f0a91b0df66 Mon Sep 17 00:00:00 2001 From: Rasmus Steinke Date: Mon, 24 Aug 2009 22:14:22 +0200 Subject: decoder/vorbis: faster tag scanning with ov_test_callback() using ov_test_callback with function CALLBACKS_STREAMONLY will cause scanning to stop after the comment field. ov_open (and ov_test) default to CALLBACKS_DEFAULT which scans the file structure causing a huge slowdown. The speed improvement is huge: It scanned my files around 10x faster This procedure has been recommended by monthy (main vorbis developer) and was said to be safe for scanning files. --- src/decoder/vorbis_plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/decoder/vorbis_plugin.c b/src/decoder/vorbis_plugin.c index d4f81e91f..81950eb22 100644 --- a/src/decoder/vorbis_plugin.c +++ b/src/decoder/vorbis_plugin.c @@ -383,7 +383,7 @@ vorbis_tag_dup(const char *file) return NULL; } - if (ov_open(fp, &vf, NULL, 0) < 0) { + if (ov_test_callbacks(fp, &vf, NULL, 0, OV_CALLBACKS_STREAMONLY) < 0) { fclose(fp); return NULL; } -- cgit v1.2.3