Creates a new Source from a filepath, File, Decoder or SoundData. Sources created from SoundData are always static.
This function can be slow if it is called repeatedly, such as from love.update or love.draw. If you need to use a specific resource often, create it once and store it somewhere it can be reused!
source = love.audio.newSource( filename, type )
string filenameSourceType type ("stream")Source sourcesource = love.audio.newSource( file, type )
File fileSourceType type ("stream")Source sourcesource = love.audio.newSource( decoder, type )
Decoder decoderSourceType type ("stream")Source sourcesource = love.audio.newSource( data )
SoundData dataSource sourcesource = love.audio.newSource( data )
FileData dataSource sourcebgm = love.audio.newSource("bgm.ogg", "stream")
love.audio.play(bgm) sfx = love.audio.newSource("sfx.wav", "static")
love.audio.play(sfx) data = love.sound.newSoundData("sfx.wav")
sfx = love.audio.newSource(data) decoder = love.sound.newDecoder("bgm.ogg")
bgm = love.audio.newSource(decoder) 
 
    © 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
    https://love2d.org/wiki/love.audio.newSource