libgdx API

com.badlogic.gdx.audio
Interface Sound

All Superinterfaces:
Disposable

public interface Sound
extends Disposable

A Sound is a short audio clip that can be played numerous times in parallel. It's completely loaded into memory so only load small audio files. Call the dispose() method when you're done using the Sound.

Sound instances are created via a call to Audio.newSound(FileHandle).

Author:
badlogicgames@gmail.com

Method Summary
 void dispose()
          Releases all the resources.
 void play()
          Plays the sound.
 void play(float volume)
          Plays the sound.
 void stop()
          Stops playing all instances of this sound.
 

Method Detail

play

void play()
Plays the sound. If the sound is already playing, it will be played again, concurrently.


play

void play(float volume)
Plays the sound. If the sound is already playing, it will be played again, concurrently.

Parameters:
volume - the volume in the range [0,1]

stop

void stop()
Stops playing all instances of this sound.


dispose

void dispose()
Releases all the resources.

Specified by:
dispose in interface Disposable

libgdx API

Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)