[[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]] ==== PLAY A .WAV (OpenInsight Specific) ==== === At 14 SEP 1998 11:30:53PM TERRY - MICROLINK AUS wrote: === {{tag>"OpenInsight Specific"}} How do I play a ".wav" file say linked to a click event of a control. ---- === At 15 SEP 1998 03:47AM Andrew P McAuley wrote: === Just RUNWIN the WAV - if it is 95 it will auto execute. Failing that check this out from SENL Vol 1 Issue 9... [i]"Sprezzatura have been increasingly involved in the production of Multimedia CD Rom catalogues using OpenInsight and we've been having to integrate multimedia into the repository. The problem we had was that when we EXECUTEd an AVI, the MPLAYER window opened but the video didn't play until the user clicked the play button. This was obviously not what we wanted so a quick browse of the MSDN was called for. There we found what we wanted, two underdocumented command line switches for MPLAYER.EXE namely /play to play the video immediately /close to close MPLAYER after the video has finished. So all that is required is to replace the repository entry subkey as follows - instead of Multim\building.avi we now use /play /close Multim\building.avi note that the switches come BEFORE the file name not after."[/i] amcauley@sprezzatura.com [url=http://www.sprezzatura.com" ]Sprezzatura Ltd[/url] [i]World Leaders in all things RevSoft[/i] [img]http://www.sprezzatura.com/zz.gif[/img] ---- === At 16 SEP 1998 12:34AM More Questions - Terry wrote: === Ive tried all sorts of configurations in using the RUNWIN function but I guess I'm not understanding it properly. eg Retval=Utility("RUNWIN","C:\WINDOWS\SNDREC32.EXE FILEDONE.WAV",1) Where sndrec32.exe is a .wav player/recorder. Nothing happens I am running Win95 - Do I need to make any entries in repos for this. I'm just a beginner in OI - more help needed please. ---- === At 16 SEP 1998 03:52AM Andrew P McAuley wrote: === What does this do? Retval=Utility("RUNWIN","FILEDONE.WAV") amcauley@sprezzatura.com [url=http://www.sprezzatura.com" ]Sprezzatura Ltd[/url] [i]World Leaders in all things RevSoft[/i] [img]http://www.sprezzatura.com/zz.gif[/img] ---- === At 17 SEP 1998 10:43PM Thats getting there - Thanks wrote: === It worked - but as mentioned in your first response, had to press play then exit. Tried the /play /close switches as follows and they worked. Retval=Utility("Runwin","sndrec32 /play /close Filedone.wav") where sndrec32.exe is windows .wav player. I note that this still displays the sndrec32.exe window. Any ideas on how to make it happen invisibly. I tried guessing some other switches eg /minimise /invisible but to no avail. I am surprised that RevTech hasnt provided a control in the form designer tools to directly invoke multimedia. ---- === At 08 OCT 1998 06:12AM John - Adtec (Aus) wrote: === Terry, This should do the trick. Declare FCNS DLL_MMSYSTEM - see manaual on using DLLs * Start MMSYSTEM BYTE PASCAL sndPlaySound(LPCHAR,USHORT) * End * This insert is handy compile insert insert_audio snd_sync% =0 snd_async% =1 snd_nodflt%=2 snd_memory%=4 snd_loop% =8 snd_nostop%=16 (Andrew Mc - I know its not standard methods) * Some examples * Some loop indefinitely, some terminate, try them out. use_snd%=snd_async% + snd_loop% todo=sndPlaySound('audio\fixme.wav':char(0),use_snd%) * switches sound off todo=sndPlaySound(char(0),snd_sync%) todo=sndPlaySound('audio\thanks.wav':char(0),snd_sync%) todo=sndPlaySound(char(0),snd_sync%) Check out the Windows SDK for details Regards John Curby Adtec ACT Pty Ltd ACT/ NSW Australia [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=46EF7A773E9AE54C8525668000134EB1|View this thread on the forum...]]