Lutro - Documentation

love.audio

Provides an audio interface to play sounds.

love.audio.newSource

Creates a new audio Source from an audio file. Supported file formats are .wav and .ogg.

type can be "static" or "stream"

source = love.audio.newSource(filename, type)

love.audio.play

Plays the specified Source.

love.audio.play(source)

love.audio.stop

Stops playing the specified Source.

love.audio.stop(source)

love.audio.pause

To pause one or more sources:

paused_sources = love.audio.pause(source, ...)

To pause all sources:

paused_sources = love.audio.pause()

love.audio.getVolume

Returns the master volume.

volume = love.audio.getVolume()

love.audio.setVolume

Sets the master volume.

love.audio.setVolume(volume)

love.audio.getActiveSources

Returns the sources currently being played.

sources = love.audio.getActiveSources()

love.audio.getActiveSourceCount

Gets the current number of simultaneously playing sources.

num_active = love.audio.getActiveSourcesCount()