winealsa fails the winmm test

Francois Gouget fgouget at free.fr
Sun Apr 25 18:03:41 CDT 2004


I'm not having much luck with sound this week-end :-(
First there was the crash in ALSA_WaveInit() (an old bug apparently),
but now the winmm test either gets stuck or crashes.

When it gets stuck it's because I get:

trace:wave:wodUpdatePlayedTotal dwPlayedTotal=21987 dwWrittenTotal=22050 delay=63
trace:wave:wodPlayer_NotifyCompletions still playing 0x4069fd1c (22050/21987)
trace:wave:wodPlayer waiting 2ms (7,2)
trace:wave:wodUpdatePlayedTotal dwPlayedTotal=21987 dwWrittenTotal=22050 delay=63
...

So the problem is that everything has been played but because
snd_pcm_delay() keeps returning 63, dwPlayedTotal never reaches the
22050 that would signal the completion of the first tone.

Now it seems like snd_pcm_delay() should return 0 after a while so this
looks like an Alsa bug (0.9.6). Is this a known bug? Is there a way to
work around it?
(besides commenting out the call to snd_pcm_delay())


And when I don't get into the above infinite loop it's because I've
crashed before with an Alsa assertion:

trace:wave:wodPlayer waiting 7ms (7,4294967295)
trace:wave:wodUpdatePlayedTotal dwPlayedTotal=11781 dwWrittenTotal=17184 delay=5403
trace:wave:wodPlayer_WriteMaxFrags Writing wavehdr 0x4069fd1c.17184[22050]
trace:wave:wodPlayer_WriteMaxFrags 1065 dwLength=2433 toWrite=110
0010:Call ntdll.RtlAcquireResourceShared(4037c168,00000001) ret=404e0751
0010:Ret  ntdll.RtlAcquireResourceShared() retval=00000001 ret=404e0751
0010:Call ntdll.RtlReleaseResource(4037c168) ret=404e08ae
0010:Ret  ntdll.RtlReleaseResource() retval=00000000 ret=404e08ae
0010:Call ntdll.RtlTryEnterCriticalSection(40340098) ret=404e0519
0010:Ret  ntdll.RtlTryEnterCriticalSection() retval=00000001 ret=404e0519
0010:Call ntdll.RtlTryEnterCriticalSection(40340098) ret=404e0519
0010:Ret  ntdll.RtlTryEnterCriticalSection() retval=00000001 ret=404e0519
0010:Call ntdll.RtlTryEnterCriticalSection(40340098) ret=404e0519
0010:Ret  ntdll.RtlTryEnterCriticalSection() retval=00000001 ret=404e0519
wine-kthread: pcm.c:5899: snd_pcm_mmap_commit: Assertion `frames <= snd_pcm_mmap_avail(pcm)' failed.

The interesting things are that wwo->write points to
snd_pcm_mmap_writei(). This assertion would seem to imply that we are
writing too much stuff at once?

-- 
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
 The greatest programming project of all took six days; on the seventh day the
  programmer rested. We've been trying to debug the *&^%$#@ thing ever since.
                      Moral: design before you implement.



More information about the wine-devel mailing list