Play a wave-file?

Discussion of Inner Space

Moderators: Lavish Software Team, Moderators

Post Reply
Yocal
GamingTools Subscriber
Posts: 20
Joined: Mon Jan 17, 2005 11:25 am

Play a wave-file?

Post by Yocal » Wed Aug 24, 2005 6:55 pm

Salute!

I was wondring if it was possible to make IS play a wave file? I was sure i have seen it somewhere, but I cant seem to find any info on it.

Was it just a dream?

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Wed Aug 24, 2005 7:20 pm

There is an example of how to do this with the APICall command in LavishScript, which can be used to call (basically) any Win32 API, on ISMods. However, it's not built right into IS or LavishScript. I'll see that it makes it in appropriately.

Yocal
GamingTools Subscriber
Posts: 20
Joined: Mon Jan 17, 2005 11:25 am

Post by Yocal » Wed Aug 24, 2005 7:26 pm

Lax wrote:There is an example of how to do this with the APICall command in LavishScript
Great!




...where? ;-) Do you remember? :?

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Wed Aug 24, 2005 7:30 pm

search the forums for APICall, i doubt there's posted usage for anything other than playing a WAV

Yocal
GamingTools Subscriber
Posts: 20
Joined: Mon Jan 17, 2005 11:25 am

Post by Yocal » Wed Aug 24, 2005 7:35 pm

Heya!

Found it! Reposting here, if anybody else should be in need:

Code: Select all

function PlaySound(string Filename) 
{ 
APICall ${System.GetProcAddress["WinMM.dll","PlaySound"].Hex} Filename 0 Math.Dec[22001] 
}

Then to play a sound..

Code: Select all

call PlaySound "c:\\windows\\media\\ding.wav"
That should pretty much do the trick ;-)

Post Reply