class RemiAudio::Resampler::ZohResamplerCb

Overview

A callback version of the ZohResampler class.

Included Modules

Defined in:

remiaudio/resampler/zoh.cr

Constructors

Instance Method Summary

Instance methods inherited from module RemiAudio::Resampler::CallbackResampler

callbackFunc : CallbackProc callbackFunc, read(ratio : Float64, data : Array(Float32) | Slice(Float32)) : Int64
read(ratio : Float64, data : Array(Float64) | Slice(Float64)) : Int64
read
, tempFloat32Buf(size : Int) : Slice(Float32) tempFloat32Buf

Instance methods inherited from class RemiAudio::Resampler::ZohResampler

dup : ZohResampler dup, reset : Nil reset

Constructor methods inherited from class RemiAudio::Resampler::ZohResampler

new(channels : Int32) new

Instance methods inherited from class RemiAudio::Resampler::Resampler

channels : Int32 channels, process(source : Array(Float32) | Slice(Float32), dest : Array(Float32) | Slice(Float32), ratio : Float64) : Tuple(Int64, Int64, Bool)
process(source : Array(Float64) | Slice(Float64), dest : Array(Float64) | Slice(Float64), ratio : Float64) : Tuple(Int64, Int64, Bool)
process
, ratio=(value : Float64) : Nil ratio=, reset : Nil reset

Constructor Detail

def self.new(channels : Int32, ratio : Float64, callbackFunc : CallbackProc) #

Creates a new ZohResamplerCb that will handle the given number of channels. The ratio parameter sets the initial ratio of the resampler (targetRate / sourceRate), while callbackFunc is the method that will be called whenever this resampler needs more input data.


[View source]

Instance Method Detail

def process(source : Array(Float32) | Slice(Float32), dest : Array(Float32) | Slice(Float32), ratio : Float64) : Tuple(Int64, Int64, Bool) #

This is not supported by this class since LinearResamplerCb uses the CallbackResampler mixin. Calling this always raises a NotImplementedError.


[View source]
def process(source : Array(Float64) | Slice(Float64), dest : Array(Float64) | Slice(Float64), ratio : Float64) : Tuple(Int64, Int64, Bool) #

This is not supported by this class since LinearResamplerCb uses the CallbackResampler mixin. Calling this always raises a NotImplementedError.


[View source]
def reset : Nil #

:inherit:


[View source]