Dimitrie O. Paun wrote:
The best thing to do is to post it here so we can see what we are
talking about... And yes, we all want only the best code for wine :)
The code is already submitted in my patch. After thinking twice, I found that the runtime check can be sped up. Calling snd_async_callback_t twice is enough. Because we could commit the whole buffer for the first time, ALSA driver will know the buffer is full. If the buffer will be reallocated, it is the right time for the driver to perform the action. And the new address will be returned next time we call snd_pcm_mmap_begin. We need not wait for the whole buffer to be played once.
And I got some new information about the noticeable interval. Seems it's something about the sound data format was not correctly set, for
sox -c1 -r44100 -sw /usr/share/sounds/pop.wav -tossdsp /dev/audio && wine winamp
has the problem, but
sox -c1 -r44100 -sb /usr/share/sounds/pop.wav -tossdsp /dev/audio && wine winamp
is unbelievably good. How could it be? I should find out if it's something is wrong with my system or something else.
--
Dimi.