aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-12-01 22:37:05 +0100
committerMax Kellermann <max@duempel.org>2008-12-01 22:37:05 +0100
commit4ca24f22f191033e5dbb88f34e4088bc2814ed0f (patch)
treea5f892c007a005fda221538aba1771fc7f898bc8 /src
parent7e568faa4d63f94df4cb2008e96abf4f4b6b9ac5 (diff)
downloadmpd-4ca24f22f191033e5dbb88f34e4088bc2814ed0f.tar.gz
mpd-4ca24f22f191033e5dbb88f34e4088bc2814ed0f.tar.xz
mpd-4ca24f22f191033e5dbb88f34e4088bc2814ed0f.zip
alsa: reverted the default buffer_time to 500 ms
Commit dd7711d8 removed MPD's default ALSA buffer_time. The result was a buffer size which was way too small for playing streams on some sound hardware, and caused skips and distorted sound. Revert the default to 500 ms.
Diffstat (limited to '')
-rw-r--r--src/output/alsa_plugin.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/output/alsa_plugin.c b/src/output/alsa_plugin.c
index a7f37f139..e5ac61088 100644
--- a/src/output/alsa_plugin.c
+++ b/src/output/alsa_plugin.c
@@ -28,6 +28,10 @@
static const char default_device[] = "default";
+enum {
+ MPD_ALSA_BUFFER_TIME_US = 500000,
+};
+
#define MPD_ALSA_RETRY_NR 5
typedef snd_pcm_sframes_t alsa_writei_t(snd_pcm_t * pcm, const void *buffer,
@@ -62,7 +66,7 @@ static AlsaData *newAlsaData(void)
ret->pcmHandle = NULL;
ret->writei = snd_pcm_writei;
ret->useMmap = 0;
- ret->buffer_time = 0;
+ ret->buffer_time = MPD_ALSA_BUFFER_TIME_US;
ret->period_time = 0;
return ret;