>Anyone know how to start and/or stop WAV files from within VFP?
>
>I'd also like to be able to get info from the WAV file, like
>length, current position when playing,etc.
>
>Thanks
This is the code that I use to play a WAV file.
*************************************** Play Wav
*
* Description
* Plays a wav file. Pass .T. for syncronous (program
* delays til finished) or .F. (or nothing) for asyncronous.
*
* Assumptions
* 1. The *.wav file exists in the search path or the
* full path to it has been provided.
*
* Called by
* Many
*
* Parameters
* vcWavFile
* The wav file to play.
* vlSync
* Flag to indicate whether to play the wav file syncronous or not.
*
LPARAMETERS vcWavFile, vlSync
LOCAL lcWavFile, lnFlags
lnFlags = 0
lcWavFile = LOCFILE(vcWavFile, "WAV")
DECLARE INTEGER sndPlaySound IN WINMM.DLL ;
STRING lcWavFile, ;
INTEGER lnFlags
IF vlSync
=sndPlaySound(lcWavFile, 16)
ELSE
=sndPlaySound(lcWavFile, 17)
ENDIF
Steve
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only