module RemiAudio::Resampler::CallbackResampler

Overview

The CallbackResampler mixin is used in Resampler subclasses that call a callback function to read source audio data as-needed.

Direct including types

Defined in:

remiaudio/resampler/resampler.cr

Instance Method Summary

Instance Method Detail

def callbackFunc : CallbackProc #

The method called when new input data is needed.


[View source]
def read(ratio : Float64, data : Array(Float32) | Slice(Float32)) : Int64 #

Reads audio data into data at the given ratio, returning the actual number of samples that were read into data.

Note that the returned value is samples per channel.


[View source]
def read(ratio : Float64, data : Array(Float64) | Slice(Float64)) : Int64 #

Reads audio data into data at the given ratio, returning the actual number of samples that were read into data.

Note that the returned value is samples per channel.


[View source]
def tempFloat32Buf(size : Int) : Slice(Float32) #

[View source]