http://bugs.winehq.org/show_bug.cgi?id=25859
--- Comment #1 from Raymond superquad.vortex2@gmail.com 2011-01-23 03:10:04 CST --- http://git.alsa-project.org/?p=alsa-kernel.git;a=blob;f=sound/pci/hda/hda_in...
snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 128); snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 128);
winealsa.drv/waveout.c
unsigned int buffer_time = 120000; unsigned int period_time = 22000;
reverse the order seem fix the bug
- dir=0; - EXIT_ON_ERROR( snd_pcm_hw_params_set_buffer_time_near(pcm, hw_params, &buffer_time, &dir), MMSYSERR_INVALPARAM, "unable to set buffer time"); dir=0; EXIT_ON_ERROR( snd_pcm_hw_params_set_period_time_near(pcm, hw_params, &period_time, &dir), MMSYSERR_INVALPARAM, "unable to set period time"); + dir=0; + EXIT_ON_ERROR( snd_pcm_hw_params_set_buffer_time_near(pcm, hw_params, &buffer_time, &dir), MMSYSERR_INVALPARAM, "unable to set buffer time");