Function
love.audio.newSource( file, type )
Creates a new Source from a file. Sources created from SoundData are always static.
Synopsis
source = love.audio.newSource( file, type )
Parameters
file string The file to create a Source from.
type SourceType Streaming or static source.
Returns
source Source A new Source that can play the specified audio.
Examples
Load background music and play it
  1. bgm = love.audio.newSource("bgm.ogg", "stream")
  2. love.audio.play(bgm)
Load a sound effect and play it
  1. sfx = love.audio.newSource("sfx.wav", "static")
  2. love.audio.play(sfx)
Copyright © 2006-2010 LÖVE Development Team.