Answers for "play sound love2d"

Lua
2

play sound love2d

sound = love.audio.newSource("pling.wav", "static") -- the "static" is better for short sound effects (load the file into memory)
music = love.audio.newSource("techno.ogg", "stream") -- the "stream" is better for longer music tracks (stream the file from disk)

sound:play()
music:play()

music:setVolume(0.6) -- 90% of ordinary volume
sound:setPitch(0.1) -- one octave lower
Posted by: Guest on May-20-2021

Browse Popular Code Answers by Language