The lovr.audio module is responsible for playing sound effects and music. Currently, the only supported audio format is .ogg (Vorbis). Playing a sound involves creating a Source object for the sound and calling Source:play on it.


Sources are objects that represent a single sound instance.

lovr.audio.newSourceCreate a new Source.
lovr.audio.pausePause all Sources.
lovr.audio.stopStop all Sources.
lovr.audio.updateUpdates the audio system.


The listener is a virtual object in 3D space that "hears" all the sounds that are playing. The listener can be positioned and oriented in 3D space, which controls how Sources in the world are heard. For example, sounds further away from the listener will be more quiet, and sounds to the left of the listener will be heard from the left speaker. By default, the listener will be synchronized with any connected headset so audio is positioned properly as the headset is moved around and rotated.

lovr.audio.getDopplerEffectGet the doppler effect parameters.
lovr.audio.setDopplerEffectSet the doppler effect parameters.
lovr.audio.getOrientationGet the orientation of the listener.
lovr.audio.setOrientationSet the orientation of the listener.
lovr.audio.getPoseGet the pose of the listener.
lovr.audio.setPoseSet the pose of the listener.
lovr.audio.getPositionGet the position of the listener.
lovr.audio.setPositionSet the position of the listener.
lovr.audio.isSpatializedCheck if audio is spatialized.
lovr.audio.getVelocityGet the velocity of the audio listener.
lovr.audio.setVelocitySet the velocity of the audio listener.
lovr.audio.getVolumeGet the master volume.
lovr.audio.setVolumeSet the master volume.


Microphones can be used to receive audio input.

lovr.audio.getMicrophoneNamesGet the names of all connected microphones.
lovr.audio.newMicrophoneCreate a new Microphone.