Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

This is a hard one...wave file in Access...how to STOP it 2

Status
Not open for further replies.

mike777

Programmer
Jun 3, 2000
387
US
I have this wave file play when a certain time has elapsed. The wave file lasts over one minute. During that time, the application is locked up.
I initially thought of "Do Events", but, alas, that doesn't apply since there's no loop involved, it's just a line of code:
Code:
WavFileName = "c:\mywavefile.wav"
x = sndPlaySound(WavFileName, &H0)
Is there any way to suspend the wave file once it gets going?
Similar, but different:Is there any way to free up the application while the wave file is playing so if I wanted to loop it to make it play indefinitely I could? Then I could use "Do Events" to set the value of a variable so that when it looped around it could check the variable value and then bypass the wave file?
Thanks for your help.
Mike Kemp
kempmike65@aol.com
 
this is what msdn tells us:

sndPlaySound( LPCSTR lpszSound, UINT fuSound );

fuSound = SND_ASYNC
The sound is played asynchronously and the function returns immediately after beginning the sound. To terminate an asynchronously played sound, call sndPlaySound with lpszSoundName set to NULL.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top