love.sound.newSoundData( filename )
Creates a new SoundData from a file.
Doing this will expand the raw audio data into memory, so this is not recommended for large files (i.e. files in the "music" category). If you want to play a long file, consider using a
Decoder instead.
Synopsis
sd = love.sound.newSoundData( filename )
Parameters
filename |
string |
The filename of the file to load. |
Examples
Loading SoundData from files
wav = love.sound.newSoundData("doom.wav")
-- Beware: if doom.mp3 is a huge file, it will take
-- ages to decode.
mp3 = love.sound.newSoundData("doom.mp3")