module Haematite::AudioRenderer

Overview

The AudioRenderer module can be included in classes that need to provide support for rendering audio data.

Direct including types

Defined in:

haematite/audiorenderer.cr

Instance Method Summary

Instance Method Detail

def render(dest : Array(Float64) | Slice(Float64), pool : RemiLib::ArrayPool(Float64)) : Bool #

Renders audio to dest using #render. The audio is rendered as interleaved stereo.


def render(dest : Array(Float32) | Slice(Float32), pool : RemiLib::ArrayPool(Float64)) : Bool #

Renders audio to dest using #render. The audio is rendered as interleaved stereo.


abstract def render(left : Slice(Float64), right : Slice(Float64)) : Bool #

Renders audio to left and right. This returns true if the song is not finished, or if the sequencer is set to loop. Otherwise this returns false when the song is finished and there is nothing left to render.


def render(dest : Array(Float64) | Slice(Float64) | Array(Float32) | Slice(Float32)) : Bool #

Renders audio to dest using #render. The audio is rendered as interleaved stereo.

NOTE If you are using multiple threads/fibers, you should always use the alternate version of this method that takes an array pool, and use one pool per thread/fiber.