From: xytsrm on
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

From: xytsrm on
Solution found - disregard.

"xytsrm" wrote:

> 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
>
From: MikeD on
"xytsrm" <xytsrm(a)discussions.microsoft.com> wrote in message
news:06887480-D3D7-40D8-93BB-3D11B96595A0(a)microsoft.com...
> Solution found - disregard.

You should always post the solution you found so that others know and can
benefit. They may be searching the newsgroups for an answer to the very
same problem or are just curious (perhaps to file away for future
reference).

--
Mike