public interface Wav
Example:
final Wav sound = AudioWav.loadWav(Media.get("sound.wav")); sound.setVolume(100); sound.setAlignment(Align.LEFT); sound.play(); Thread.sleep(200); sound.setAlignment(Align.CENTER); sound.play(); Thread.sleep(200); sound.setAlignment(Align.RIGHT); sound.play(); Thread.sleep(200); sound.stop();
Modifier and Type | Field and Description |
---|---|
static int |
VOLUME_MAX
Maximum volume value.
|
static int |
VOLUME_MIN
Minimum volume value.
|
Modifier and Type | Method and Description |
---|---|
void |
play()
Play sound immediately until the end, and free resources.
|
void |
play(int delay)
Play sound immediately until the end, and free resources.
|
void |
setAlignment(Align align)
Set sound alignment.
|
void |
setVolume(int volume)
Set the sound volume.
|
void |
stop()
Stop sound.
|
void |
terminate()
Close sound.
|
static final int VOLUME_MIN
static final int VOLUME_MAX
void setAlignment(Align align)
align
- sound alignment.void setVolume(int volume)
volume
- The volume in percent [VOLUME_MIN
- VOLUME_MAX
]
.void play()
void play(int delay)
delay
- The delay in millisecond before being played.void stop()
void terminate()
Copyright © 2014 Byron 3D Games Studio. All rights reserved.