love.audio

Provides an interface to output sound to the user's speakers.

Types

Source A Source represents audio you can play back.

Functions

love.audio.getDistanceModel Returns the distance attenuation model. 0.8.0
love.audio.getDopplerScale Gets the global scale factor for doppler effects. 0.9.2
love.audio.getNumSources Gets the current number of simultaneously playing sources. 0.9.0
love.audio.getOrientation Returns the orientation of the listener.
love.audio.getPosition Returns the position of the listener.
love.audio.getSourceCount Gets the current number of simultaneously playing sources. 0.9.0
love.audio.getVelocity Returns the velocity of the listener.
love.audio.getVolume Returns the master volume.
love.audio.newSource Creates a new Source from a file, SoundData, or Decoder.
love.audio.pause Pauses all audio.
love.audio.play Plays the specified Source.
love.audio.resume Resumes all audio.
love.audio.rewind Rewinds all playing audio.
love.audio.setDistanceModel Sets the distance attenuation model. 0.8.0
love.audio.setDopplerScale Sets a global scale factor for doppler effects. 0.9.2
love.audio.setOrientation Sets the orientation of the listener.
love.audio.setPosition Sets the position of the listener.
love.audio.setVelocity Sets the velocity of the listener.
love.audio.setVolume Sets the master volume.
love.audio.stop Stops currently played sources.

Enums

DistanceModel The different distance models. 0.8.0
SourceType Types of audio sources.
TimeUnit Units that represent time. 0.8.0

See Also

love.audio.setVolume
  • References/Game Development/LÖVE/love.audio

love.audio.setVolume Sets the master volume. Function Synopsis love

2025-01-10 15:47:30
Source:getRolloff
  • References/Game Development/LÖVE/love.audio/Source

Source:getRolloff Available since LÖVE 0.8.0 This function is not supported in earlier versions. Returns the rolloff factor of the source.

2025-01-10 15:47:30
Source:getVolume
  • References/Game Development/LÖVE/love.audio/Source

Source:getVolume Gets the current volume of the Source. Function Synopsis

2025-01-10 15:47:30
Source:getCone
  • References/Game Development/LÖVE/love.audio/Source

Source:getCone Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets the Source's directional volume cones. Together

2025-01-10 15:47:30
love.audio.resume
  • References/Game Development/LÖVE/love.audio

love.audio.resume Resumes all audio. Function Synopsis love

2025-01-10 15:47:30
Audio Formats
  • References/Game Development/LÖVE/love.audio/Audio_Formats

Audio Formats As of Love 0.9.1, the following audio formats are supported: Waveform Audio File Format (.wav) MPEG-1 or MPEG-2 Audio Layer III (.mp3) Ogg Vorbis

2025-01-10 15:47:30
love.audio.setVelocity
  • References/Game Development/LÖVE/love.audio

love.audio.setVelocity Sets the velocity of the listener. Function Synopsis

2025-01-10 15:47:30
love.audio.getPosition
  • References/Game Development/LÖVE/love.audio

love.audio.getPosition Returns the position of the listener. Please note that positional audio only works for mono (i.e. non-stereo) sources. Function

2025-01-10 15:47:30
Source:isLooping
  • References/Game Development/LÖVE/love.audio/Source

Source:isLooping Returns whether the Source will loop. Function Synopsis

2025-01-10 15:47:30
Source:seek
  • References/Game Development/LÖVE/love.audio/Source

Source:seek Available since LÖVE 0.8.0 This function is not supported in earlier versions. Sets the currently playing position of the Source

2025-01-10 15:47:30