Raudio::AudioStream
Inherits Reference < Object
AudioStream represents a custom audio stream Use this for procedural audio or custom audio processing
Constants
NOOP_CALLBACK = ->(_buffer : Pointer(Void), _frames : UInt32) do
end
NOOP callback retained to avoid GC (used when clearing callbacks)
Constructors
load(sample_rate : UInt32, sample_size : UInt32, channels : UInt32) : self
Load audio stream (to stream raw audio pcm data)
Class methods
attach_mixed_processor(processor : LibRaudio::AudioCallback)
Attach audio stream processor to the entire audio pipeline
attach_mixed_processor
Attach audio stream processor to the entire audio pipeline (block form)
detach_mixed_processor(processor : LibRaudio::AudioCallback)
Detach audio stream processor from the entire audio pipeline
Instance methods
attach_processor(processor : LibRaudio::AudioCallback)
Attach audio stream processor to stream
callback=(cb : LibRaudio::AudioCallback)
Set per-stream callback (single). Overwrites previous.
clear_callback
Sourceclose
Sourcedetach_processor(processor : LibRaudio::AudioCallback)
Detach audio stream processor from stream
finalize
Sourcerelease
Sourcereleased?
Source