love.audio.newQueueableSource
Available since LÖVE 11.0
This function is not supported in earlier versions.
Creates a new Source usable for real-time generated sound playback with Source:queue.
This function can be slow if it is called repeatedly, such as from love.update or love.draw. If you need to use a specific resource often, create it once and store it somewhere it can be reused!
Function
Synopsis
source = love.audio.newQueueableSource( samplerate, bitdepth, channels, buffercount )
Arguments
number samplerate
- Number of samples per second when playing.
number bitdepth
- Bits per sample (8 or 16).
number channels
- 1 for mono or 2 for stereo.
number buffercount (0)
- The number of buffers that can be queued up at any given time with Source:queue. Cannot be greater than 64. A sensible default (~8) is chosen if no value is specified.
Returns
Source source
- The new Source usable with Source:queue.
Notes
The sample rate, bit depth, and channel count of any SoundData used with Source:queue must match the parameters given to this constructor.
See Also
© 2006–2020 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.audio.newQueueableSource