Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Here's it. Built from a slightly modified https://github.com/santoslove/love-api-experiments

How did I make this?

I don't know how to run Lua 5.1, and I have no idea where any binaries are, so I just used Love 11.0 to make this file.

To make this:

  1. Grab the entire https://github.com/santoslove/love-api-experiments master.
  2. Delete the old folder, and love-api/modules, and love-api/love-api.lua.
  3. Grab the entire https://github.com/love2d-community/love-api master.
  4. Copy over the love_api.lua and modules folder.
  5. Rename love_api.lua to love-api.lua
  6. Delete everything in the reference folder, except for html-generator.lua, order.lua, and pure-love.css
  7. Make a main.lua in the base directory, add this line: require "reference/html-generator"
  8. Run that in Love 11.0, because I replaced all the io calls with love.filesystem calls because I'm good with computers. It'll lag for a second.
  9. Find the index.html it dropped in your Appdata/Roaming/LOVE/folder-name/ (on windows)

Below is the modified version of html-generator.lua I used.

<html><head>
<title>L&Ouml;VE 11.1 Reference</title>
<link href="https://fonts.googleapis.com/css?family=Quicksand:500,700" rel="stylesheet"><style>* {
margin: 0;
padding: 0;
color: #333;
}
body {
margin-left: 12px;
margin-bottom: 24px;
font-family: "Quicksand", "Trebuchet MS", sans-serif;
font-weight: 500;
}
.section_heading a, .prefix a {
color: #333;
}
a {
color: #059dc5; /* Blue */
}
a:link {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.section_heading a:hover,
.function_heading a:hover {
text-decoration: none;
}
.section_heading a,
.function_heading a {
outline: none;
}
.side_navigation {
position: fixed;
margin-left: 2px;
margin-top: 12px;
}
.container {
margin-left: 80px;
}
p, td {
font-size: 10pt;
}
.synopsis {
font-size: 12pt;
margin-top: 20px;
margin-bottom: 12px;
}
.function_heading {
margin-bottom: 14px;
margin-top: 6px;
font-size: 16pt;
line-height: 1;
}
.section_heading {
font-size: 28px;
}
.synopsis,
.ra_name,
.constant_name {
font-family: "Consolas", monospace;
}
.ra_table {
margin-bottom: 12px;
}
.ra_name {
text-align: right;
width: 120px;
}
.ra_type {
padding-left: 16px;
width: 100px;
}
.ra_name, .constant_name {
font-weight: bold;
}
.function,
.section_navigation_link,
.section_navigation_subsection_heading {
margin-left: 24px;
}
.section_navigation_link_minidescription {
padding: 1px 0;
}
.section_navigation_link_minidescription {
padding: 1px 0;
}
.section_navigation_subheading {
margin-top: 14px;
margin-bottom: 2px;
font-weight: 700;
}
.section_navigation_subsection_heading {
margin-top: 4px;
margin-bottom: 2px;
font-weight: 700;
}
.section_navigation_subheading {
margin-bottom: 4px;
}
.constant_description {
margin-bottom: 8px;
}
table {
vertical-align: text-top;
}
td {
vertical-align: top;
}
.function_heading a,
.constant_name {
color: #E658A0; /* Pink */
}
.returns {
color: #ab38c1; /* Purple */
}
.arguments {
color: #ea9b4c; /* Orange */
}
.synopsis_background {
padding: 2px 5px 2px 5px;
background-color: #efefef;
border-radius: 6px;
box-decoration-break: clone;
-webkit-box-decoration-break: clone;
}
body {
background-color: #efefef; /* Grey */
}
.section {
padding: 12px;
padding-left: 22px;
margin-bottom: 12px;
background-color: #ffffff;
border-radius: 8px 0 0 8px;
}
.first_section {
border-radius: 0 0 0 8px;
padding-top: 0;
}
.slash {
color: #a7a7a7;
}
.section_heading,
.section_description,
.variant_description,
.function_description,
.synopsis {
margin-bottom: 12px;
}
td {
padding-top: 8px;
}
.section_description,
.variant_description {
margin-top: 12px;
}
.relative {
position: relative;
}
</style></head><body><div class = "side_navigation"><p><a href="#love">love</a></p><p><a href="#love.audio">audio</a></p><p><a href="#love.data">data</a></p><p><a href="#love.event">event</a></p><p><a href="#love.filesystem">filesystem</a></p><p><a href="#love.graphics">graphics</a></p><p><a href="#love.image">image</a></p><p><a href="#love.joystick">joystick</a></p><p><a href="#love.keyboard">keyboard</a></p><p><a href="#love.math">math</a></p><p><a href="#love.mouse">mouse</a></p><p><a href="#love.physics">physics</a></p><p><a href="#love.sound">sound</a></p><p><a href="#love.system">system</a></p><p><a href="#love.thread">thread</a></p><p><a href="#love.timer">timer</a></p><p><a href="#love.touch">touch</a></p><p><a href="#love.video">video</a></p><p><a href="#love.window">window</a></p></div><div class = "container"><div class = "section first_section"><p class = "section_heading"><a href = "#love" name = "love">love</a></p><p class = "section_navigation_subheading">Types</p><p class = "section_navigation_link"><a href="#Data">Data</a></p><p class = "section_navigation_link"><a href="#Drawable">Drawable</a></p><p class = "section_navigation_link"><a href="#Object">Object</a></p><p class = "section_navigation_subheading">Callbacks</p><p class = "section_navigation_link">love.<a href="#love.load">load</a></p><p class = "section_navigation_link">love.<a href="#love.update">update</a></p><p class = "section_navigation_link">love.<a href="#love.draw">draw</a></p><p class = "section_navigation_link">love.<a href="#love.quit">quit</a></p><p class = "section_navigation_link">love.<a href="#love.run">run</a></p><p class = "section_navigation_link">love.<a href="#love.conf">conf</a></p><p class = "section_navigation_subsection_heading">Input</p><p class = "section_navigation_link">love.<a href="#love.keypressed">keypressed</a></p><p class = "section_navigation_link">love.<a href="#love.keyreleased">keyreleased</a></p><p class = "section_navigation_link">love.<a href="#love.textedited">textedited</a></p><p class = "section_navigation_link">love.<a href="#love.textinput">textinput</a></p><p class = "section_navigation_link">love.<a href="#love.mousepressed">mousepressed</a></p><p class = "section_navigation_link">love.<a href="#love.mousereleased">mousereleased</a></p><p class = "section_navigation_link">love.<a href="#love.mousemoved">mousemoved</a></p><p class = "section_navigation_link">love.<a href="#love.mousefocus">mousefocus</a></p><p class = "section_navigation_link">love.<a href="#love.wheelmoved">wheelmoved</a></p><p class = "section_navigation_link">love.<a href="#love.touchmoved">touchmoved</a></p><p class = "section_navigation_link">love.<a href="#love.touchpressed">touchpressed</a></p><p class = "section_navigation_link">love.<a href="#love.touchreleased">touchreleased</a></p><p class = "section_navigation_link">love.<a href="#love.joystickpressed">joystickpressed</a></p><p class = "section_navigation_link">love.<a href="#love.joystickreleased">joystickreleased</a></p><p class = "section_navigation_link">love.<a href="#love.joystickaxis">joystickaxis</a></p><p class = "section_navigation_link">love.<a href="#love.joystickhat">joystickhat</a></p><p class = "section_navigation_link">love.<a href="#love.joystickadded">joystickadded</a></p><p class = "section_navigation_link">love.<a href="#love.joystickremoved">joystickremoved</a></p><p class = "section_navigation_link">love.<a href="#love.gamepadpressed">gamepadpressed</a></p><p class = "section_navigation_link">love.<a href="#love.gamepadreleased">gamepadreleased</a></p><p class = "section_navigation_link">love.<a href="#love.gamepadaxis">gamepadaxis</a></p><p class = "section_navigation_subsection_heading">Window</p><p class = "section_navigation_link">love.<a href="#love.resize">resize</a></p><p class = "section_navigation_link">love.<a href="#love.visible">visible</a></p><p class = "section_navigation_link">love.<a href="#love.focus">focus</a></p><p class = "section_navigation_link">love.<a href="#love.filedropped">filedropped</a></p><p class = "section_navigation_link">love.<a href="#love.directorydropped">directorydropped</a></p><p class = "section_navigation_subsection_heading">Error handling</p><p class = "section_navigation_link">love.<a href="#love.threaderror">threaderror</a></p><p class = "section_navigation_link">love.<a href="#love.lowmemory">lowmemory</a></p><p class = "section_navigation_link">love.<a href="#love.errorhandler">errorhandler</a></p><p class = "section_navigation_subheading">Functions</p><p class = "section_navigation_link">love.<a href="#love.getVersion">getVersion</a></p><p class = "section_navigation_link">love.<a href="#love.hasDeprecationOutput">has</a><span class = "slash">/</span><a href="#love.setDeprecationOutput">setDeprecationOutput</a></p></div><div class = "section"><p class = "function_heading"><a href = "#love.getVersion" name = "love.getVersion"><span>love.</span><wbr>getVersion</a></p><p class = "function_description">Gets the current running version of L&Ouml;VE.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">major</span>, <span class = "returns">minor</span>, <span class = "returns">revision</span>, <span class = "returns">codename</span> = love.<wbr>getVersion()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">major</td><td class = "ra_type">number</td><td>The major version of L&Ouml;VE, i.e. 0 for version 0.9.1.</td></tr><tr><td class = "returns ra_name">minor</td><td class = "ra_type">number</td><td>The minor version of L&Ouml;VE, i.e. 9 for version 0.9.1.</td></tr><tr><td class = "returns ra_name">revision</td><td class = "ra_type">number</td><td>The revision version of L&Ouml;VE, i.e. 1 for version 0.9.1.</td></tr><tr><td class = "returns ra_name">codename</td><td class = "ra_type">string</td><td>The codename of the current version, i.e. "Baby Inspector" for version 0.9.1.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.setDeprecationOutput" name = "love.setDeprecationOutput"><span>love.</span><wbr>setDeprecationOutput</a></p><p class = "function_description">Sets whether L&Ouml;VE displays warnings when using deprecated functionality. It is disabled by default in fused mode, and enabled by default otherwise.<br /><br />When deprecation output is enabled, the first use of a formally deprecated L&Ouml;VE API will show a message at the bottom of the screen for a short time, and print the message to the console.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>setDeprecationOutput( <span class = "arguments">enable</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">enable</td><td class = "ra_type">boolean</td><td>Whether to enable or disable deprecation output.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.hasDeprecationOutput" name = "love.hasDeprecationOutput"><span>love.</span><wbr>hasDeprecationOutput</a></p><p class = "function_description">Gets whether L&Ouml;VE displays warnings when using deprecated functionality. It is disabled by default in fused mode, and enabled by default otherwise.<br /><br />When deprecation output is enabled, the first use of a formally deprecated L&Ouml;VE API will show a message at the bottom of the screen for a short time, and print the message to the console.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">enabled</span> = love.<wbr>hasDeprecationOutput()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">enabled</td><td class = "ra_type">boolean</td><td>Whether deprecation output is enabled.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.conf" name = "love.conf"><span>love.</span><wbr>conf</a></p><p class = "function_description">If a file called conf.lua is present in your game folder (or .love file), it is run before the L&Ouml;VE modules are loaded. You can use this file to overwrite the love.conf function, which is later called by the L&Ouml;VE 'boot' script. Using the love.conf function, you can set some configuration options, and change things like the default size of the window, which modules are loaded, and other stuff.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>conf( <span class = "arguments">t</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">t</td><td class = "ra_type">table</td><td>The <a href="#love.conf">love.conf</a> function takes one argument: a table filled with all the default values which you can overwrite to your liking. If you want to change the default window size, for instance, do:
function <a href="#love.conf">love.conf</a>(t)
t.window.width = 1024
t.window.height = 768
end
If you don't need the physics module or joystick module, do the following.
function <a href="#love.conf">love.conf</a>(t)
t.modules.joystick = false
t.modules.physics = false
end
Setting unused modules to false is encouraged when you release your game. It reduces startup time slightly (especially if the joystick module is disabled) and reduces memory usage (slightly).
Note that you can't disable love.filesystem; it's mandatory. The same goes for the love module itself. love.graphics needs love.window to be enabled.</td></tr><tr><td class = "arguments ra_name">t.identity <span class = "default">(nil)</span></td><td class = "ra_type">string</td><td>This flag determines the name of the save directory for your game. Note that you can only specify the name, not the location where it will be created:
t.identity = "gabe_HL3" -- Correct
t.identity = "c:/Users/gabe/HL3" -- Incorrect
Alternatively <a href="#love.filesystem.setIdentity">love.filesystem.setIdentity</a> can be used to set the save directory outside of the config file.</td></tr><tr><td class = "arguments ra_name">t.version <span class = "default">("11.1")</span></td><td class = "ra_type">string</td><td>t.version should be a string, representing the version of L&Ouml;VE for which your game was made. It should be formatted as "X.Y.Z" where X is the major release number, Y the minor, and Z the patch level. It allows L&Ouml;VE to display a warning if it isn't compatible. Its default is the version of L&Ouml;VE running.</td></tr><tr><td class = "arguments ra_name">t.console <span class = "default">(false)</span></td><td class = "ra_type">boolean</td><td>Determines whether a console should be opened alongside the game window (Windows only) or not. Note: On OSX you can get console output by running L&Ouml;VE through the terminal.</td></tr><tr><td class = "arguments ra_name">t.accelerometerjoystick <span class = "default">(true)</span></td><td class = "ra_type">boolean</td><td>Sets whether the device accelerometer on iOS and Android should be exposed as a 3-axis <a href="#Joystick">Joystick</a>. Disabling the accelerometer when it's not used may reduce CPU usage.</td></tr><tr><td class = "arguments ra_name">t.externalstorage <span class = "default">(false)</span></td><td class = "ra_type">boolean</td><td>Sets whether files are saved in external storage (true) or internal storage (false) on Android.</td></tr><tr><td class = "arguments ra_name">t.gammacorrect <span class = "default">(false)</span></td><td class = "ra_type">boolean</td><td>Determines whether gamma-correct rendering is enabled, when the system supports it.</td></tr><tr><td class = "arguments ra_name">t.window</td><td class = "ra_type">table</td><td>It is possible to defer window creation until <a href="#love.window.setMode">love.window.setMode</a> is first called in your code. To do so, set t.window = nil in <a href="#love.conf">love.conf</a> (or t.screen = nil in older versions.) If this is done, L&Ouml;VE may crash if any function from love.graphics is called before the first <a href="#love.window.setMode">love.window.setMode</a> in your code.
The t.window table was named t.screen in versions prior to 0.9.0. The t.screen table doesn't exist in <a href="#love.conf">love.conf</a> in 0.9.0, and the t.window table doesn't exist in <a href="#love.conf">love.conf</a> in 0.8.0. This means <a href="#love.conf">love.conf</a> will fail to execute (therefore it will fall back to default values) if care is not taken to use the correct table for the L&Ouml;VE version being used.</td></tr><tr><td class = "arguments ra_name">t.window.title <span class = "default">("Untitled")</span></td><td class = "ra_type">string</td><td>Sets the title of the window the game is in. Alternatively <a href="#love.window.setTitle">love.window.setTitle</a> can be used to change the window title outside of the config file.</td></tr><tr><td class = "arguments ra_name">t.window.icon <span class = "default">(nil)</span></td><td class = "ra_type">string</td><td>A filepath to an image to use as the window's icon. Not all operating systems support very large icon images. The icon can also be changed with <a href="#love.window.setIcon">love.window.setIcon</a>.</td></tr><tr><td class = "arguments ra_name">t.window.width <span class = "default">(800)</span></td><td class = "ra_type">number</td><td>Sets the window's dimensions. If these flags are set to 0 L&Ouml;VE automatically uses the user's desktop dimensions.</td></tr><tr><td class = "arguments ra_name">t.window.height <span class = "default">(600)</span></td><td class = "ra_type">string</td><td>Sets the window's dimensions. If these flags are set to 0 L&Ouml;VE automatically uses the user's desktop dimensions.</td></tr><tr><td class = "arguments ra_name">t.window.borderless <span class = "default">(false)</span></td><td class = "ra_type">boolean</td><td>Removes all border visuals from the window. Note that the effects may wary between operating systems.</td></tr><tr><td class = "arguments ra_name">t.window.resizable <span class = "default">(false)</span></td><td class = "ra_type">boolean</td><td>If set to true this allows the user to resize the game's window.</td></tr><tr><td class = "arguments ra_name">t.window.minwidth <span class = "default">(1)</span></td><td class = "ra_type">number</td><td>Sets the minimum width and height for the game's window if it can be resized by the user. If you set lower values to window.width and window.height L&Ouml;VE will always favor the minimum dimensions set via window.minwidth and window.minheight.</td></tr><tr><td class = "arguments ra_name">t.window.minheight <span class = "default">(1)</span></td><td class = "ra_type">number</td><td>Sets the minimum width and height for the game's window if it can be resized by the user. If you set lower values to window.width and window.height L&Ouml;VE will always favor the minimum dimensions set via window.minwidth and window.minheight.</td></tr><tr><td class = "arguments ra_name">t.window.fullscreen <span class = "default">(false)</span></td><td class = "ra_type">boolean</td><td>Whether to run the game in fullscreen (true) or windowed (false) mode. The fullscreen can also be toggled via <a href="#love.window.setFullscreen">love.window.setFullscreen</a> or <a href="#love.window.setMode">love.window.setMode</a>.</td></tr><tr><td class = "arguments ra_name">t.window.fullscreentype <span class = "default">("desktop")</span></td><td class = "ra_type">string</td><td>Specifies the type of fullscreen mode to use (normal or desktop). Generally the desktop is recommended, as it is less restrictive than normal mode on some operating systems.</td></tr><tr><td class = "arguments ra_name">t.window.vsync <span class = "default">(true)</span></td><td class = "ra_type">boolean</td><td>Enables or deactivates vertical synchronization. Vsync tries to keep the game at a steady framerate and can prevent issues like screen tearing. It is recommended to keep vsync activated if you don't know about the possible implications of turning it off.</td></tr><tr><td class = "arguments ra_name">t.window.msaa <span class = "default">(0)</span></td><td class = "ra_type">number</td><td>The number of samples to use with multi-sampled antialiasing.</td></tr><tr><td class = "arguments ra_name">t.window.display <span class = "default">(1)</span></td><td class = "ra_type">number</td><td>The index of the display to show the window in, if multiple monitors are available.</td></tr><tr><td class = "arguments ra_name">t.window.highdpi <span class = "default">(false)</span></td><td class = "ra_type">boolean</td><td>See <a href="#love.window.getPixelScale">love.window.getPixelScale</a>, <a href="#love.window.toPixels">love.window.toPixels</a>, and <a href="#love.window.fromPixels">love.window.fromPixels</a>. It is recommended to keep this option disabled if you can't test your game on a Mac or iOS system with a Retina display, because code will need tweaking to make sure things look correct.</td></tr><tr><td class = "arguments ra_name">t.window.x <span class = "default">(nil)</span></td><td class = "ra_type">number</td><td>Determines the position of the window on the user's screen. Alternatively <a href="#love.window.setPosition">love.window.setPosition</a> can be used to change the position on the fly.</td></tr><tr><td class = "arguments ra_name">t.window.y <span class = "default">(nil)</span></td><td class = "ra_type">number</td><td>Determines the position of the window on the user's screen. Alternatively <a href="#love.window.setPosition">love.window.setPosition</a> can be used to change the position on the fly.</td></tr><tr><td class = "arguments ra_name">t.modules</td><td class = "ra_type">table</td><td>Module options.</td></tr><tr><td class = "arguments ra_name">t.modules.audio <span class = "default">(true)</span></td><td class = "ra_type">boolean</td><td>Enable the audio module.</td></tr><tr><td class = "arguments ra_name">t.modules.event <span class = "default">(true)</span></td><td class = "ra_type">boolean</td><td>Enable the event module.</td></tr><tr><td class = "arguments ra_name">t.modules.graphics <span class = "default">(true)</span></td><td class = "ra_type">boolean</td><td>Enable the graphics module.</td></tr><tr><td class = "arguments ra_name">t.modules.image <span class = "default">(true)</span></td><td class = "ra_type">boolean</td><td>Enable the image module.</td></tr><tr><td class = "arguments ra_name">t.modules.joystick <span class = "default">(true)</span></td><td class = "ra_type">boolean</td><td>Enable the joystick module.</td></tr><tr><td class = "arguments ra_name">t.modules.keyboard <span class = "default">(true)</span></td><td class = "ra_type">boolean</td><td>Enable the keyboard module.</td></tr><tr><td class = "arguments ra_name">t.modules.math <span class = "default">(true)</span></td><td class = "ra_type">boolean</td><td>Enable the math module.</td></tr><tr><td class = "arguments ra_name">t.modules.mouse <span class = "default">(true)</span></td><td class = "ra_type">boolean</td><td>Enable the mouse module.</td></tr><tr><td class = "arguments ra_name">t.modules.physics <span class = "default">(true)</span></td><td class = "ra_type">boolean</td><td>Enable the physics module.</td></tr><tr><td class = "arguments ra_name">t.modules.sound <span class = "default">(true)</span></td><td class = "ra_type">boolean</td><td>Enable the sound module.</td></tr><tr><td class = "arguments ra_name">t.modules.system <span class = "default">(true)</span></td><td class = "ra_type">boolean</td><td>Enable the system module.</td></tr><tr><td class = "arguments ra_name">t.modules.timer <span class = "default">(true)</span></td><td class = "ra_type">boolean</td><td>Enable the timer module.</td></tr><tr><td class = "arguments ra_name">t.modules.touch <span class = "default">(true)</span></td><td class = "ra_type">boolean</td><td>Enable the touch module.</td></tr><tr><td class = "arguments ra_name">t.modules.video <span class = "default">(true)</span></td><td class = "ra_type">boolean</td><td>Enable the video module.</td></tr><tr><td class = "arguments ra_name">t.modules.window <span class = "default">(true)</span></td><td class = "ra_type">boolean</td><td>Enable the window module.</td></tr><tr><td class = "arguments ra_name">t.modules.thread <span class = "default">(true)</span></td><td class = "ra_type">boolean</td><td>Enable the thread module.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.directorydropped" name = "love.directorydropped"><span>love.</span><wbr>directorydropped</a></p><p class = "function_description">Callback function triggered when a directory is dragged and dropped onto the window.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>directorydropped( <span class = "arguments">path</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">path</td><td class = "ra_type">string</td><td>The full platform-dependent path to the directory. It can be used as an argument to <a href="#love.filesystem.mount">love.filesystem.mount</a>, in order to gain read access to the directory with love.filesystem.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.draw" name = "love.draw"><span>love.</span><wbr>draw</a></p><p class = "function_description">Callback function used to draw on the screen every frame.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>draw()</span></span></p><table class = "ra_table"></table></div><div class = "section"><p class = "function_heading"><a href = "#love.errorhandler" name = "love.errorhandler"><span>love.</span><wbr>errorhandler</a></p><p class = "function_description">The error handler, used to display error messages.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>errorhandler( <span class = "arguments">msg</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">msg</td><td class = "ra_type">string</td><td>The error message.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.filedropped" name = "love.filedropped"><span>love.</span><wbr>filedropped</a></p><p class = "function_description">Callback function triggered when a file is dragged and dropped onto the window.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>filedropped( <span class = "arguments">file</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">file</td><td class = "ra_type"><a href="#File">File</a></td><td>The unopened <a href="#File">File</a> object representing the file that was dropped.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.focus" name = "love.focus"><span>love.</span><wbr>focus</a></p><p class = "function_description">Callback function triggered when window receives or loses focus.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>focus( <span class = "arguments">focus</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">focus</td><td class = "ra_type">boolean</td><td>True if the window gains focus, false if it loses focus.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.gamepadaxis" name = "love.gamepadaxis"><span>love.</span><wbr>gamepadaxis</a></p><p class = "function_description">Called when a <a href="#Joystick">Joystick</a>'s virtual gamepad axis is moved.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>gamepadaxis( <span class = "arguments">joystick</span>, <span class = "arguments">axis</span>, <span class = "arguments">value</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">joystick</td><td class = "ra_type"><a href="#Joystick">Joystick</a></td><td>The joystick object.</td></tr><tr><td class = "arguments ra_name">axis</td><td class = "ra_type"><a href="#GamepadAxis">GamepadAxis</a></td><td>The virtual gamepad axis.</td></tr><tr><td class = "arguments ra_name">value</td><td class = "ra_type">number</td><td>The new axis value.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.gamepadpressed" name = "love.gamepadpressed"><span>love.</span><wbr>gamepadpressed</a></p><p class = "function_description">Called when a <a href="#Joystick">Joystick</a>'s virtual gamepad button is pressed.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>gamepadpressed( <span class = "arguments">joystick</span>, <span class = "arguments">button</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">joystick</td><td class = "ra_type"><a href="#Joystick">Joystick</a></td><td>The joystick object.</td></tr><tr><td class = "arguments ra_name">button</td><td class = "ra_type"><a href="#GamepadButton">GamepadButton</a></td><td>The virtual gamepad button.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.gamepadreleased" name = "love.gamepadreleased"><span>love.</span><wbr>gamepadreleased</a></p><p class = "function_description">Called when a <a href="#Joystick">Joystick</a>'s virtual gamepad button is released.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>gamepadreleased( <span class = "arguments">joystick</span>, <span class = "arguments">button</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">joystick</td><td class = "ra_type"><a href="#Joystick">Joystick</a></td><td>The joystick object.</td></tr><tr><td class = "arguments ra_name">button</td><td class = "ra_type"><a href="#GamepadButton">GamepadButton</a></td><td>The virtual gamepad button.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.joystickadded" name = "love.joystickadded"><span>love.</span><wbr>joystickadded</a></p><p class = "function_description">Called when a <a href="#Joystick">Joystick</a> is connected.<br /><br />This callback is also triggered after <a href="#love.load">love.load</a> for every <a href="#Joystick">Joystick</a> which was already connected when the game started up.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>joystickadded( <span class = "arguments">joystick</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">joystick</td><td class = "ra_type"><a href="#Joystick">Joystick</a></td><td>The newly connected <a href="#Joystick">Joystick</a> object.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.joystickaxis" name = "love.joystickaxis"><span>love.</span><wbr>joystickaxis</a></p><p class = "function_description">Called when a joystick axis moves.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>joystickaxis( <span class = "arguments">joystick</span>, <span class = "arguments">axis</span>, <span class = "arguments">value</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">joystick</td><td class = "ra_type"><a href="#Joystick">Joystick</a></td><td>The joystick object.</td></tr><tr><td class = "arguments ra_name">axis</td><td class = "ra_type">number</td><td>The axis number.</td></tr><tr><td class = "arguments ra_name">value</td><td class = "ra_type">number</td><td>The new axis value.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.joystickhat" name = "love.joystickhat"><span>love.</span><wbr>joystickhat</a></p><p class = "function_description">Called when a joystick hat direction changes.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>joystickhat( <span class = "arguments">joystick</span>, <span class = "arguments">hat</span>, <span class = "arguments">direction</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">joystick</td><td class = "ra_type"><a href="#Joystick">Joystick</a></td><td>The joystick object.</td></tr><tr><td class = "arguments ra_name">hat</td><td class = "ra_type">number</td><td>The hat number.</td></tr><tr><td class = "arguments ra_name">direction</td><td class = "ra_type"><a href="#JoystickHat">JoystickHat</a></td><td>The new hat direction.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.joystickpressed" name = "love.joystickpressed"><span>love.</span><wbr>joystickpressed</a></p><p class = "function_description">Called when a joystick button is pressed.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>joystickpressed( <span class = "arguments">joystick</span>, <span class = "arguments">button</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">joystick</td><td class = "ra_type">number</td><td>The joystick number.</td></tr><tr><td class = "arguments ra_name">button</td><td class = "ra_type">number</td><td>The button number.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.joystickreleased" name = "love.joystickreleased"><span>love.</span><wbr>joystickreleased</a></p><p class = "function_description">Called when a joystick button is released.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>joystickreleased( <span class = "arguments">joystick</span>, <span class = "arguments">button</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">joystick</td><td class = "ra_type">number</td><td>The joystick number.</td></tr><tr><td class = "arguments ra_name">button</td><td class = "ra_type">number</td><td>The button number.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.joystickremoved" name = "love.joystickremoved"><span>love.</span><wbr>joystickremoved</a></p><p class = "function_description">Called when a <a href="#Joystick">Joystick</a> is disconnected.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>joystickremoved( <span class = "arguments">joystick</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">joystick</td><td class = "ra_type"><a href="#Joystick">Joystick</a></td><td>The now-disconnected <a href="#Joystick">Joystick</a> object.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.keypressed" name = "love.keypressed"><span>love.</span><wbr>keypressed</a></p><p class = "function_description">Callback function triggered when a key is pressed.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>keypressed( <span class = "arguments">key</span>, <span class = "arguments">scancode</span>, <span class = "arguments">isrepeat</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">key</td><td class = "ra_type"><a href="#KeyConstant">KeyConstant</a></td><td>Character of the pressed key.</td></tr><tr><td class = "arguments ra_name">scancode</td><td class = "ra_type"><a href="#Scancode">Scancode</a></td><td>The scancode representing the pressed key.</td></tr><tr><td class = "arguments ra_name">isrepeat</td><td class = "ra_type">boolean</td><td>Whether this keypress event is a repeat. The delay between key repeats depends on the user's system settings.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.keyreleased" name = "love.keyreleased"><span>love.</span><wbr>keyreleased</a></p><p class = "function_description">Callback function triggered when a keyboard key is released.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>keyreleased( <span class = "arguments">key</span>, <span class = "arguments">scancode</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">key</td><td class = "ra_type"><a href="#KeyConstant">KeyConstant</a></td><td>Character of the released key.</td></tr><tr><td class = "arguments ra_name">scancode</td><td class = "ra_type"><a href="#Scancode">Scancode</a></td><td>The scancode representing the released key.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.load" name = "love.load"><span>love.</span><wbr>load</a></p><p class = "function_description">This function is called exactly once at the beginning of the game.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>load( <span class = "arguments">arg</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">arg</td><td class = "ra_type">table</td><td>Command line arguments given to the game.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.lowmemory" name = "love.lowmemory"><span>love.</span><wbr>lowmemory</a></p><p class = "function_description">Callback function triggered when the system is running out of memory on mobile devices.<br /><br /> Mobile operating systems may forcefully kill the game if it uses too much memory, so any non-critical resource should be removed if possible (by setting all variables referencing the resources to nil, and calling collectgarbage()), when this event is triggered. Sounds and images in particular tend to use the most memory.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>lowmemory()</span></span></p><table class = "ra_table"></table></div><div class = "section"><p class = "function_heading"><a href = "#love.mousefocus" name = "love.mousefocus"><span>love.</span><wbr>mousefocus</a></p><p class = "function_description">Callback function triggered when window receives or loses mouse focus.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>mousefocus( <span class = "arguments">focus</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">focus</td><td class = "ra_type">boolean</td><td>Whether the window has mouse focus or not.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.mousemoved" name = "love.mousemoved"><span>love.</span><wbr>mousemoved</a></p><p class = "function_description">Callback function triggered when the mouse is moved.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>mousemoved( <span class = "arguments">x</span>, <span class = "arguments">y</span>, <span class = "arguments">dx</span>, <span class = "arguments">dy</span>, <span class = "arguments">istouch</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">x</td><td class = "ra_type">number</td><td>The mouse position on the x-axis.</td></tr><tr><td class = "arguments ra_name">y</td><td class = "ra_type">number</td><td>The mouse position on the y-axis.</td></tr><tr><td class = "arguments ra_name">dx</td><td class = "ra_type">number</td><td>The amount moved along the x-axis since the last time <a href="#love.mousemoved">love.mousemoved</a> was called.</td></tr><tr><td class = "arguments ra_name">dy</td><td class = "ra_type">number</td><td>The amount moved along the y-axis since the last time <a href="#love.mousemoved">love.mousemoved</a> was called.</td></tr><tr><td class = "arguments ra_name">istouch</td><td class = "ra_type">boolean</td><td>True if the mouse button press originated from a touchscreen touch-press.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.mousepressed" name = "love.mousepressed"><span>love.</span><wbr>mousepressed</a></p><p class = "function_description">Callback function triggered when a mouse button is pressed.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>mousepressed( <span class = "arguments">x</span>, <span class = "arguments">y</span>, <span class = "arguments">button</span>, <span class = "arguments">isTouch</span>, <span class = "arguments">presses</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">x</td><td class = "ra_type">number</td><td>Mouse x position, in pixels.</td></tr><tr><td class = "arguments ra_name">y</td><td class = "ra_type">number</td><td>Mouse y position, in pixels.</td></tr><tr><td class = "arguments ra_name">button</td><td class = "ra_type">number</td><td>The button index that was pressed. 1 is the primary mouse button, 2 is the secondary mouse button and 3 is the middle button. Further buttons are mouse dependent</td></tr><tr><td class = "arguments ra_name">isTouch</td><td class = "ra_type">boolean</td><td>True if the mouse button press originated from a touchscreen touch-press.</td></tr><tr><td class = "arguments ra_name">presses</td><td class = "ra_type">number</td><td>The number of presses in a short time frame and small area, used to simulate double, triple clicks</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.mousereleased" name = "love.mousereleased"><span>love.</span><wbr>mousereleased</a></p><p class = "function_description">Callback function triggered when a mouse button is released.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>mousereleased( <span class = "arguments">x</span>, <span class = "arguments">y</span>, <span class = "arguments">button</span>, <span class = "arguments">isTouch</span>, <span class = "arguments">presses</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">x</td><td class = "ra_type">number</td><td>Mouse x position, in pixels.</td></tr><tr><td class = "arguments ra_name">y</td><td class = "ra_type">number</td><td>Mouse y position, in pixels.</td></tr><tr><td class = "arguments ra_name">button</td><td class = "ra_type">number</td><td>The button index that was released. 1 is the primary mouse button, 2 is the secondary mouse button and 3 is the middle button. Further buttons are mouse dependent.</td></tr><tr><td class = "arguments ra_name">isTouch</td><td class = "ra_type">boolean</td><td>True if the mouse button press originated from a touchscreen touch-release.</td></tr><tr><td class = "arguments ra_name">presses</td><td class = "ra_type">number</td><td>The number of presses in a short time frame and small area, used to simulate double, triple clicks</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.quit" name = "love.quit"><span>love.</span><wbr>quit</a></p><p class = "function_description">Callback function triggered when the game is closed.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">r</span> = love.<wbr>quit()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">r</td><td class = "ra_type">boolean</td><td>Abort quitting. If true, do not close the game.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.resize" name = "love.resize"><span>love.</span><wbr>resize</a></p><p class = "function_description">Called when the window is resized, for example if the user resizes the window, or if <a href="#love.window.setMode">love.window.setMode</a> is called with an unsupported width or height in fullscreen and the window chooses the closest appropriate size.<br /><br />Calls to <a href="#love.window.setMode">love.window.setMode</a> will only trigger this event if the width or height of the window after the call doesn't match the requested width and height. This can happen if a fullscreen mode is requested which doesn't match any supported mode, or if the fullscreen type is 'desktop' and the requested width or height don't match the desktop resolution.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>resize( <span class = "arguments">w</span>, <span class = "arguments">h</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">w</td><td class = "ra_type">number</td><td>The new width.</td></tr><tr><td class = "arguments ra_name">h</td><td class = "ra_type">number</td><td>The new height.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.run" name = "love.run"><span>love.</span><wbr>run</a></p><p class = "function_description">The main function, containing the main loop. A sensible default is used when left out.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>run()</span></span></p><table class = "ra_table"></table></div><div class = "section"><p class = "function_heading"><a href = "#love.textedited" name = "love.textedited"><span>love.</span><wbr>textedited</a></p><p class = "function_description">Called when the candidate text for an IME (Input Method Editor) has changed.<br /><br />The candidate text is not the final text that the user will eventually choose. Use <a href="#love.textinput">love.textinput</a> for that.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>textedited( <span class = "arguments">text</span>, <span class = "arguments">start</span>, <span class = "arguments">length</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">text</td><td class = "ra_type">string</td><td>The UTF-8 encoded unicode candidate text.</td></tr><tr><td class = "arguments ra_name">start</td><td class = "ra_type">number</td><td>The start cursor of the selected candidate text.</td></tr><tr><td class = "arguments ra_name">length</td><td class = "ra_type">number</td><td>The length of the selected candidate text. May be 0.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.textinput" name = "love.textinput"><span>love.</span><wbr>textinput</a></p><p class = "function_description">Called when text has been entered by the user. For example if shift-2 is pressed on an American keyboard layout, the text "@" will be generated.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>textinput( <span class = "arguments">text</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">text</td><td class = "ra_type">string</td><td>The UTF-8 encoded unicode text.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.threaderror" name = "love.threaderror"><span>love.</span><wbr>threaderror</a></p><p class = "function_description">Callback function triggered when a <a href="#Thread">Thread</a> encounters an error.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>threaderror( <span class = "arguments">thread</span>, <span class = "arguments">errorstr</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">thread</td><td class = "ra_type"><a href="#Thread">Thread</a></td><td>The thread which produced the error.</td></tr><tr><td class = "arguments ra_name">errorstr</td><td class = "ra_type">string</td><td>The error message.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.touchmoved" name = "love.touchmoved"><span>love.</span><wbr>touchmoved</a></p><p class = "function_description">Callback function triggered when a touch press moves inside the touch screen.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>touchmoved( <span class = "arguments">id</span>, <span class = "arguments">x</span>, <span class = "arguments">y</span>, <span class = "arguments">dx</span>, <span class = "arguments">dy</span>, <span class = "arguments">pressure</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">id</td><td class = "ra_type">light userdata</td><td>The identifier for the touch press.</td></tr><tr><td class = "arguments ra_name">x</td><td class = "ra_type">number</td><td>The x-axis position of the touch inside the window, in pixels.</td></tr><tr><td class = "arguments ra_name">y</td><td class = "ra_type">number</td><td>The y-axis position of the touch inside the window, in pixels.</td></tr><tr><td class = "arguments ra_name">dx</td><td class = "ra_type">number</td><td>The x-axis movement of the touch inside the window, in pixels.</td></tr><tr><td class = "arguments ra_name">dy</td><td class = "ra_type">number</td><td>The y-axis movement of the touch inside the window, in pixels.</td></tr><tr><td class = "arguments ra_name">pressure</td><td class = "ra_type">number</td><td>The amount of pressure being applied. Most touch screens aren't pressure sensitive, in which case the pressure will be 1.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.touchpressed" name = "love.touchpressed"><span>love.</span><wbr>touchpressed</a></p><p class = "function_description">Callback function triggered when the touch screen is touched.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>touchpressed( <span class = "arguments">id</span>, <span class = "arguments">x</span>, <span class = "arguments">y</span>, <span class = "arguments">dx</span>, <span class = "arguments">dy</span>, <span class = "arguments">pressure</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">id</td><td class = "ra_type">light userdata</td><td>The identifier for the touch press.</td></tr><tr><td class = "arguments ra_name">x</td><td class = "ra_type">number</td><td>The x-axis position of the touch press inside the window, in pixels.</td></tr><tr><td class = "arguments ra_name">y</td><td class = "ra_type">number</td><td>The y-axis position of the touch press inside the window, in pixels.</td></tr><tr><td class = "arguments ra_name">dx</td><td class = "ra_type">number</td><td>The x-axis movement of the touch press inside the window, in pixels. This should always be zero.</td></tr><tr><td class = "arguments ra_name">dy</td><td class = "ra_type">number</td><td>The y-axis movement of the touch press inside the window, in pixels. This should always be zero.</td></tr><tr><td class = "arguments ra_name">pressure</td><td class = "ra_type">number</td><td>The amount of pressure being applied. Most touch screens aren't pressure sensitive, in which case the pressure will be 1.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.touchreleased" name = "love.touchreleased"><span>love.</span><wbr>touchreleased</a></p><p class = "function_description">Callback function triggered when the touch screen stops being touched.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>touchreleased( <span class = "arguments">id</span>, <span class = "arguments">x</span>, <span class = "arguments">y</span>, <span class = "arguments">dx</span>, <span class = "arguments">dy</span>, <span class = "arguments">pressure</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">id</td><td class = "ra_type">light userdata</td><td>The identifier for the touch press.</td></tr><tr><td class = "arguments ra_name">x</td><td class = "ra_type">number</td><td>The x-axis position of the touch inside the window, in pixels.</td></tr><tr><td class = "arguments ra_name">y</td><td class = "ra_type">number</td><td>The y-axis position of the touch inside the window, in pixels.</td></tr><tr><td class = "arguments ra_name">dx</td><td class = "ra_type">number</td><td>The x-axis movement of the touch inside the window, in pixels.</td></tr><tr><td class = "arguments ra_name">dy</td><td class = "ra_type">number</td><td>The y-axis movement of the touch inside the window, in pixels.</td></tr><tr><td class = "arguments ra_name">pressure</td><td class = "ra_type">number</td><td>The amount of pressure being applied. Most touch screens aren't pressure sensitive, in which case the pressure will be 1.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.update" name = "love.update"><span>love.</span><wbr>update</a></p><p class = "function_description">Callback function used to update the state of the game every frame.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>update( <span class = "arguments">dt</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">dt</td><td class = "ra_type">number</td><td>Time since the last update in seconds.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.visible" name = "love.visible"><span>love.</span><wbr>visible</a></p><p class = "function_description">Callback function triggered when window is minimized/hidden or unminimized by the user.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>visible( <span class = "arguments">visible</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">visible</td><td class = "ra_type">boolean</td><td>True if the window is visible, false if it isn't.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.wheelmoved" name = "love.wheelmoved"><span>love.</span><wbr>wheelmoved</a></p><p class = "function_description">Callback function triggered when the mouse wheel is moved.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.<wbr>wheelmoved( <span class = "arguments">x</span>, <span class = "arguments">y</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">x</td><td class = "ra_type">number</td><td>Amount of horizontal mouse wheel movement. Positive values indicate movement to the right.</td></tr><tr><td class = "arguments ra_name">y</td><td class = "ra_type">number</td><td>Amount of vertical mouse wheel movement. Positive values indicate upward movement.</td></tr></table></div><div class = "section"><p class = "section_heading"><a href = "#Data" name = "Data">Data</a></p><p class = "section_description">The superclass of all data.</p><p class = "section_navigation_subheading">Functions</p><p class = "section_navigation_link">Data:<a href="#Data:getPointer">getPointer</a></p><p class = "section_navigation_link">Data:<a href="#Data:getSize">getSize</a></p><p class = "section_navigation_link">Data:<a href="#Data:getString">getString</a></p><p class = "section_navigation_subheading">Supertypes</p><p class = "section_navigation_link"><a href="#Object">Object</a></p><p class = "section_navigation_subheading">Subtypes</p><p class = "section_navigation_link"><a href="#CompressedData">CompressedData</a></p><p class = "section_navigation_link"><a href="#CompressedImageData">CompressedImageData</a></p><p class = "section_navigation_link"><a href="#FileData">FileData</a></p><p class = "section_navigation_link"><a href="#ImageData">ImageData</a></p><p class = "section_navigation_link"><a href="#SoundData">SoundData</a></p></div><div class = "section"><p class = "function_heading"><a href = "#Data:getPointer" name = "Data:getPointer"><span>Data:</span><wbr>getPointer</a></p><p class = "function_description">Gets a pointer to the <a href="#Data">Data</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">pointer</span> = Data:<wbr>getPointer()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">pointer</td><td class = "ra_type">light userdata</td><td>A raw pointer to the <a href="#Data">Data</a>.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Data:getSize" name = "Data:getSize"><span>Data:</span><wbr>getSize</a></p><p class = "function_description">Gets the size of the <a href="#Data">Data</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">size</span> = Data:<wbr>getSize()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">size</td><td class = "ra_type">number</td><td>The size of the <a href="#Data">Data</a> in bytes.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Data:getString" name = "Data:getString"><span>Data:</span><wbr>getString</a></p><p class = "function_description">Gets the full <a href="#Data">Data</a> as a string.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">data</span> = Data:<wbr>getString()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">data</td><td class = "ra_type">string</td><td>The raw data.</td></tr></table></div><div class = "section"><p class = "section_heading"><a href = "#Drawable" name = "Drawable">Drawable</a></p><p class = "section_description">Superclass for all things that can be drawn on screen. This is an abstract type that can't be created directly.</p><p class = "section_navigation_subheading">Supertypes</p><p class = "section_navigation_link"><a href="#Object">Object</a></p><p class = "section_navigation_subheading">Subtypes</p><p class = "section_navigation_link"><a href="#Canvas">Canvas</a></p><p class = "section_navigation_link"><a href="#Image">Image</a></p><p class = "section_navigation_link"><a href="#Mesh">Mesh</a></p><p class = "section_navigation_link"><a href="#ParticleSystem">ParticleSystem</a></p><p class = "section_navigation_link"><a href="#SpriteBatch">SpriteBatch</a></p><p class = "section_navigation_link"><a href="#Text">Text</a></p><p class = "section_navigation_link"><a href="#Texture">Texture</a></p><p class = "section_navigation_link"><a href="#Video">Video</a></p></div><div class = "section"><p class = "section_heading"><a href = "#Object" name = "Object">Object</a></p><p class = "section_description">The superclass of all L&Ouml;VE types.</p><p class = "section_navigation_subheading">Functions</p><p class = "section_navigation_link">Object:<a href="#Object:type">type</a></p><p class = "section_navigation_link">Object:<a href="#Object:typeOf">typeOf</a></p><p class = "section_navigation_subheading">Subtypes</p><p class = "section_navigation_link"><a href="#BezierCurve">BezierCurve</a></p><p class = "section_navigation_link"><a href="#Body">Body</a></p><p class = "section_navigation_link"><a href="#Canvas">Canvas</a></p><p class = "section_navigation_link"><a href="#ChainShape">ChainShape</a></p><p class = "section_navigation_link"><a href="#Channel">Channel</a></p><p class = "section_navigation_link"><a href="#CircleShape">CircleShape</a></p><p class = "section_navigation_link"><a href="#CompressedData">CompressedData</a></p><p class = "section_navigation_link"><a href="#CompressedImageData">CompressedImageData</a></p><p class = "section_navigation_link"><a href="#Contact">Contact</a></p><p class = "section_navigation_link"><a href="#Cursor">Cursor</a></p><p class = "section_navigation_link"><a href="#Data">Data</a></p><p class = "section_navigation_link"><a href="#DistanceJoint">DistanceJoint</a></p><p class = "section_navigation_link"><a href="#Drawable">Drawable</a></p><p class = "section_navigation_link"><a href="#EdgeShape">EdgeShape</a></p><p class = "section_navigation_link"><a href="#File">File</a></p><p class = "section_navigation_link"><a href="#FileData">FileData</a></p><p class = "section_navigation_link"><a href="#Fixture">Fixture</a></p><p class = "section_navigation_link"><a href="#Font">Font</a></p><p class = "section_navigation_link"><a href="#FrictionJoint">FrictionJoint</a></p><p class = "section_navigation_link"><a href="#GearJoint">GearJoint</a></p><p class = "section_navigation_link"><a href="#Image">Image</a></p><p class = "section_navigation_link"><a href="#ImageData">ImageData</a></p><p class = "section_navigation_link"><a href="#Joint">Joint</a></p><p class = "section_navigation_link"><a href="#Joystick">Joystick</a></p><p class = "section_navigation_link"><a href="#Mesh">Mesh</a></p><p class = "section_navigation_link"><a href="#MotorJoint">MotorJoint</a></p><p class = "section_navigation_link"><a href="#MouseJoint">MouseJoint</a></p><p class = "section_navigation_link"><a href="#ParticleSystem">ParticleSystem</a></p><p class = "section_navigation_link"><a href="#PolygonShape">PolygonShape</a></p><p class = "section_navigation_link"><a href="#PrismaticJoint">PrismaticJoint</a></p><p class = "section_navigation_link"><a href="#PulleyJoint">PulleyJoint</a></p><p class = "section_navigation_link"><a href="#Quad">Quad</a></p><p class = "section_navigation_link"><a href="#RandomGenerator">RandomGenerator</a></p><p class = "section_navigation_link"><a href="#RevoluteJoint">RevoluteJoint</a></p><p class = "section_navigation_link"><a href="#RopeJoint">RopeJoint</a></p><p class = "section_navigation_link"><a href="#Shader">Shader</a></p><p class = "section_navigation_link"><a href="#Shape">Shape</a></p><p class = "section_navigation_link"><a href="#SoundData">SoundData</a></p><p class = "section_navigation_link"><a href="#Source">Source</a></p><p class = "section_navigation_link"><a href="#SpriteBatch">SpriteBatch</a></p><p class = "section_navigation_link"><a href="#Text">Text</a></p><p class = "section_navigation_link"><a href="#Texture">Texture</a></p><p class = "section_navigation_link"><a href="#Thread">Thread</a></p><p class = "section_navigation_link"><a href="#Video">Video</a></p><p class = "section_navigation_link"><a href="#WeldJoint">WeldJoint</a></p><p class = "section_navigation_link"><a href="#WheelJoint">WheelJoint</a></p><p class = "section_navigation_link"><a href="#World">World</a></p></div><div class = "section"><p class = "function_heading"><a href = "#Object:type" name = "Object:type"><span>Object:</span><wbr>type</a></p><p class = "function_description">Gets the type of the object as a string.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">type</span> = Object:<wbr>type()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">type</td><td class = "ra_type">string</td><td>The type as a string.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Object:typeOf" name = "Object:typeOf"><span>Object:</span><wbr>typeOf</a></p><p class = "function_description">Checks whether an object is of a certain type. If the object has the type with the specified name in its hierarchy, this function will return true.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">b</span> = Object:<wbr>typeOf( <span class = "arguments">name</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">b</td><td class = "ra_type">boolean</td><td>True if the object is of the specified type, false otherwise.</td></tr><tr><td class = "arguments ra_name">name</td><td class = "ra_type">string</td><td>The name of the type to check for.</td></tr></table></div><div class = "section"><p class = "section_heading"><a href = "#love.audio" name = "love.audio">love.audio</a></p><p class = "section_navigation_subheading">Types</p><p class = "section_navigation_link"><a href="#Source">Source</a></p><p class = "section_navigation_link"><a href="#RecordingDevice">RecordingDevice</a></p><p class = "section_navigation_subheading">Functions</p><p class = "section_navigation_link">love.audio.<a href="#love.audio.getActiveEffects">getActiveEffects</a></p><p class = "section_navigation_link">love.audio.<a href="#love.audio.getActiveSourceCount">getActiveSourceCount</a></p><p class = "section_navigation_link">love.audio.<a href="#love.audio.getMaxSceneEffects">getMaxSceneEffects</a></p><p class = "section_navigation_link">love.audio.<a href="#love.audio.getMaxSourceEffects">getMaxSourceEffects</a></p><p class = "section_navigation_link">love.audio.<a href="#love.audio.getRecordingDevices">getRecordingDevices</a></p><p class = "section_navigation_link">love.audio.<a href="#love.audio.getSourceCount">getSourceCount</a></p><p class = "section_navigation_link">love.audio.<a href="#love.audio.isEffectsSupported">isEffectsSupported</a></p><p class = "section_navigation_link">love.audio.<a href="#love.audio.newQueueableSource">newQueueableSource</a></p><p class = "section_navigation_link">love.audio.<a href="#love.audio.pause">pause</a></p><p class = "section_navigation_link">love.audio.<a href="#love.audio.play">play</a></p><p class = "section_navigation_link">love.audio.<a href="#love.audio.getDistanceModel">get</a><span class = "slash">/</span><a href="#love.audio.setDistanceModel">setDistanceModel</a></p><p class = "section_navigation_link">love.audio.<a href="#love.audio.getDopplerScale">get</a><span class = "slash">/</span><a href="#love.audio.setDopplerScale">setDopplerScale</a></p><p class = "section_navigation_link">love.audio.<a href="#love.audio.getEffect">get</a><span class = "slash">/</span><a href="#love.audio.setEffect">setEffect</a></p><p class = "section_navigation_link">love.audio.<a href="#love.audio.setMixWithSystem">setMixWithSystem</a></p><p class = "section_navigation_link">love.audio.<a href="#love.audio.getOrientation">get</a><span class = "slash">/</span><a href="#love.audio.setOrientation">setOrientation</a></p><p class = "section_navigation_link">love.audio.<a href="#love.audio.getPosition">get</a><span class = "slash">/</span><a href="#love.audio.setPosition">setPosition</a></p><p class = "section_navigation_link">love.audio.<a href="#love.audio.getVelocity">get</a><span class = "slash">/</span><a href="#love.audio.setVelocity">setVelocity</a></p><p class = "section_navigation_link">love.audio.<a href="#love.audio.getVolume">get</a><span class = "slash">/</span><a href="#love.audio.setVolume">setVolume</a></p><p class = "section_navigation_link">love.audio.<a href="#love.audio.stop">stop</a></p><p class = "section_navigation_subheading">Enums</p><p class = "section_navigation_link"><a href="#DistanceModel">DistanceModel</a></p><p class = "section_navigation_link"><a href="#EffectType">EffectType</a></p><p class = "section_navigation_link"><a href="#EffectWaveform">EffectWaveform</a></p><p class = "section_navigation_link"><a href="#FilterType">FilterType</a></p><p class = "section_navigation_link"><a href="#SourceType">SourceType</a></p><p class = "section_navigation_link"><a href="#TimeUnit">TimeUnit</a></p></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.getActiveEffects" name = "love.audio.getActiveEffects"><span>love.audio.</span><wbr>getActiveEffects</a></p><p class = "function_description">Gets a list of the names of the currently enabled effects.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">effects</span> = love.audio.<wbr>getActiveEffects()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">effects</td><td class = "ra_type">table</td><td>The list of the names of the currently enabled effects.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.getActiveSourceCount" name = "love.audio.getActiveSourceCount"><span>love.audio.</span><wbr>getActiveSourceCount</a></p><p class = "function_description">Gets the current number of simultaneously playing sources.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">count</span> = love.audio.<wbr>getActiveSourceCount()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">count</td><td class = "ra_type">number</td><td>The current number of simultaneously playing sources.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.getDistanceModel" name = "love.audio.getDistanceModel"><span>love.audio.</span><wbr>getDistanceModel</a></p><p class = "function_description">Returns the distance attenuation model.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">model</span> = love.audio.<wbr>getDistanceModel()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">model</td><td class = "ra_type"><a href="#DistanceModel">DistanceModel</a></td><td>The current distance model. The default is 'inverseclamped'.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.getDopplerScale" name = "love.audio.getDopplerScale"><span>love.audio.</span><wbr>getDopplerScale</a></p><p class = "function_description">Gets the current global scale factor for velocity-based doppler effects.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">scale</span> = love.audio.<wbr>getDopplerScale()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">scale</td><td class = "ra_type">number</td><td>The current doppler scale factor.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.getEffect" name = "love.audio.getEffect"><span>love.audio.</span><wbr>getEffect</a></p><p class = "function_description">Gets the settings associated with an effect.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">settings</span> = love.audio.<wbr>getEffect( <span class = "arguments">name</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">settings</td><td class = "ra_type">table</td><td>The settings associated with the effect.</td></tr><tr><td class = "arguments ra_name">name</td><td class = "ra_type">string</td><td>The name of the effect.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.getMaxSceneEffects" name = "love.audio.getMaxSceneEffects"><span>love.audio.</span><wbr>getMaxSceneEffects</a></p><p class = "function_description">Gets the maximum number of active Effects, supported by the system.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">maximum</span> = love.audio.<wbr>getMaxSceneEffects()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">maximum</td><td class = "ra_type">number</td><td>The maximum number of active Effects.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.getMaxSourceEffects" name = "love.audio.getMaxSourceEffects"><span>love.audio.</span><wbr>getMaxSourceEffects</a></p><p class = "function_description">Gets the maximum number of active Effects in a single <a href="#Source">Source</a> object, that the system can support.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">maximum</span> = love.audio.<wbr>getMaxSourceEffects()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">maximum</td><td class = "ra_type">number</td><td>The maximum number of active Effects per <a href="#Source">Source</a>.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.getOrientation" name = "love.audio.getOrientation"><span>love.audio.</span><wbr>getOrientation</a></p><p class = "function_description">Returns the orientation of the listener.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">fx</span>, <span class = "returns">fy</span>, <span class = "returns">fz</span>, <span class = "returns">ux</span>, <span class = "returns">uy</span>, <span class = "returns">uz</span> = love.audio.<wbr>getOrientation()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">fx</td><td class = "ra_type">number</td><td>The X component of the forward vector of the listener orientation.</td></tr><tr><td class = "returns ra_name">fy</td><td class = "ra_type">number</td><td>The Y component of the forward vector of the listener orientation.</td></tr><tr><td class = "returns ra_name">fz</td><td class = "ra_type">number</td><td>The Z component of the forward vector of the listener orientation.</td></tr><tr><td class = "returns ra_name">ux</td><td class = "ra_type">number</td><td>The X component of the up vector of the listener orientation.</td></tr><tr><td class = "returns ra_name">uy</td><td class = "ra_type">number</td><td>The Y component of the up vector of the listener orientation.</td></tr><tr><td class = "returns ra_name">uz</td><td class = "ra_type">number</td><td>The Z component of the up vector of the listener orientation.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.getPosition" name = "love.audio.getPosition"><span>love.audio.</span><wbr>getPosition</a></p><p class = "function_description">Returns the position of the listener.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">x</span>, <span class = "returns">y</span>, <span class = "returns">z</span> = love.audio.<wbr>getPosition()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">x</td><td class = "ra_type">number</td><td>The X position of the listener.</td></tr><tr><td class = "returns ra_name">y</td><td class = "ra_type">number</td><td>The Y position of the listener.</td></tr><tr><td class = "returns ra_name">z</td><td class = "ra_type">number</td><td>The Z position of the listener.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.getRecordingDevices" name = "love.audio.getRecordingDevices"><span>love.audio.</span><wbr>getRecordingDevices</a></p><p class = "function_description">Gets a list of <a href="#RecordingDevice">RecordingDevices</a> on the system. The first device in the list is the user's default recording device.<br /><br />If no device is available, it will return an empty list.<br />Recording is not supported on iOS</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">devices</span> = love.audio.<wbr>getRecordingDevices()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">devices</td><td class = "ra_type">table</td><td>The list of <a href="#RecordingDevice">RecordingDevices</a></td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.getSourceCount" name = "love.audio.getSourceCount"><span>love.audio.</span><wbr>getSourceCount</a></p><p class = "function_description">Returns the number of sources which are currently playing or paused.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">numSources</span> = love.audio.<wbr>getSourceCount()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">numSources</td><td class = "ra_type">number</td><td>The number of sources which are currently playing or paused.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.getVelocity" name = "love.audio.getVelocity"><span>love.audio.</span><wbr>getVelocity</a></p><p class = "function_description">Returns the velocity of the listener.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">x</span>, <span class = "returns">y</span>, <span class = "returns">z</span> = love.audio.<wbr>getVelocity()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">x</td><td class = "ra_type">number</td><td>The X velocity of the listener.</td></tr><tr><td class = "returns ra_name">y</td><td class = "ra_type">number</td><td>The Y velocity of the listener.</td></tr><tr><td class = "returns ra_name">z</td><td class = "ra_type">number</td><td>The Z velocity of the listener.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.getVolume" name = "love.audio.getVolume"><span>love.audio.</span><wbr>getVolume</a></p><p class = "function_description">Returns the master volume.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">volume</span> = love.audio.<wbr>getVolume()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">volume</td><td class = "ra_type">number</td><td>The current master volume.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.isEffectsSupported" name = "love.audio.isEffectsSupported"><span>love.audio.</span><wbr>isEffectsSupported</a></p><p class = "function_description">Gets whether Effects are supported in the system.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">supported</span> = love.audio.<wbr>isEffectsSupported()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">supported</td><td class = "ra_type">boolean</td><td>True if Effects are supported, false otherwise.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.newQueueableSource" name = "love.audio.newQueueableSource"><span>love.audio.</span><wbr>newQueueableSource</a></p><p class = "function_description">Creates a new <a href="#Source">Source</a> usable for real-time generated sound playback with <a href="#Source:queue">Source:queue</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">source</span> = love.audio.<wbr>newQueueableSource( <span class = "arguments">samplerate</span>, <span class = "arguments">bitdepth</span>, <span class = "arguments">channels</span>, <span class = "arguments">buffercount</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">source</td><td class = "ra_type"><a href="#Source">Source</a></td><td>The new <a href="#Source">Source</a> usable with <a href="#Source:queue">Source:queue</a>.</td></tr><tr><td class = "arguments ra_name">samplerate</td><td class = "ra_type">number</td><td>Number of samples per second when playing.</td></tr><tr><td class = "arguments ra_name">bitdepth</td><td class = "ra_type">number</td><td>Bits per sample (8 or 16).</td></tr><tr><td class = "arguments ra_name">channels</td><td class = "ra_type">number</td><td>1 for mono, 2 for stereo.</td></tr><tr><td class = "arguments ra_name">buffercount <span class = "default">(0)</span></td><td class = "ra_type">number</td><td>The number of buffers that can be queued up at any given time with <a href="#Source:queue">Source:queue</a>. Cannot be greater than 64. A sensible default (~8) is chosen if no value is specified.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.pause" name = "love.audio.pause"><span>love.audio.</span><wbr>pause</a></p><p class = "function_description">Pauses currently played <a href="#Source">Sources</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.audio.<wbr>pause()</span></span></p><p class = "variant_description">This function will pause all currently active <a href="#Source">Sources</a>.</p><table class = "ra_table"></table><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.audio.<wbr>pause( <span class = "arguments">source</span> )</span></span></p><p class = "variant_description">This function will only pause the specified <a href="#Source">Source</a>.</p><table class = "ra_table"><tr><td class = "arguments ra_name">source</td><td class = "ra_type"><a href="#Source">Source</a></td><td>The source on which to pause the playback.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.play" name = "love.audio.play"><span>love.audio.</span><wbr>play</a></p><p class = "function_description">Plays the specified <a href="#Source">Source</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.audio.<wbr>play( <span class = "arguments">source</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">source</td><td class = "ra_type"><a href="#Source">Source</a></td><td>The <a href="#Source">Source</a> to play.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.setDistanceModel" name = "love.audio.setDistanceModel"><span>love.audio.</span><wbr>setDistanceModel</a></p><p class = "function_description">Sets the distance attenuation model.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.audio.<wbr>setDistanceModel( <span class = "arguments">model</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">model</td><td class = "ra_type"><a href="#DistanceModel">DistanceModel</a></td><td>The new distance model.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.setDopplerScale" name = "love.audio.setDopplerScale"><span>love.audio.</span><wbr>setDopplerScale</a></p><p class = "function_description">Sets a global scale factor for velocity-based doppler effects. The default scale value is 1.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.audio.<wbr>setDopplerScale( <span class = "arguments">scale</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">scale</td><td class = "ra_type">number</td><td>The new doppler scale factor. The scale must be greater than 0.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.setEffect" name = "love.audio.setEffect"><span>love.audio.</span><wbr>setEffect</a></p><p class = "function_description">Defines an effect that can be applied to a <a href="#Source">Source</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">success</span> = love.audio.<wbr>setEffect( <span class = "arguments">name</span>, <span class = "arguments">settings</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">success</td><td class = "ra_type">boolean</td><td>Whether the effect was successfully created.</td></tr><tr><td class = "arguments ra_name">name</td><td class = "ra_type">string</td><td>The name of the effect.</td></tr><tr><td class = "arguments ra_name">settings</td><td class = "ra_type">table</td><td>The settings to use for this effect, with the following fields:</td></tr><tr><td class = "arguments ra_name">settings.type</td><td class = "ra_type"><a href="#EffectType">EffectType</a></td><td>The type of effect to use.</td></tr><tr><td class = "arguments ra_name">settings.volume</td><td class = "ra_type">number</td><td>The volume of the effect.</td></tr><tr><td class = "arguments ra_name">settings....</td><td class = "ra_type">number</td><td>Effect-specific settings.</td></tr></table><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">success</span> = love.audio.<wbr>setEffect( <span class = "arguments">name</span>, <span class = "arguments">enabled</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">success</td><td class = "ra_type">boolean</td><td>Whether the Effect was successfully disabled.</td></tr><tr><td class = "arguments ra_name">name</td><td class = "ra_type">string</td><td>The name of the effect.</td></tr><tr><td class = "arguments ra_name">enabled <span class = "default">(true)</span></td><td class = "ra_type">boolean</td><td>If false and the given effect name was previously set, disables the effect.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.setMixWithSystem" name = "love.audio.setMixWithSystem"><span>love.audio.</span><wbr>setMixWithSystem</a></p><p class = "function_description">Sets whether the system should mix the audio with the system's audio.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">success</span> = love.audio.<wbr>setMixWithSystem( <span class = "arguments">mix</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">success</td><td class = "ra_type">boolean</td><td>True if the change succeeded, false otherwise.</td></tr><tr><td class = "arguments ra_name">mix</td><td class = "ra_type">boolean</td><td>True to enable mixing, false to disable it.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.setOrientation" name = "love.audio.setOrientation"><span>love.audio.</span><wbr>setOrientation</a></p><p class = "function_description">Sets the orientation of the listener.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.audio.<wbr>setOrientation( <span class = "arguments">fx</span>, <span class = "arguments">fy</span>, <span class = "arguments">fz</span>, <span class = "arguments">ux</span>, <span class = "arguments">uy</span>, <span class = "arguments">uz</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">fx</td><td class = "ra_type">number</td><td>The X component of the forward vector of the listener orientation.</td></tr><tr><td class = "arguments ra_name">fy</td><td class = "ra_type">number</td><td>The Y component of the forward vector of the listener orientation.</td></tr><tr><td class = "arguments ra_name">fz</td><td class = "ra_type">number</td><td>The Z component of the forward vector of the listener orientation.</td></tr><tr><td class = "arguments ra_name">ux</td><td class = "ra_type">number</td><td>The X component of the up vector of the listener orientation.</td></tr><tr><td class = "arguments ra_name">uy</td><td class = "ra_type">number</td><td>The Y component of the up vector of the listener orientation.</td></tr><tr><td class = "arguments ra_name">uz</td><td class = "ra_type">number</td><td>The Z component of the up vector of the listener orientation.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.setPosition" name = "love.audio.setPosition"><span>love.audio.</span><wbr>setPosition</a></p><p class = "function_description">Sets the position of the listener, which determines how sounds play.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.audio.<wbr>setPosition( <span class = "arguments">x</span>, <span class = "arguments">y</span>, <span class = "arguments">z</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">x</td><td class = "ra_type">number</td><td>The X position of the listener.</td></tr><tr><td class = "arguments ra_name">y</td><td class = "ra_type">number</td><td>The Y position of the listener.</td></tr><tr><td class = "arguments ra_name">z</td><td class = "ra_type">number</td><td>The Z position of the listener.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.setVelocity" name = "love.audio.setVelocity"><span>love.audio.</span><wbr>setVelocity</a></p><p class = "function_description">Sets the velocity of the listener.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.audio.<wbr>setVelocity( <span class = "arguments">x</span>, <span class = "arguments">y</span>, <span class = "arguments">z</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">x</td><td class = "ra_type">number</td><td>The X velocity of the listener.</td></tr><tr><td class = "arguments ra_name">y</td><td class = "ra_type">number</td><td>The Y velocity of the listener.</td></tr><tr><td class = "arguments ra_name">z <span class = "default">(0)</span></td><td class = "ra_type">number</td><td>The Z velocity of the listener.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.setVolume" name = "love.audio.setVolume"><span>love.audio.</span><wbr>setVolume</a></p><p class = "function_description">Sets the master volume.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.audio.<wbr>setVolume( <span class = "arguments">volume</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">volume</td><td class = "ra_type">number</td><td>1.0f is max and 0.0f is off.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.audio.stop" name = "love.audio.stop"><span>love.audio.</span><wbr>stop</a></p><p class = "function_description">Stops currently played sources.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.audio.<wbr>stop()</span></span></p><p class = "variant_description">This function will stop all currently active sources.</p><table class = "ra_table"></table><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">love.audio.<wbr>stop( <span class = "arguments">source</span> )</span></span></p><p class = "variant_description">This function will only stop the specified source.</p><table class = "ra_table"><tr><td class = "arguments ra_name">source</td><td class = "ra_type"><a href="#Source">Source</a></td><td>The source on which to stop the playback.</td></tr></table></div><div class = "section"><p class = "section_heading"><a href = "#DistanceModel" name = "DistanceModel">DistanceModel</a></p><p class = "constant_name">none</p><p class = "constant_description">Sources do not get attenuated.</p><p class = "constant_name">inverse</p><p class = "constant_description">Inverse distance attenuation.</p><p class = "constant_name">inverseclamped</p><p class = "constant_description">Inverse distance attenuation. Gain is clamped. In version 0.9.2 and older this is named inverse clamped.</p><p class = "constant_name">linear</p><p class = "constant_description">Linear attenuation.</p><p class = "constant_name">linearclamped</p><p class = "constant_description">Linear attenuation. Gain is clamped. In version 0.9.2 and older this is named linear clamped.</p><p class = "constant_name">exponent</p><p class = "constant_description">Exponential attenuation.</p><p class = "constant_name">exponentclamped</p><p class = "constant_description">Exponential attenuation. Gain is clamped. In version 0.9.2 and older this is named exponent clamped.</p></div><div class = "section"><p class = "section_heading"><a href = "#EffectType" name = "EffectType">EffectType</a></p><p class = "constant_name">chorus</p><p class = "constant_description">Plays multiple copies of the sound with slight pitch and time variation. Used to make sounds sound "fuller" or "thicker".</p><p class = "constant_name">compressor</p><p class = "constant_description">Decreases the dynamic range of the sound, making the loud and quiet parts closer in volume, producing a more uniform amplitude throughout time.</p><p class = "constant_name">distortion</p><p class = "constant_description">Alters the sound by amplifying it until it clips, shearing off parts of the signal, leading to a compressed and distorted sound.</p><p class = "constant_name">echo</p><p class = "constant_description">Decaying feedback based effect, on the order of seconds. Also known as delay; causes the sound to repeat at regular intervals at a decreasing volume.</p><p class = "constant_name">equalizer</p><p class = "constant_description">Adjust the frequency components of the sound using a 4-band (low-shelf, two band-pass and a high-shelf) equalizer.</p><p class = "constant_name">flanger</p><p class = "constant_description">Plays two copies of the sound; while varying the phase, or equivalently delaying one of them, by amounts on the order of milliseconds, resulting in phasing sounds.</p><p class = "constant_name">reverb</p><p class = "constant_description">Decaying feedback based effect, on the order of milliseconds. Used to simulate the reflection off of the surroundings.</p><p class = "constant_name">ringmodulator</p><p class = "constant_description">An implementation of amplitude modulation; multiplies the source signal with a simple waveform, to produce either volume changes, or inharmonic overtones.</p></div><div class = "section"><p class = "section_heading"><a href = "#EffectWaveform" name = "EffectWaveform">EffectWaveform</a></p><p class = "constant_name">sawtooth</p><p class = "constant_description">A sawtooth wave, also known as a ramp wave. Named for its linear rise, and (near-)instantaneous fall along time.</p><p class = "constant_name">sine</p><p class = "constant_description">A sine wave. Follows a trigonometric sine function.</p><p class = "constant_name">square</p><p class = "constant_description">A square wave. Switches between high and low states (near-)instantaneously.</p><p class = "constant_name">triangle</p><p class = "constant_description">A triangle wave. Follows a linear rise and fall that repeats periodically.</p></div><div class = "section"><p class = "section_heading"><a href = "#FilterType" name = "FilterType">FilterType</a></p><p class = "constant_name">lowpass</p><p class = "constant_description">Low-pass filter. High frequency sounds are attenuated.</p><p class = "constant_name">highpass</p><p class = "constant_description">High-pass filter. Low frequency sounds are attenuated.</p><p class = "constant_name">bandpass</p><p class = "constant_description">Band-pass filter. Both high and low frequency sounds are attenuated based on the given parameters.</p></div><div class = "section"><p class = "section_heading"><a href = "#SourceType" name = "SourceType">SourceType</a></p><p class = "constant_name">static</p><p class = "constant_description">The whole audio is decoded.</p><p class = "constant_name">stream</p><p class = "constant_description">The audio is decoded in chunks when needed.</p><p class = "constant_name">queue</p><p class = "constant_description">The audio must be manually queued by the user with <a href="#Source:queue">Source:queue</a>.</p></div><div class = "section"><p class = "section_heading"><a href = "#TimeUnit" name = "TimeUnit">TimeUnit</a></p><p class = "constant_name">seconds</p><p class = "constant_description">Regular seconds.</p><p class = "constant_name">samples</p><p class = "constant_description">Audio samples.</p></div><div class = "section"><p class = "section_heading"><a href = "#Source" name = "Source">Source</a></p><p class = "section_description">A Source represents audio you can play back. You can do interesting things with Sources, like set the volume, pitch, and its position relative to the listener.</p><p class = "section_navigation_subheading">Constructors</p><p class = "section_navigation_link">love.audio.<a href="#love.audio.newSource">newSource</a></p><p class = "section_navigation_subheading">Functions</p><p class = "section_navigation_subsection_heading">Playback</p><p class = "section_navigation_link">Source:<a href="#Source:play">play</a></p><p class = "section_navigation_link">Source:<a href="#Source:stop">stop</a></p><p class = "section_navigation_link">Source:<a href="#Source:pause">pause</a></p><p class = "section_navigation_link">Source:<a href="#Source:tell">tell</a><span class = "slash">/</span><a href="#Source:seek">seek</a></p><p class = "section_navigation_link">Source:<a href="#Source:isLooping">is</a><span class = "slash">/</span><a href="#Source:setLooping">setLooping</a></p><p class = "section_navigation_link">Source:<a href="#Source:getPitch">get</a><span class = "slash">/</span><a href="#Source:setPitch">setPitch</a></p><p class = "section_navigation_link">Source:<a href="#Source:getVolume">get</a><span class = "slash">/</span><a href="#Source:setVolume">setVolume</a></p><p class = "section_navigation_link">Source:<a href="#Source:isPlaying">isPlaying</a></p><p class = "section_navigation_subsection_heading">Spatial</p><p class = "section_navigation_link">Source:<a href="#Source:getPosition">get</a><span class = "slash">/</span><a href="#Source:setPosition">setPosition</a></p><p class = "section_navigation_link">Source:<a href="#Source:getDirection">get</a><span class = "slash">/</span><a href="#Source:setDirection">setDirection</a></p><p class = "section_navigation_link">Source:<a href="#Source:getRolloff">get</a><span class = "slash">/</span><a href="#Source:setRolloff">setRolloff</a></p><p class = "section_navigation_link">Source:<a href="#Source:getVelocity">get</a><span class = "slash">/</span><a href="#Source:setVelocity">setVelocity</a></p><p class = "section_navigation_link">Source:<a href="#Source:getCone">get</a><span class = "slash">/</span><a href="#Source:setCone">setCone</a></p><p class = "section_navigation_link">Source:<a href="#Source:getAttenuationDistances">get</a><span class = "slash">/</span><a href="#Source:setAttenuationDistances">setAttenuationDistances</a></p><p class = "section_navigation_link">Source:<a href="#Source:getVolumeLimits">get</a><span class = "slash">/</span><a href="#Source:setVolumeLimits">setVolumeLimits</a></p><p class = "section_navigation_subsection_heading">Info</p><p class = "section_navigation_link">Source:<a href="#Source:getType">getType</a></p><p class = "section_navigation_link">Source:<a href="#Source:getDuration">getDuration</a></p><p class = "section_navigation_link">Source:<a href="#Source:clone">clone</a></p><p class = "section_navigation_link">Source:<a href="#Source:getChannelCount">getChannelCount</a></p><p class = "section_navigation_link">Source:<a href="#Source:getActiveEffects">getActiveEffects</a></p><p class = "section_navigation_link">Source:<a href="#Source:getFreeBufferCount">getFreeBufferCount</a></p><p class = "section_navigation_link">Source:<a href="#Source:queue">queue</a></p><p class = "section_navigation_link">Source:<a href="#Source:getEffect">get</a><span class = "slash">/</span><a href="#Source:setEffect">setEffect</a></p><p class = "section_navigation_link">Source:<a href="#Source:getFilter">get</a><span class = "slash">/</span><a href="#Source:setFilter">setFilter</a></p><p class = "section_navigation_link">Source:<a href="#Source:isRelative">is</a><span class = "slash">/</span><a href="#Source:setRelative">setRelative</a></p><p class = "section_navigation_subheading">Supertypes</p><p class = "section_navigation_link"><a href="#Object">Object</a></p></div><div class = "section"><p class = "function_heading"><a href = "#Source:clone" name = "Source:clone"><span>Source:</span><wbr>clone</a></p><p class = "function_description">Creates an identical copy of the <a href="#Source">Source</a> in the stopped state.<br /><br />Static <a href="#Source">Sources</a> will use significantly less memory and take much less time to be created if <a href="#Source">Source</a>:clone is used to create them instead of <a href="#love.audio.newSource">love.audio.newSource</a>, so this method should be preferred when making multiple <a href="#Source">Sources</a> which play the same sound.<br /><br />Cloned <a href="#Source">Sources</a> inherit all the set-able state of the original <a href="#Source">Source</a>, but they are initialized stopped.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">source</span> = Source:<wbr>clone()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">source</td><td class = "ra_type"><a href="#Source">Source</a></td><td>The new identical copy of this <a href="#Source">Source</a>.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:getAttenuationDistances" name = "Source:getAttenuationDistances"><span>Source:</span><wbr>getAttenuationDistances</a></p><p class = "function_description">Returns the reference and maximum distance of the source.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">ref</span>, <span class = "returns">max</span> = Source:<wbr>getAttenuationDistances()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">ref</td><td class = "ra_type">number</td><td>The reference distance.</td></tr><tr><td class = "returns ra_name">max</td><td class = "ra_type">number</td><td>The maximum distance.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:getChannelCount" name = "Source:getChannelCount"><span>Source:</span><wbr>getChannelCount</a></p><p class = "function_description">Gets the number of channels in the <a href="#Source">Source</a>. Only 1-channel (mono) <a href="#Source">Sources</a> can use directional and positional effects.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">channels</span> = Source:<wbr>getChannelCount()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">channels</td><td class = "ra_type">number</td><td>1 for mono, 2 for stereo.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:getCone" name = "Source:getCone"><span>Source:</span><wbr>getCone</a></p><p class = "function_description">Gets the <a href="#Source">Source</a>'s directional volume cones. Together with <a href="#Source:setDirection">Source:setDirection</a>, the cone angles allow for the <a href="#Source">Source</a>'s volume to vary depending on its direction.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">innerAngle</span>, <span class = "returns">outerAngle</span>, <span class = "returns">outerVolume</span>, <span class = "returns">outerHighGain</span> = Source:<wbr>getCone()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">innerAngle</td><td class = "ra_type">number</td><td>The inner angle from the <a href="#Source">Source</a>'s direction, in radians. The <a href="#Source">Source</a> will play at normal volume if the listener is inside the cone defined by this angle.</td></tr><tr><td class = "returns ra_name">outerAngle</td><td class = "ra_type">number</td><td>The outer angle from the <a href="#Source">Source</a>'s direction, in radians. The <a href="#Source">Source</a> will play at a volume between the normal and outer volumes, if the listener is in between the cones defined by the inner and outer angles.</td></tr><tr><td class = "returns ra_name">outerVolume</td><td class = "ra_type">number</td><td>The <a href="#Source">Source</a>'s volume when the listener is outside both the inner and outer cone angles.</td></tr><tr><td class = "returns ra_name">outerHighGain</td><td class = "ra_type">number</td><td>The gain for the high tones when the listener is outside both the inner and outer cone angles. Not supported in iOS.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:getDirection" name = "Source:getDirection"><span>Source:</span><wbr>getDirection</a></p><p class = "function_description">Gets the direction of the <a href="#Source">Source</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">x</span>, <span class = "returns">y</span>, <span class = "returns">z</span> = Source:<wbr>getDirection()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">x</td><td class = "ra_type">number</td><td>The X part of the direction vector.</td></tr><tr><td class = "returns ra_name">y</td><td class = "ra_type">number</td><td>The Y part of the direction vector.</td></tr><tr><td class = "returns ra_name">z</td><td class = "ra_type">number</td><td>The Z part of the direction vector.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:getDuration" name = "Source:getDuration"><span>Source:</span><wbr>getDuration</a></p><p class = "function_description">Gets the duration of the <a href="#Source">Source</a>. For streaming <a href="#Source">Sources</a> it may not always be sample-accurate, and may return -1 if the duration cannot be determined at all.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">duration</span> = Source:<wbr>getDuration( <span class = "arguments">unit</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">duration</td><td class = "ra_type">number</td><td>The duration of the <a href="#Source">Source</a>, or -1 if it cannot be determined.</td></tr><tr><td class = "arguments ra_name">unit <span class = "default">("seconds")</span></td><td class = "ra_type"><a href="#TimeUnit">TimeUnit</a></td><td>The time unit for the return value.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:getEffect" name = "Source:getEffect"><span>Source:</span><wbr>getEffect</a></p><p class = "function_description">Gets the filter settings associated to a specific Effect.<br /><br />This function returns nil if the Effect was applied with no filter settings associated to it.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">filtersettings</span> = Source:<wbr>getEffect( <span class = "arguments">name</span>, <span class = "arguments">filtersettings</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">filtersettings</td><td class = "ra_type">table</td><td> The settings for the filter associated to this effect, or nil if the effect is not present in this <a href="#Source">Source</a> or has no filter associated. The table has the following fields:</td></tr><tr><td class = "returns ra_name">filtersettings.type</td><td class = "ra_type"><a href="#FilterType">FilterType</a></td><td>The type of filter in use.</td></tr><tr><td class = "returns ra_name">filtersettings.volume</td><td class = "ra_type">number</td><td>The overall volume of the audio. Must be between 0 and 1.</td></tr><tr><td class = "returns ra_name">filtersettings.highgain</td><td class = "ra_type">number</td><td>Volume of high-frequency audio. Only applies to low-pass and band-pass filters.</td></tr><tr><td class = "returns ra_name">filtersettings.lowgain</td><td class = "ra_type">number</td><td>Volume of low-frequency audio. Only applies to high-pass and band-pass filters.</td></tr><tr><td class = "arguments ra_name">name</td><td class = "ra_type">string</td><td>The name of the effect.</td></tr><tr><td class = "arguments ra_name">filtersettings <span class = "default">({})</span></td><td class = "ra_type">table</td><td>An optional empty table that will be filled with the filter settings.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:getActiveEffects" name = "Source:getActiveEffects"><span>Source:</span><wbr>getActiveEffects</a></p><p class = "function_description">Returns a list of all the active effects currently applied to the <a href="#Source">Source</a></p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">effects</span> = Source:<wbr>getActiveEffects()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">effects</td><td class = "ra_type">table</td><td>The list with all the names for the currently applied effects</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:getFilter" name = "Source:getFilter"><span>Source:</span><wbr>getFilter</a></p><p class = "function_description">Gets the filter settings currently applied to the <a href="#Source">Source</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">settings</span> = Source:<wbr>getFilter( <span class = "arguments">settings</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">settings</td><td class = "ra_type">table</td><td>The settings for the active filter on this <a href="#Source">Source</a>, or nil if the <a href="#Source">Source</a> has no active filter. The table has the following fields:</td></tr><tr><td class = "returns ra_name">settings.type</td><td class = "ra_type"><a href="#FilterType">FilterType</a></td><td>The type of filter in use.</td></tr><tr><td class = "returns ra_name">settings.volume</td><td class = "ra_type">number</td><td>The overall volume of the audio. Must be between 0 and 1.</td></tr><tr><td class = "returns ra_name">settings.highgain</td><td class = "ra_type">number</td><td>Volume of high-frequency audio. Only applies to low-pass and band-pass filters.</td></tr><tr><td class = "returns ra_name">settings.lowgain</td><td class = "ra_type">number</td><td>Volume of low-frequency audio. Only applies to high-pass and band-pass filters.</td></tr><tr><td class = "arguments ra_name">settings <span class = "default">({})</span></td><td class = "ra_type">table</td><td>An optional empty table that will be filled with the filter settings.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:getFreeBufferCount" name = "Source:getFreeBufferCount"><span>Source:</span><wbr>getFreeBufferCount</a></p><p class = "function_description">Gets the number of free buffer slots of a queueable <a href="#Source">Source</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">buffers</span> = Source:<wbr>getFreeBufferCount()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">buffers</td><td class = "ra_type">number</td><td>How many more <a href="#SoundData">SoundData</a> objects can be queued up.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:getPitch" name = "Source:getPitch"><span>Source:</span><wbr>getPitch</a></p><p class = "function_description">Gets the current pitch of the <a href="#Source">Source</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">pitch</span> = Source:<wbr>getPitch()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">pitch</td><td class = "ra_type">number</td><td>The pitch, where 1.0 is normal.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:getPosition" name = "Source:getPosition"><span>Source:</span><wbr>getPosition</a></p><p class = "function_description">Gets the position of the <a href="#Source">Source</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">x</span>, <span class = "returns">y</span>, <span class = "returns">z</span> = Source:<wbr>getPosition()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">x</td><td class = "ra_type">number</td><td>The X position of the <a href="#Source">Source</a>.</td></tr><tr><td class = "returns ra_name">y</td><td class = "ra_type">number</td><td>The Y position of the <a href="#Source">Source</a>.</td></tr><tr><td class = "returns ra_name">z</td><td class = "ra_type">number</td><td>The Z position of the <a href="#Source">Source</a>.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:getRolloff" name = "Source:getRolloff"><span>Source:</span><wbr>getRolloff</a></p><p class = "function_description">Returns the rolloff factor of the source.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">rolloff</span> = Source:<wbr>getRolloff()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">rolloff</td><td class = "ra_type">number</td><td>The rolloff factor.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:getType" name = "Source:getType"><span>Source:</span><wbr>getType</a></p><p class = "function_description">Gets the type (static or stream) of the <a href="#Source">Source</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">sourcetype</span> = Source:<wbr>getType()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">sourcetype</td><td class = "ra_type"><a href="#SourceType">SourceType</a></td><td>The type of the source.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:getVelocity" name = "Source:getVelocity"><span>Source:</span><wbr>getVelocity</a></p><p class = "function_description">Gets the velocity of the <a href="#Source">Source</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">x</span>, <span class = "returns">y</span>, <span class = "returns">z</span> = Source:<wbr>getVelocity()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">x</td><td class = "ra_type">number</td><td>The X part of the velocity vector.</td></tr><tr><td class = "returns ra_name">y</td><td class = "ra_type">number</td><td>The Y part of the velocity vector.</td></tr><tr><td class = "returns ra_name">z</td><td class = "ra_type">number</td><td>The Z part of the velocity vector.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:getVolume" name = "Source:getVolume"><span>Source:</span><wbr>getVolume</a></p><p class = "function_description">Gets the current volume of the <a href="#Source">Source</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">volume</span> = Source:<wbr>getVolume()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">volume</td><td class = "ra_type">number</td><td>The volume of the <a href="#Source">Source</a>, where 1.0 is normal volume.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:getVolumeLimits" name = "Source:getVolumeLimits"><span>Source:</span><wbr>getVolumeLimits</a></p><p class = "function_description">Returns the volume limits of the source.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">min</span>, <span class = "returns">max</span> = Source:<wbr>getVolumeLimits()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">min</td><td class = "ra_type">number</td><td>The minimum volume.</td></tr><tr><td class = "returns ra_name">max</td><td class = "ra_type">number</td><td>The maximum volume.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:isLooping" name = "Source:isLooping"><span>Source:</span><wbr>isLooping</a></p><p class = "function_description">Returns whether the <a href="#Source">Source</a> will loop.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">loop</span> = Source:<wbr>isLooping()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">loop</td><td class = "ra_type">boolean</td><td>True if the <a href="#Source">Source</a> will loop, false otherwise.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:isPlaying" name = "Source:isPlaying"><span>Source:</span><wbr>isPlaying</a></p><p class = "function_description">Returns whether the <a href="#Source">Source</a> is playing.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">playing</span> = Source:<wbr>isPlaying()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">playing</td><td class = "ra_type">boolean</td><td>True if the <a href="#Source">Source</a> is playing, false otherwise.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:isRelative" name = "Source:isRelative"><span>Source:</span><wbr>isRelative</a></p><p class = "function_description">Gets whether the <a href="#Source">Source</a>'s position and direction are relative to the listener.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">relative</span> = Source:<wbr>isRelative()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">relative</td><td class = "ra_type">boolean</td><td>True if the position, velocity, direction and cone angles are relative to the listener, false if they're absolute.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:pause" name = "Source:pause"><span>Source:</span><wbr>pause</a></p><p class = "function_description">Pauses the <a href="#Source">Source</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">Source:<wbr>pause()</span></span></p><table class = "ra_table"></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:play" name = "Source:play"><span>Source:</span><wbr>play</a></p><p class = "function_description">Starts playing the <a href="#Source">Source</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">success</span> = Source:<wbr>play()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">success</td><td class = "ra_type">boolean</td><td>True if the <a href="#Source">Source</a> started playing successfully, false otherwise.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:queue" name = "Source:queue"><span>Source:</span><wbr>queue</a></p><p class = "function_description">Queues <a href="#SoundData">SoundData</a> for playback in a queueable <a href="#Source">Source</a>.<br /><br />This method requires the <a href="#Source">Source</a> to be created via <a href="#love.audio.newQueueableSource">love.audio.newQueueableSource</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">success</span> = Source:<wbr>queue( <span class = "arguments">sounddata</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">success</td><td class = "ra_type">boolean</td><td>True if the data was successfully queued for playback, false if there were no available buffers to use for queueing.</td></tr><tr><td class = "arguments ra_name">sounddata</td><td class = "ra_type"><a href="#SoundData">SoundData</a></td><td>The data to queue. The <a href="#SoundData">SoundData</a>'s sample rate, bit depth, and channel count must match the <a href="#Source">Source</a>'s.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:seek" name = "Source:seek"><span>Source:</span><wbr>seek</a></p><p class = "function_description">Sets the playing position of the <a href="#Source">Source</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">Source:<wbr>seek( <span class = "arguments">position</span>, <span class = "arguments">unit</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">position</td><td class = "ra_type">number</td><td>The position to seek to.</td></tr><tr><td class = "arguments ra_name">unit <span class = "default">("seconds")</span></td><td class = "ra_type"><a href="#TimeUnit">TimeUnit</a></td><td>The unit of the position value.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:setAttenuationDistances" name = "Source:setAttenuationDistances"><span>Source:</span><wbr>setAttenuationDistances</a></p><p class = "function_description">Sets the reference and maximum distance of the source.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">Source:<wbr>setAttenuationDistances( <span class = "arguments">ref</span>, <span class = "arguments">max</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">ref</td><td class = "ra_type">number</td><td>The new reference distance.</td></tr><tr><td class = "arguments ra_name">max</td><td class = "ra_type">number</td><td>The new maximum distance.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:setCone" name = "Source:setCone"><span>Source:</span><wbr>setCone</a></p><p class = "function_description">Sets the <a href="#Source">Source</a>'s directional volume cones. Together with <a href="#Source:setDirection">Source:setDirection</a>, the cone angles allow for the <a href="#Source">Source</a>'s volume to vary depending on its direction.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">Source:<wbr>setCone( <span class = "arguments">innerAngle</span>, <span class = "arguments">outerAngle</span>, <span class = "arguments">outerVolume</span>, <span class = "arguments">outerHighGain</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">innerAngle</td><td class = "ra_type">number</td><td>The inner angle from the <a href="#Source">Source</a>'s direction, in radians. The <a href="#Source">Source</a> will play at normal volume if the listener is inside the cone defined by this angle.</td></tr><tr><td class = "arguments ra_name">outerAngle</td><td class = "ra_type">number</td><td>The outer angle from the <a href="#Source">Source</a>'s direction, in radians. The <a href="#Source">Source</a> will play at a volume between the normal and outer volumes, if the listener is in between the cones defined by the inner and outer angles.</td></tr><tr><td class = "arguments ra_name">outerVolume <span class = "default">(0)</span></td><td class = "ra_type">number</td><td>The <a href="#Source">Source</a>'s volume when the listener is outside both the inner and outer cone angles.</td></tr><tr><td class = "arguments ra_name">outerHighGain <span class = "default">(1)</span></td><td class = "ra_type">number</td><td>The gain for the high tones when the listener is outside both the inner and outer cone angles.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:setDirection" name = "Source:setDirection"><span>Source:</span><wbr>setDirection</a></p><p class = "function_description">Sets the direction vector of the <a href="#Source">Source</a>. A zero vector makes the source non-directional.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">Source:<wbr>setDirection( <span class = "arguments">x</span>, <span class = "arguments">y</span>, <span class = "arguments">z</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">x</td><td class = "ra_type">number</td><td>The X part of the direction vector.</td></tr><tr><td class = "arguments ra_name">y</td><td class = "ra_type">number</td><td>The Y part of the direction vector.</td></tr><tr><td class = "arguments ra_name">z <span class = "default">(0)</span></td><td class = "ra_type">number</td><td>The Z part of the direction vector.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:setEffect" name = "Source:setEffect"><span>Source:</span><wbr>setEffect</a></p><p class = "function_description">Applies an audio effect to the <a href="#Source">Source</a>.<br /><br />The effect must have been previously defined using <a href="#love.audio.setEffect">love.audio.setEffect</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">success</span> = Source:<wbr>setEffect( <span class = "arguments">name</span>, <span class = "arguments">enable</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">success</td><td class = "ra_type">boolean</td><td>Whether the effect and filter were successfully applied to this <a href="#Source">Source</a>.</td></tr><tr><td class = "arguments ra_name">name</td><td class = "ra_type">string</td><td>The name of the effect previously set up with <a href="#love.audio.setEffect">love.audio.setEffect</a>.</td></tr><tr><td class = "arguments ra_name">enable <span class = "default">(true)</span></td><td class = "ra_type">boolean</td><td>If false and the given effect name was previously enabled on this <a href="#Source">Source</a>, disables the effect.</td></tr></table><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">success</span> = Source:<wbr>setEffect( <span class = "arguments">name</span>, <span class = "arguments">filtersettings</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">success</td><td class = "ra_type">boolean</td><td>Whether the effect and filter were successfully applied to this <a href="#Source">Source</a>.</td></tr><tr><td class = "arguments ra_name">name</td><td class = "ra_type">string</td><td>The name of the effect previously set up with <a href="#love.audio.setEffect">love.audio.setEffect</a>.</td></tr><tr><td class = "arguments ra_name">filtersettings</td><td class = "ra_type">table</td><td>The filter settings to apply prior to, with the following fields:</td></tr><tr><td class = "arguments ra_name">filtersettings.type</td><td class = "ra_type"><a href="#FilterType">FilterType</a></td><td>The type of filter to use.</td></tr><tr><td class = "arguments ra_name">filtersettings.volume</td><td class = "ra_type">number</td><td>The overall volume of the audio. Must be between 0 and 1.</td></tr><tr><td class = "arguments ra_name">filtersettings.highgain</td><td class = "ra_type">number</td><td>Volume of high-frequency audio. Only applies to low-pass and band-pass filters. Must be between 0 and 1.</td></tr><tr><td class = "arguments ra_name">filtersettings.lowgain</td><td class = "ra_type">number</td><td>Volume of low-frequency audio. Only applies to high-pass and band-pass filters. Must be between 0 and 1.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:setFilter" name = "Source:setFilter"><span>Source:</span><wbr>setFilter</a></p><p class = "function_description">Sets a low-pass, high-pass, or band-pass filter to apply when playing the <a href="#Source">Source</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">success</span> = Source:<wbr>setFilter( <span class = "arguments">settings</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">success</td><td class = "ra_type">boolean</td><td>Whether the filter was successfully applied to the <a href="#Source">Source</a>.</td></tr><tr><td class = "arguments ra_name">settings</td><td class = "ra_type">table</td><td>The filter settings to use for this <a href="#Source">Source</a>, with the following fields:</td></tr><tr><td class = "arguments ra_name">settings.type</td><td class = "ra_type"><a href="#FilterType">FilterType</a></td><td>The type of filter to use.</td></tr><tr><td class = "arguments ra_name">settings.volume</td><td class = "ra_type">number</td><td>The overall volume of the audio. Must be between 0 and 1.</td></tr><tr><td class = "arguments ra_name">settings.highgain</td><td class = "ra_type">number</td><td>Volume of high-frequency audio. Only applies to low-pass and band-pass filters. Must be between 0 and 1.</td></tr><tr><td class = "arguments ra_name">settings.lowgain</td><td class = "ra_type">number</td><td>Volume of low-frequency audio. Only applies to high-pass and band-pass filters. Must be between 0 and 1.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:setLooping" name = "Source:setLooping"><span>Source:</span><wbr>setLooping</a></p><p class = "function_description">Sets whether the <a href="#Source">Source</a> should loop.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">Source:<wbr>setLooping( <span class = "arguments">loop</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">loop</td><td class = "ra_type">boolean</td><td>True if the source should loop, false otherwise.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:setPitch" name = "Source:setPitch"><span>Source:</span><wbr>setPitch</a></p><p class = "function_description">Sets the pitch of the <a href="#Source">Source</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">Source:<wbr>setPitch( <span class = "arguments">pitch</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">pitch</td><td class = "ra_type">number</td><td>Calculated with regard to 1 being the base pitch. Each reduction by 50 percent equals a pitch shift of -12 semitones (one octave reduction). Each doubling equals a pitch shift of 12 semitones (one octave increase). Zero is not a legal value.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:setPosition" name = "Source:setPosition"><span>Source:</span><wbr>setPosition</a></p><p class = "function_description">Sets the position of the <a href="#Source">Source</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">Source:<wbr>setPosition( <span class = "arguments">x</span>, <span class = "arguments">y</span>, <span class = "arguments">z</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">x</td><td class = "ra_type">number</td><td>The X position of the <a href="#Source">Source</a>.</td></tr><tr><td class = "arguments ra_name">y</td><td class = "ra_type">number</td><td>The Y position of the <a href="#Source">Source</a>.</td></tr><tr><td class = "arguments ra_name">z <span class = "default">(0)</span></td><td class = "ra_type">number</td><td>The Z position of the <a href="#Source">Source</a>.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:setRelative" name = "Source:setRelative"><span>Source:</span><wbr>setRelative</a></p><p class = "function_description">Sets whether the <a href="#Source">Source</a>'s position and direction are relative to the listener. Relative <a href="#Source">Sources</a> move with the listener so they aren't affected by it's position</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">Source:<wbr>setRelative( <span class = "arguments">enable</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">enable</td><td class = "ra_type">boolean</td><td>True to make the position, velocity, direction and cone angles relative to the listener, false to make them absolute.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:setRolloff" name = "Source:setRolloff"><span>Source:</span><wbr>setRolloff</a></p><p class = "function_description">Sets the rolloff factor which affects the strength of the used distance attenuation.<br /><br />Extended information and detailed formulas can be found in the chapter "3.4. Attenuation By Distance" of OpenAL 1.1 specification.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">Source:<wbr>setRolloff( <span class = "arguments">rolloff</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">rolloff</td><td class = "ra_type">number</td><td>The new rolloff factor.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:setVelocity" name = "Source:setVelocity"><span>Source:</span><wbr>setVelocity</a></p><p class = "function_description">Sets the velocity of the <a href="#Source">Source</a>.<br /><br />This does not change the position of the <a href="#Source">Source</a>, but is used to calculate the doppler effect.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">Source:<wbr>setVelocity( <span class = "arguments">x</span>, <span class = "arguments">y</span>, <span class = "arguments">z</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">x</td><td class = "ra_type">number</td><td>The X part of the velocity vector.</td></tr><tr><td class = "arguments ra_name">y</td><td class = "ra_type">number</td><td>The Y part of the velocity vector.</td></tr><tr><td class = "arguments ra_name">z <span class = "default">(0)</span></td><td class = "ra_type">number</td><td>The Z part of the velocity vector.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:setVolume" name = "Source:setVolume"><span>Source:</span><wbr>setVolume</a></p><p class = "function_description">Sets the volume of the <a href="#Source">Source</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">Source:<wbr>setVolume( <span class = "arguments">volume</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">volume</td><td class = "ra_type">number</td><td>The volume of the <a href="#Source">Source</a>, where 1.0 is normal volume.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:setVolumeLimits" name = "Source:setVolumeLimits"><span>Source:</span><wbr>setVolumeLimits</a></p><p class = "function_description">Sets the volume limits of the source. The limits have to be numbers from 0 to 1.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">Source:<wbr>setVolumeLimits( <span class = "arguments">min</span>, <span class = "arguments">max</span> )</span></span></p><table class = "ra_table"><tr><td class = "arguments ra_name">min</td><td class = "ra_type">number</td><td>The minimum volume.</td></tr><tr><td class = "arguments ra_name">max</td><td class = "ra_type">number</td><td>The maximum volume.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:stop" name = "Source:stop"><span>Source:</span><wbr>stop</a></p><p class = "function_description">Stops a <a href="#Source">Source</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative">Source:<wbr>stop()</span></span></p><table class = "ra_table"></table></div><div class = "section"><p class = "function_heading"><a href = "#Source:tell" name = "Source:tell"><span>Source:</span><wbr>tell</a></p><p class = "function_description">Gets the currently playing position of the <a href="#Source">Source</a>.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">position</span> = Source:<wbr>tell( <span class = "arguments">unit</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">position</td><td class = "ra_type">number</td><td>The currently playing position of the <a href="#Source">Source</a>.</td></tr><tr><td class = "arguments ra_name">unit <span class = "default">("seconds")</span></td><td class = "ra_type"><a href="#TimeUnit">TimeUnit</a></td><td>The type of unit for the return value.</td></tr></table></div><div class = "section"><p class = "section_heading"><a href = "#RecordingDevice" name = "RecordingDevice">RecordingDevice</a></p><p class = "section_description">Represents an audio input device capable of recording sounds.</p><p class = "section_navigation_subheading">Functions</p><p class = "section_navigation_link">RecordingDevice:<a href="#RecordingDevice:getBitDepth">getBitDepth</a></p><p class = "section_navigation_link">RecordingDevice:<a href="#RecordingDevice:getChannelCount">getChannelCount</a></p><p class = "section_navigation_link">RecordingDevice:<a href="#RecordingDevice:getData">getData</a></p><p class = "section_navigation_link">RecordingDevice:<a href="#RecordingDevice:getName">getName</a></p><p class = "section_navigation_link">RecordingDevice:<a href="#RecordingDevice:getSampleCount">getSampleCount</a></p><p class = "section_navigation_link">RecordingDevice:<a href="#RecordingDevice:getSampleRate">getSampleRate</a></p><p class = "section_navigation_link">RecordingDevice:<a href="#RecordingDevice:isRecording">isRecording</a></p><p class = "section_navigation_link">RecordingDevice:<a href="#RecordingDevice:start">start</a></p><p class = "section_navigation_link">RecordingDevice:<a href="#RecordingDevice:stop">stop</a></p><p class = "section_navigation_subheading">Supertypes</p><p class = "section_navigation_link"><a href="#Object">Object</a></p></div><div class = "section"><p class = "function_heading"><a href = "#RecordingDevice:getBitDepth" name = "RecordingDevice:getBitDepth"><span>RecordingDevice:</span><wbr>getBitDepth</a></p><p class = "function_description">Gets the number of bits per sample in the data currently being recorded.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">bitdepth</span> = RecordingDevice:<wbr>getBitDepth()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">bitdepth</td><td class = "ra_type">number</td><td>The number of bits per sample in the data that's currently being recorded. (8 or 16).</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#RecordingDevice:getChannelCount" name = "RecordingDevice:getChannelCount"><span>RecordingDevice:</span><wbr>getChannelCount</a></p><p class = "function_description">Gets the number of channels currently being recorded (mono or stereo).</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">channels</span> = RecordingDevice:<wbr>getChannelCount()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">channels</td><td class = "ra_type">number</td><td>The number of channels being recorded (1 for mono, 2 for stereo).</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#RecordingDevice:getData" name = "RecordingDevice:getData"><span>RecordingDevice:</span><wbr>getData</a></p><p class = "function_description">Gets all recorded audio <a href="#SoundData">SoundData</a> stored in the device's internal ring buffer.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">data</span> = RecordingDevice:<wbr>getData()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">data</td><td class = "ra_type"><a href="#SoundData">SoundData</a></td><td>The recorded audio data, or nil if the device isn't recording.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#RecordingDevice:getName" name = "RecordingDevice:getName"><span>RecordingDevice:</span><wbr>getName</a></p><p class = "function_description">Gets the name of the recording device.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">name</span> = RecordingDevice:<wbr>getName()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">name</td><td class = "ra_type">string</td><td>The name for this device.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#RecordingDevice:getSampleCount" name = "RecordingDevice:getSampleCount"><span>RecordingDevice:</span><wbr>getSampleCount</a></p><p class = "function_description">Gets the number of currently recorded samples.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">samples</span> = RecordingDevice:<wbr>getSampleCount()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">samples</td><td class = "ra_type">number</td><td>The number of samples that have been recorded so far.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#RecordingDevice:getSampleRate" name = "RecordingDevice:getSampleRate"><span>RecordingDevice:</span><wbr>getSampleRate</a></p><p class = "function_description">Gets the number of samples per second currently being recorded.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">rate</span> = RecordingDevice:<wbr>getSampleRate()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">rate</td><td class = "ra_type">number</td><td>The number of samples being recorded per second (sample rate).</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#RecordingDevice:isRecording" name = "RecordingDevice:isRecording"><span>RecordingDevice:</span><wbr>isRecording</a></p><p class = "function_description">Gets whether the device is currently recording.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">recording</span> = RecordingDevice:<wbr>isRecording()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">recording</td><td class = "ra_type">boolean</td><td>True if the device is recording, false otherwise.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#RecordingDevice:start" name = "RecordingDevice:start"><span>RecordingDevice:</span><wbr>start</a></p><p class = "function_description">Begins recording audio using this device.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">success</span> = RecordingDevice:<wbr>start( <span class = "arguments">samplecount</span>, <span class = "arguments">samplerate</span>, <span class = "arguments">bitdepth</span>, <span class = "arguments">channels</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">success</td><td class = "ra_type">boolean</td><td>True if the device successfully began recording using the specified parameters, false if not.</td></tr><tr><td class = "arguments ra_name">samplecount</td><td class = "ra_type">number</td><td>The maximum number of samples to store in an internal ring buffer when recording. <a href="#RecordingDevice:getData">RecordingDevice:getData</a> clears the internal buffer when called.</td></tr><tr><td class = "arguments ra_name">samplerate <span class = "default">(8000)</span></td><td class = "ra_type">number</td><td>The number of samples per second to store when recording.</td></tr><tr><td class = "arguments ra_name">bitdepth <span class = "default">(16)</span></td><td class = "ra_type">number</td><td>The number of bits per sample.</td></tr><tr><td class = "arguments ra_name">channels <span class = "default">(1)</span></td><td class = "ra_type">number</td><td>Whether to record in mono or stereo. Most microphones don't support more than 1 channel.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#RecordingDevice:stop" name = "RecordingDevice:stop"><span>RecordingDevice:</span><wbr>stop</a></p><p class = "function_description">Stops recording audio from this device.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">data</span> = RecordingDevice:<wbr>stop()</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">data</td><td class = "ra_type"><a href="#SoundData">SoundData</a></td><td>The sound data currently in the device's buffer, or nil if the device wasn't recording.</td></tr></table></div><div class = "section"><p class = "section_heading"><a href = "#love.data" name = "love.data">love.data</a></p><p class = "section_navigation_subheading">Functions</p><p class = "section_navigation_link">love.data.<a href="#love.data.compress">compress</a></p><p class = "section_navigation_link">love.data.<a href="#love.data.decode">decode</a></p><p class = "section_navigation_link">love.data.<a href="#love.data.decompress">decompress</a></p><p class = "section_navigation_link">love.data.<a href="#love.data.encode">encode</a></p><p class = "section_navigation_link">love.data.<a href="#love.data.hash">hash</a></p><p class = "section_navigation_subheading">Enums</p><p class = "section_navigation_link"><a href="#ContainerType">ContainerType</a></p><p class = "section_navigation_link"><a href="#HashFunction">HashFunction</a></p><p class = "section_navigation_link"><a href="#HashFunction">HashFunction</a></p></div><div class = "section"><p class = "function_heading"><a href = "#love.data.compress" name = "love.data.compress"><span>love.data.</span><wbr>compress</a></p><p class = "function_description">Compresses a string or data using a specific compression algorithm.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">compressedData</span> = love.data.<wbr>compress( <span class = "arguments">container</span>, <span class = "arguments">format</span>, <span class = "arguments">rawstring</span>, <span class = "arguments">level</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">compressedData</td><td class = "ra_type">CompressedData or string</td><td>CompressedData/string which contains the compressed version of data.</td></tr><tr><td class = "arguments ra_name">container</td><td class = "ra_type"><a href="#ContainerType">ContainerType</a></td><td>What type to return the compressed data as.</td></tr><tr><td class = "arguments ra_name">format</td><td class = "ra_type"><a href="#CompressedDataFormat">CompressedDataFormat</a></td><td>The format to use when compressing the string.</td></tr><tr><td class = "arguments ra_name">rawstring</td><td class = "ra_type">string</td><td>The raw (un-compressed) string to compress.</td></tr><tr><td class = "arguments ra_name">level <span class = "default">(-1)</span></td><td class = "ra_type">number</td><td>The level of compression to use, between 0 and 9. -1 indicates the default level. The meaning of this argument depends on the compression format being used.</td></tr></table><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">compressedData</span> = love.data.<wbr>compress( <span class = "arguments">container</span>, <span class = "arguments">format</span>, <span class = "arguments">data</span>, <span class = "arguments">level</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">compressedData</td><td class = "ra_type">CompressedData or string</td><td>CompressedData/string which contains the compressed version of data.</td></tr><tr><td class = "arguments ra_name">container</td><td class = "ra_type"><a href="#ContainerType">ContainerType</a></td><td>What type to return the compressed data as.</td></tr><tr><td class = "arguments ra_name">format</td><td class = "ra_type"><a href="#CompressedDataFormat">CompressedDataFormat</a></td><td>The format to use when compressing the data.</td></tr><tr><td class = "arguments ra_name">data</td><td class = "ra_type"><a href="#Data">Data</a></td><td>A Data object containing the raw (un-compressed) data to compress.</td></tr><tr><td class = "arguments ra_name">level <span class = "default">(-1)</span></td><td class = "ra_type">number</td><td>The level of compression to use, between 0 and 9. -1 indicates the default level. The meaning of this argument depends on the compression format being used.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.data.decode" name = "love.data.decode"><span>love.data.</span><wbr>decode</a></p><p class = "function_description">Decode <a href="#Data">Data</a> or a string from any of the EncodeFormats to <a href="#Data">Data</a> or string.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">decoded</span> = love.data.<wbr>decode( <span class = "arguments">containerType</span>, <span class = "arguments">format</span>, <span class = "arguments">sourceString</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">decoded</td><td class = "ra_type">Variant</td><td>ByteData/string which contains the decoded version of source.</td></tr><tr><td class = "arguments ra_name">containerType</td><td class = "ra_type"><a href="#ContainerType">ContainerType</a></td><td>What type to return the decoded data as.</td></tr><tr><td class = "arguments ra_name">format</td><td class = "ra_type">EncodeFormat</td><td>The format of the input data.</td></tr><tr><td class = "arguments ra_name">sourceString</td><td class = "ra_type">string</td><td>The raw (encoded) data to decode.</td></tr></table><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">decoded</span> = love.data.<wbr>decode( <span class = "arguments">containerType</span>, <span class = "arguments">format</span>, <span class = "arguments">sourceData</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">decoded</td><td class = "ra_type">Variant</td><td>ByteData/string which contains the decoded version of source.</td></tr><tr><td class = "arguments ra_name">containerType</td><td class = "ra_type"><a href="#ContainerType">ContainerType</a></td><td>What type to return the decoded data as.</td></tr><tr><td class = "arguments ra_name">format</td><td class = "ra_type">EncodeFormat</td><td>The format of the input data.</td></tr><tr><td class = "arguments ra_name">sourceData</td><td class = "ra_type"><a href="#Data">Data</a></td><td>The raw (encoded) data to decode.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.data.decompress" name = "love.data.decompress"><span>love.data.</span><wbr>decompress</a></p><p class = "function_description">Decompresses a <a href="#CompressedData">CompressedData</a> or previously compressed string or <a href="#Data">Data</a> object.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">rawstring</span> = love.data.<wbr>decompress( <span class = "arguments">container</span>, <span class = "arguments">compressedData</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">rawstring</td><td class = "ra_type">string</td><td>A string containing the raw decompressed data.</td></tr><tr><td class = "arguments ra_name">container</td><td class = "ra_type"><a href="#ContainerType">ContainerType</a></td><td>What type to return the decompressed data as.</td></tr><tr><td class = "arguments ra_name">compressedData</td><td class = "ra_type"><a href="#CompressedData">CompressedData</a></td><td>The compressed data to decompress.</td></tr></table><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">rawstring</span> = love.data.<wbr>decompress( <span class = "arguments">container</span>, <span class = "arguments">format</span>, <span class = "arguments">compressedstring</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">rawstring</td><td class = "ra_type">string</td><td>A string containing the raw decompressed data.</td></tr><tr><td class = "arguments ra_name">container</td><td class = "ra_type"><a href="#ContainerType">ContainerType</a></td><td>What type to return the decompressed data as.</td></tr><tr><td class = "arguments ra_name">format</td><td class = "ra_type"><a href="#CompressedDataFormat">CompressedDataFormat</a></td><td>The format that was used to compress the given string.</td></tr><tr><td class = "arguments ra_name">compressedstring</td><td class = "ra_type">string</td><td>A string containing data previously compressed with <a href="#love.data.compress">love.data.compress</a>.</td></tr></table><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">rawstring</span> = love.data.<wbr>decompress( <span class = "arguments">container</span>, <span class = "arguments">format</span>, <span class = "arguments">data</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">rawstring</td><td class = "ra_type">string</td><td>A string containing the raw decompressed data.</td></tr><tr><td class = "arguments ra_name">container</td><td class = "ra_type"><a href="#ContainerType">ContainerType</a></td><td>What type to return the decompressed data as.</td></tr><tr><td class = "arguments ra_name">format</td><td class = "ra_type"><a href="#CompressedDataFormat">CompressedDataFormat</a></td><td>The format that was used to compress the given data.</td></tr><tr><td class = "arguments ra_name">data</td><td class = "ra_type"><a href="#Data">Data</a></td><td>A Data object containing data previously compressed with <a href="#love.data.compress">love.data.compress</a>.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.data.encode" name = "love.data.encode"><span>love.data.</span><wbr>encode</a></p><p class = "function_description">Encode <a href="#Data">Data</a> or a string to a <a href="#Data">Data</a> or string in one of the EncodeFormats.</p><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">encoded</span> = love.data.<wbr>encode( <span class = "arguments">containerType</span>, <span class = "arguments">format</span>, <span class = "arguments">sourceString</span>, <span class = "arguments">lineLength</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">encoded</td><td class = "ra_type">Variant</td><td>ByteData/string which contains the encoded version of source.</td></tr><tr><td class = "arguments ra_name">containerType</td><td class = "ra_type"><a href="#ContainerType">ContainerType</a></td><td>What type to return the encoded data as.</td></tr><tr><td class = "arguments ra_name">format</td><td class = "ra_type">EncodeFormat</td><td>The format of the output data.</td></tr><tr><td class = "arguments ra_name">sourceString</td><td class = "ra_type">string</td><td>The raw data to encode.</td></tr><tr><td class = "arguments ra_name">lineLength <span class = "default">(0)</span></td><td class = "ra_type">number</td><td>The maximum line length of the output. Only supported for base64, ignored if 0.</td></tr></table><p class = "synopsis"><span class = "synopsis_background"><span class = "relative"><span class = "returns">encoded</span> = love.data.<wbr>encode( <span class = "arguments">containerType</span>, <span class = "arguments">format</span>, <span class = "arguments">sourceData</span>, <span class = "arguments">lineLength</span> )</span></span></p><table class = "ra_table"><tr><td class = "returns ra_name">encoded</td><td class = "ra_type">Variant</td><td>ByteData/string which contains the encoded version of source.</td></tr><tr><td class = "arguments ra_name">containerType</td><td class = "ra_type"><a href="#ContainerType">ContainerType</a></td><td>What type to return the encoded data as.</td></tr><tr><td class = "arguments ra_name">format</td><td class = "ra_type">EncodeFormat</td><td>The format of the output data.</td></tr><tr><td class = "arguments ra_name">sourceData</td><td class = "ra_type"><a href="#Data">Data</a></td><td>The raw data to encode.</td></tr><tr><td class = "arguments ra_name">lineLength <span class = "default">(0)</span></td><td class = "ra_type">number</td><td>The maximum line length of the output. Only supported for base64, ignored if 0.</td></tr></table></div><div class = "section"><p class = "function_heading"><a href = "#love.data.hash" name =