xytsrm
7/31/2010 9:44:00 PM
I need some help with a problem I discovered while trying to use the
MMControl in the non-wait mode.
I coded a simple routine to play a sound file four times in succession.
Initially I had .wait = True, and the routine worked without issue. However,
as my code grew more complex with events, I want to insert a "DoEvents" call
in a loop during a "play". I set .wait = False before each "Play" and looped
waiting for .NotifyValue = 1, which would indicate the termination of the
last "play". It worked for the first "play", the subsequent "play" commands
exited immediately (as it should .wait = False), but apparently the
..NotifyValue remained equal to one, and so the subsequent loops exited
immediately before the "play" had a chance to terminate.
To repeat "play" I initially used the "prev" command, however when this
issue cropped up I tried putting the "open" and "close" commands in the play
repeat loop (eliminating the "prev" command), however I got the same results.
This is really baffling, as I would have expected that closing and reopening
would have reset the .NotifyValue, which can only be reset by the MMControl
as it's READ ONLY.
I would appreciate help from anyone who has experienced this issue, or may
know what I'm doing wrong.
Thanks,
X