public class AndroidSoundPool
extends java.lang.Object
Constructor and Description |
---|
AndroidSoundPool() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Unloads all the sounds and releases the SoundPool.
|
int |
getLoop()
Returns the number of repeats.
|
float |
getRate()
Returns the playback rate.
|
float |
getVolume()
Returns the current volume.
|
void |
initialize(SoundPoolIntf soundPool)
Initializes the SoundPool.
|
boolean |
play(java.lang.String soundName)
Plays the sound with the given name.
|
boolean |
preloadSound(java.lang.String soundName)
Preloads the sound with the given name.
|
void |
setLoop(int loop)
Sets the number of repeats.
|
void |
setRate(float rate)
Sets the playback rate.
|
void |
setVolume(float volume)
Sets the volume.
|
void |
stop()
Stops the playback.
|
public void initialize(SoundPoolIntf soundPool)
public boolean preloadSound(java.lang.String soundName)
java.lang.IllegalStateException
- if initialized has not been called yet.public boolean play(java.lang.String soundName)
public void stop()
public float getVolume()
public void setVolume(float volume)
public float getRate()
public void setRate(float rate)
public int getLoop()
public void setLoop(int loop)
public void close()