class Crame::Music

Overview

A Music is an ausio Source that is opened and streamed on demand.

Useful and suitable for long audio files.

Defined in:

crame/music.cr

Constructors

Instance Method Summary

Instance methods inherited from class Crame::Source

finalize finalize, looping=(looping : Bool) looping=, looping? : Bool looping?, pause pause, pitch : Float64 pitch, pitch=(pitch : Float64) pitch=, play play, playing? : Bool playing?, stop stop, volume : Float64 volume, volume=(volume : Float64) volume=

Constructor Detail

def self.new(path : String | Path) #

Creates a new Music given its path.


Instance Method Detail

def duration : Time::Span #

Returns the duration of self.


def seek(position : Time::Span) #

Seeks the cursor on self to the given position.


def tell : Time::Span #

Returns the actual position of the cursor on self.