abstract class Crame::Source

Overview

A Source is an abstract class representing any audio source that can be heard.

Only supported formats for the audio source are MP3, FLAC, WAV, and OGG.

Direct Known Subclasses

Defined in:

crame/source.cr

Instance Method Summary

Instance Method Detail

def finalize #

def looping=(looping : Bool) #

Toggles whether self can be played on loop.


def looping? : Bool #

Returns true if self can be played on loop, false otherwise.


def pause #

Pauses self.


def pitch : Float64 #

Returns the pitch of self.


def pitch=(pitch : Float64) #

Sets the pitch of self.


def play #

Plays self.


def playing? : Bool #

Returns true if self is currently playing, false otherwise.


def stop #

Stops self.


def volume : Float64 #

Returns the volume of self.


def volume=(volume : Float64) #

Sets the volume of self.