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.
Queueable sources allow SoundData objects to be played seamlessly one after another, without the need to wait for an update cycle.
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 (8)
- 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
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info