lovr.data.newAudioStream

Creates a new AudioStream from ogg data.

audioStream = lovr.data.newAudioStream(filename, bufferSize)

Arguments

NameTypeDefaultDescription
filenamestringThe filename of the audio file to load.
bufferSizenumber4096The size of the stream's audio buffer, in samples.

Returns

NameTypeDescription
audioStreamAudioStreamThe new AudioStream.

audioStream = lovr.data.newAudioStream(blob, bufferSize)

Arguments

NameTypeDefaultDescription
blobBlobThe Blob containing audio data to decode.
bufferSizenumber4096The size of the stream's audio buffer, in samples.

Returns

NameTypeDescription
audioStreamAudioStreamThe new AudioStream.

See also