public class OpenALSoundPlayer extends SoundPlayer implements ClipProvider
SoundPlayer via OpenAL.SoundPlayer.Frob, SoundPlayer.SoundTypeDEFAULT, PAN_CENTER, PAN_LEFT, PAN_RIGHT| Constructor and Description |
|---|
OpenALSoundPlayer(SoundLoader loader) |
| Modifier and Type | Method and Description |
|---|---|
SoundLoader |
getSoundLoader()
Returns the loader used by this player.
|
RunQueue |
getSoundQueue()
Gets the run queue on which sound should be played.
|
Clip |
loadClip(String path)
Loads the specified clip from the appropriate source.
|
void |
lock(String pkgPath,
String... keys)
Optionally lock each of these keys prior to playing, to guarantee that it will be quickly
available for playing.
|
SoundPlayer.Frob |
loop(SoundPlayer.SoundType type,
String pkgPath,
String key,
float gain,
float[] pos) |
SoundPlayer.Frob |
loop(String pkgPath,
String key,
float pan)
Loop the specified sound, stopping as quickly as possible when stop is called.
|
SoundPlayer.Frob |
loop(String pkgPath,
String key,
float pan,
float gain) |
boolean |
play(SoundPlayer.SoundType type,
String pkgPath,
String key,
float gain,
float[] pos) |
void |
play(String pkgPath,
String key,
float pan)
Play the specified sound after the specified delay.
|
void |
play(String pkgPath,
String key,
float pan,
float gain) |
void |
setClipVolume(float vol)
Sets the volume for all sound clips.
|
void |
shutdown()
Shut the damn thing off.
|
void |
stream(String bundle,
String path,
boolean loop,
ResultListener<Stream> listener)
Streams ogg files from the given bundle and path.
|
void |
unlock(String pkgPath,
String... keys)
Unlock the specified sounds so that its resources can be freed.
|
addSoundEnabledObserver, getClipVolume, isEnabled, loop, loop, play, play, play, play, removeSoundEnabledObserver, setEnabled, shouldPlay, summarizeStatepublic OpenALSoundPlayer(SoundLoader loader)
public Clip loadClip(String path) throws IOException
ClipProviderloadClip in interface ClipProviderIOExceptionpublic SoundLoader getSoundLoader()
public RunQueue getSoundQueue()
SoundPlayerRunQueue.AWT.public void setClipVolume(float vol)
SoundPlayersetClipVolume in class SoundPlayervol - a volume parameter between 0f and 1f, inclusive.public void lock(String pkgPath, String... keys)
SoundPlayerlock in class SoundPlayerpublic void unlock(String pkgPath, String... keys)
SoundPlayerunlock in class SoundPlayerpublic void stream(String bundle, String path, boolean loop, ResultListener<Stream> listener) throws IOException
IOExceptionpublic SoundPlayer.Frob loop(String pkgPath, String key, float pan)
SoundPlayerpublic SoundPlayer.Frob loop(String pkgPath, String key, float pan, float gain)
public SoundPlayer.Frob loop(SoundPlayer.SoundType type, String pkgPath, String key, float gain, float[] pos)
public void play(String pkgPath, String key, float pan)
SoundPlayerpan - a value from -1f (all left) to +1f (all right).public boolean play(SoundPlayer.SoundType type, String pkgPath, String key, float gain, float[] pos)
public void shutdown()
SoundPlayershutdown in class SoundPlayerCopyright © 2015. All rights reserved.