com.badlogic.gdx.backends.openal
Class OpenALSound

java.lang.Object
  extended by com.badlogic.gdx.backends.openal.OpenALSound
All Implemented Interfaces:
Sound, Disposable
Direct Known Subclasses:
Mp3.Sound, Ogg.Sound, Wav.Sound

public class OpenALSound
extends Object
implements Sound

Author:
Nathan Sweet

Constructor Summary
OpenALSound(OpenALAudio audio)
           
 
Method Summary
 void dispose()
           
 float duration()
          Returns the length of the sound in seconds.
 long loop()
           
 long loop(float volume)
           
 long loop(float volume, float pitch, float pan)
           
 void pause()
           
 void pause(long soundId)
           
 long play()
           
 long play(float volume)
           
 long play(float volume, float pitch, float pan)
           
 void resume()
           
 void resume(long soundId)
           
 void setLooping(long soundId, boolean looping)
           
 void setPan(long soundId, float pan, float volume)
           
 void setPitch(long soundId, float pitch)
           
 void setPriority(long soundId, int priority)
           
 void setVolume(long soundId, float volume)
           
 void stop()
           
 void stop(long soundId)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenALSound

public OpenALSound(OpenALAudio audio)
Method Detail

play

public long play()
Specified by:
play in interface Sound

play

public long play(float volume)
Specified by:
play in interface Sound

loop

public long loop()
Specified by:
loop in interface Sound

loop

public long loop(float volume)
Specified by:
loop in interface Sound

stop

public void stop()
Specified by:
stop in interface Sound

dispose

public void dispose()
Specified by:
dispose in interface Sound
Specified by:
dispose in interface Disposable

stop

public void stop(long soundId)
Specified by:
stop in interface Sound

pause

public void pause()
Specified by:
pause in interface Sound

pause

public void pause(long soundId)
Specified by:
pause in interface Sound

resume

public void resume()
Specified by:
resume in interface Sound

resume

public void resume(long soundId)
Specified by:
resume in interface Sound

setPitch

public void setPitch(long soundId,
                     float pitch)
Specified by:
setPitch in interface Sound

setVolume

public void setVolume(long soundId,
                      float volume)
Specified by:
setVolume in interface Sound

setLooping

public void setLooping(long soundId,
                       boolean looping)
Specified by:
setLooping in interface Sound

setPan

public void setPan(long soundId,
                   float pan,
                   float volume)
Specified by:
setPan in interface Sound

play

public long play(float volume,
                 float pitch,
                 float pan)
Specified by:
play in interface Sound

loop

public long loop(float volume,
                 float pitch,
                 float pan)
Specified by:
loop in interface Sound

duration

public float duration()
Returns the length of the sound in seconds.


setPriority

public void setPriority(long soundId,
                        int priority)
Specified by:
setPriority in interface Sound


Copyright © 2013. All Rights Reserved.