Class: MG::Audio

Inherits:
Object
  • Object
show all
Defined in:
doc/API_reference.rb

Instance Attribute Summary collapse

Constructors collapse

Instance Method Summary collapse

Instance Attribute Details

#durationFloat (readonly)



406
407
408
# File 'doc/API_reference.rb', line 406

def duration
  @duration
end

Class Method Details

.play(path, loop = false, volume = 1.0) ⇒ Audio

Creates a new Audio object based on a sound file at the given path and immediately plays it.



379
# File 'doc/API_reference.rb', line 379

def self.play(path, loop=false, volume=1.0); end

Instance Method Details

#current_positionFloat



399
# File 'doc/API_reference.rb', line 399

def current_position; end

#current_position=(value) ⇒ Object

Set the position where to play the sound.



403
# File 'doc/API_reference.rb', line 403

def current_position=(value); end

#loop=(value) ⇒ Object

Set whether to loop the sound.



389
# File 'doc/API_reference.rb', line 389

def loop=(value); end

#loop?Boolean



385
# File 'doc/API_reference.rb', line 385

def loop?; end

#pauseself

Pauses the sound file.



414
# File 'doc/API_reference.rb', line 414

def pause; end

#paused?Boolean



424
# File 'doc/API_reference.rb', line 424

def paused?; end

#playing?Boolean



421
# File 'doc/API_reference.rb', line 421

def playing?; end

#resumeself

Resumes playing the sound file.



410
# File 'doc/API_reference.rb', line 410

def resume; end

#stopself

Stops the sound file.



418
# File 'doc/API_reference.rb', line 418

def stop; end

#volumeFloat



392
# File 'doc/API_reference.rb', line 392

def volume; end

#volume=(value) ⇒ Object

Set the volume of the sound.



396
# File 'doc/API_reference.rb', line 396

def volume=(value); end