1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-23 23:32:26 +00:00

replace set_periods and set_period_size with their _near cousins

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12004 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
henry 2004-02-27 17:03:08 +00:00
parent bdf78eabee
commit 8c55d85a17

View File

@ -633,7 +633,7 @@ static int init(int rate_hz, int channels, int format, int flags)
#ifdef SET_CHUNKSIZE
{
//set chunksize
if ((err = snd_pcm_hw_params_set_period_size(alsa_handler, alsa_hwparams, chunk_size, 0)) < 0)
if ((err = snd_pcm_hw_params_set_period_size_near(alsa_handler, alsa_hwparams, chunk_size, 0)) < 0)
{
printf("alsa-init: unable to set periodsize: %s\n", snd_strerror(err));
return(0);
@ -650,7 +650,7 @@ static int init(int rate_hz, int channels, int format, int flags)
if (verbose>0)
printf("alsa-init: current val=%i, fragcount=%i\n", period_val, alsa_fragcount);
if ((err = snd_pcm_hw_params_set_periods(alsa_handler, alsa_hwparams, alsa_fragcount, 0)) < 0) {
if ((err = snd_pcm_hw_params_set_periods_near(alsa_handler, alsa_hwparams, alsa_fragcount, 0)) < 0) {
printf("alsa-init: unable to set periods: %s\n", snd_strerror(err));
}
}