>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
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement