Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WAV Files
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Divers
Thread ID:
00398950
Message ID:
00399083
Vues:
13
>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
Fil
Voir

Click here to load this message in the networking platform