class Quartz::AudioStream(T)

Overview

Audio Stream class for sound IO.

Defined in:

quartz/core/stream.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(input_device : Quartz::Device, input : Int32, output_device : Quartz::Device, output : Int32, sample_rate : Float64, size : UInt64, interleave : Bool = false) #

Open given device


[View source]
def self.new(input, output, sample_rate, size, interleave : Bool = false) #

Open default device


[View source]

Instance Method Detail

def cpu_load #

[View source]
def input : Int32 #

[View source]
def input_device : Device #

[View source]
def inspect(io : IO) #
Description copied from class Reference

Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>

[View source]
def is_active? #

[View source]
def is_stopped? #

[View source]
def output : Int32 #

[View source]
def output_device : Device #

[View source]
def ptr : Pointer(Void) #

[View source]
def sample_rate : Float64 #

[View source]
def size : UInt64 #

[View source]
def start(callback : LibPortAudio::PaStreamCallback, user_data) #

Start this stream by using Proc


[View source]
def start(user_data, &block : LibPortAudio::PaStreamCallback) #

Start this stream by using block


[View source]
def start(callbacker : AbstractAudioApp) #

Start this stream by using class T that has T#callback


[View source]
def stop #

[View source]
def to_s(io : IO) #
Description copied from class Reference

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>

[View source]
def to_unsafe : Pointer(LibPortAudio::PaStream) #

[View source]