Songs are less flexible than samples in that they can only be played one at a time and without panning or speed parameters.

Attributes

NameRead/write?
volume RW

Public Class Methods


current_song ()

Returns the song currently being played or paused, or nil if no song has been played yet or the last song has finished playing.

# File reference/gosu.rb, line 306
    def self.current_song; end

new (window, filename)

# File reference/gosu.rb, line 310
    def initialize(window, filename); end

Public Instance Methods


pause ()

Pauses playback of the song. It is not considered being played. current_song will stay the same.

# File reference/gosu.rb, line 318
    def pause; end

paused? ()

Returns true if the song is the current song, but in paused mode.

# File reference/gosu.rb, line 322
    def paused?; end

play (looping = false)

Starts or resumes playback of the song. This will stop all other songs and set the current song to this object.

# File reference/gosu.rb, line 314
    def play(looping = false); end

playing? ()

Returns true if the song is currently playing.

# File reference/gosu.rb, line 329
    def playing?; end

stop ()

Stops playback of this song if it is currently played or paused. Afterwards, current_song will return 0.

# File reference/gosu.rb, line 326
    def stop; end