first see if you can change the output from the emulators to the oss emulation device
for some reason oss emulation often seems to work better than alsa device here for certain things (i have no idea why or how they are different)
and the problem might be in the buffer setup
although the fact that everything works fine accept the emulators seems to say otherwise
alsa uses a ring buffer so the sound chases itself around in circles
and it has to sync up properly
you can play with the buffer in your ~/.asoundrc file
i do it in my dmix plugin
but you can make a seperate plugin to use with the emuators if you have to
here are some peoples examples
http://www.alsa-project.org/alsa-doc...odule=intel8x0
take a look at the output from
cat /proc/asound/card0/pcm0p/sub0/hw_params
my sound card is different but
i found the default-times-hardware settings didn't work so i set
period_time 2
and
buffer_size 2052
and didn't set anything else and things got better to the point of being fine now
the default period time or even what the values represent (bytes or usecs) or exactly how to calculate them aludes me so i had to go trial and error
if it starts fine then later gets all weird that's how long it takes for the sync to get off within the loop -- perhaps the lag in the emulation layer has an effect on this syncronization