High-level wrapper around LibTSF::TSF
Note: Thread safety depends on the underlying C library.
Constructors
from_memory(data :
Bytes, sample_rate :
Int32 = 44100, output_mode :
LibTSF::OutputMode =
LibTSF::OutputMode::StereoInterleaved, gain_db :
Float32 = 0.0_f32) : self
Sourcenew(filename :
String, sample_rate :
Int32 = 44100, output_mode :
LibTSF::OutputMode =
LibTSF::OutputMode::StereoInterleaved, gain_db :
Float32 = 0.0_f32)
SourceClass methods
open(filename :
String, sample_rate :
Int32 = 44100, output_mode :
LibTSF::OutputMode =
LibTSF::OutputMode::StereoInterleaved, gain_db :
Float32 = 0.0_f32, &)
RAII helper that ensures close is called
SourceInstance methods
finalize
Rescue-only finalizer to avoid leaking native handle
SourceRendering API
samples is the number of frames per channel
Sourceset_output(mode :
LibTSF::OutputMode, sample_rate :
Int32 = @sample_rate, gain_db :
Float32 = 0.0_f32)
Configure output again if needed
Source