X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=alsa_write.c;h=67ab59ad357127dbc3b065b73f1a250ee91b22b4;hp=d7828945ae8666b83a0eadaf1f5a28d0bf39fabf;hb=16758aa8a898d222ef417d408916f1dc11b12650;hpb=44b21efca6080fcc88830facd98e50e4c5e66505 diff --git a/alsa_write.c b/alsa_write.c index d7828945..67ab59ad 100644 --- a/alsa_write.c +++ b/alsa_write.c @@ -12,6 +12,7 @@ * based on the vplay program by Michael Beck. */ +#include #include #include #include @@ -79,18 +80,19 @@ static int alsa_init(struct private_alsa_write_data *pad, pad->channels) < 0) return -E_CHANNEL_COUNT; if (snd_pcm_hw_params_set_rate_near(pad->handle, hwparams, - &pad->samplerate, 0) < 0) + &pad->samplerate, NULL) < 0) return -E_SET_RATE; - err = snd_pcm_hw_params_get_buffer_time_max(hwparams, &pad->buffer_time, 0); + err = snd_pcm_hw_params_get_buffer_time_max(hwparams, + &pad->buffer_time, NULL); if (err < 0 || !pad->buffer_time) return -E_GET_BUFFER_TIME; PARA_INFO_LOG("buffer time: %d\n", pad->buffer_time); if (snd_pcm_hw_params_set_buffer_time_near(pad->handle, hwparams, - &pad->buffer_time, 0) < 0) + &pad->buffer_time, NULL) < 0) return -E_SET_BUFFER_TIME; if (snd_pcm_hw_params(pad->handle, hwparams) < 0) return -E_HW_PARAMS; - snd_pcm_hw_params_get_period_size(hwparams, &period_size, 0); + snd_pcm_hw_params_get_period_size(hwparams, &period_size, NULL); snd_pcm_hw_params_get_buffer_size(hwparams, &buffer_size); PARA_INFO_LOG("buffer size: %lu, period_size: %lu\n", buffer_size, period_size);