Difference between revisions of "love.audio.newQueueableSource"

m
m (updated version from 0.11.0 to 11.0)
Line 1: Line 1:
{{newin|[[0.11.0]]|110|type=function}}
+
{{newin|[[11.0]]|110|type=function}}
 
Creates a new Source usable for real-time generated sound playback with [[Source:queue]].
 
Creates a new Source usable for real-time generated sound playback with [[Source:queue]].
 
  {{newobjectnotice}}
 
  {{newobjectnotice}}

Revision as of 12:35, 2 April 2018

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.

O.png 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

Other Languages