How to Play Sound

BlitzPlus Forums/BlitzPlus Beginners Area/How to Play Sound

modmcdl(Posted 2013) [#1]
Hi, mod here!

Quick question, how do you play sound in the program?

I got something like this

sndMusicLoop=LoadSound("____________.wav")

; Set the sound loop

LoopSound sndMusicLoop

PlaySound sndMusicLoop

Only question is, what do you put here: ____________?


Thanks


GaryV(Posted 2013) [#2]
Only you can answer that question as only you know the name of the file you are trying to play:

sndMusicLoop=LoadSound("whatever_the_name_of_the_file_is.wav")


modmcdl(Posted 2014) [#3]
okay... sorry, just realized someone answered this... but how will the program know to find it?


Matty(Posted 2014) [#4]
You need to know the path to the file. If the sound file is in same directory as your source or executable ithe filensme alone should be fine.


RemiD(Posted 2014) [#5]
when the file is in the same directory as the .bb or .exe file is : "File.wav"
when the file is in a directory child to the directory where the .bb or .exe file is : "Directory/File.wav"


modmcdl(Posted 2014) [#6]
okay... got it...

Thanks for all your help!