[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.vb.general.discussion

MMControl (.wait = False Problem

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

2 Answers

xytsrm

8/1/2010 6:32:00 PM

0

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
>

MikeD

8/1/2010 8:48:00 PM

0

"xytsrm" <xytsrm@discussions.microsoft.com> wrote in message
news:06887480-D3D7-40D8-93BB-3D11B96595A0@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