Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Music Anyone?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Divers
Thread ID:
00207178
Message ID:
00207512
Vues:
12
David:

I hate to correct a genius but I get so few chances <g>. I got the original info from your website a few days ago (thanks!) Your're sample below wasn't quite right. Here is one that works.

* this program plays a sound for 10 seconds
#define SND_SYNC 0x00
#define SND_ASYNC 0x01
#define SND_NODEFAULT 0x02
#define SND_LOOP 0x08
#define SND_NOSTOP 0x10

declare integer sndPlaySound in winmm.dll string cSoundName, integer uFlags
=sndPlaySound( "c:\windows\media\ctmelody.wav", SND_ASYNC + SND_LOOP )
=INKEY(10)
* you could put some usefull processing in here instead!
=sndPlaySound( .NULL. , SND_NODEFAULT)

Scott VandenElzen


>Chang,
>
>If you set the second argument to Asynchronous (SND_ASYNC) the wav will start to play and immediately return allowing you to continue processing while it plays.
>
>You can also use the SND_LOOP constant to have it play until a SND_STOP is sent. You can find all this documentation on the MSDN CD.
>
>
>#define SND_SYNC      0x00
>#define SND_ASYNC     0x01
>#define SND_NODEFAULT 0x02
>#define SND_LOOP      0x08
>#define SND_NOSTOP    0x10
>
>sndPlaySound( "TheSound.wav", SND_ASYNCH + SND_LOOP )
>* your long process goes here
>sndPlaySound( "TheSound.wav", SND_STOP )
>
>
>> Is it anyway to avoid an interrupt when i play a wave file(use your API sample) and another API was process after the wave file playing continuosly?
>>example i play a wave file and process send mail using MAPI after it.
>>the wave file will stop playing for a while after the mail is successfully sended.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform