PDA

View Full Version : PLaying a wave file from lua



Promixis
October 27th, 2004, 07:28 AM
Uses the Lua Windows Function Plugin


ShellExecuteEx ("c:\\windows\\system32\\sndrec32","/play /close C:\\Windows\\Media\\Windows XP Exclamation.wav",LSF.SW_HIDE)

Mastiff
October 27th, 2004, 09:30 AM
One word of caution: This does not play the wave files in the same way as Girder, that is internal, so it takes longer before the playback starts, and it changes focus for the duration of the wafefile.

danward79
October 27th, 2004, 12:44 PM
Nice tip!

Wonder wereI can use this.

mhwlng
October 27th, 2004, 01:01 PM
maybe Mike C can add

PlaySound("path to wave file", NULL, SND_SYNC );

to his windows function plugin ?

that's how it works in the AvidUtilsDriver NR plugin..

Marcel

Promixis
October 27th, 2004, 01:30 PM
Good idea...

Mastiff
October 27th, 2004, 03:58 PM
And while you're at it, ask Ron how he manages to play them directly in Girder, it's a lot faster (3-4 seconds is a lot when the script has a timeout of 5 seconds).