X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=alsa_write.c;h=a211985ab94bb71406d7729793387bbabc5fc452;hb=128c594f32be41d928df432298a013a168891ab7;hp=1ae266371c2215ee3400d459b9a1854f98d63e15;hpb=85094cd802bdb606d4e2bf7ed66dec51db2a0953;p=paraslash.git diff --git a/alsa_write.c b/alsa_write.c index 1ae26637..a211985a 100644 --- a/alsa_write.c +++ b/alsa_write.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2011 Andre Noll + * Copyright (C) 2005-2012 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -113,6 +113,8 @@ static int alsa_init(struct private_alsa_write_data *pad, NULL); if (ret < 0 || buffer_time == 0) goto fail; + /* buffer at most 500 milliseconds */ + buffer_time = PARA_MIN(buffer_time, 500U * 1000U); msg = "could not set buffer time"; ret = snd_pcm_hw_params_set_buffer_time_near(pad->handle, hwparams, &buffer_time, NULL);