|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PlayableAudio
The PlayableAudio interface provides methods which are common to all audio objects, including volume, transposition, stereo position, buzz/flash effects, and routing.
| Field Summary |
|---|
| Fields inherited from interface danger.media.PlayableMedia |
|---|
DEFAULT_PRIORITY, PRIORITY_1, PRIORITY_2, PRIORITY_3, PRIORITY_4, PRIORITY_5 |
| Method Summary | |
|---|---|
void |
fadeFromToInTime(int sourceVolume,
int destVolume,
int timeInMilliseconds)
Fade from source volume, to dest volume in time milliseconds. |
int |
getStereoPosition()
Returns current stereo position. |
int |
getTranspose()
Get tuning in semitones. |
int |
getTuning()
Get tuning in cents. |
int |
getVolume()
Get the current volume. |
int |
getVolumeClass()
Get the current volume class. |
boolean |
isMuted()
Get mute status. |
void |
setBuzzFlash(boolean buzzOn,
boolean flashOn)
Set auto generate buzz/flash on or off. |
void |
setBuzzFlashEnable(boolean buzzOn,
boolean flashOn)
Set buzz/flash enable on or off. |
void |
setMute(boolean mute)
Mute or unmute the audio. |
void |
setStereoPosition(int position)
Set the stereo position of sound. |
void |
setTranspose(int semitones)
Set tuning in semitones. |
void |
setTuning(int cents)
Set tuning in cents. |
void |
setVolume(int volume)
Set the current volume. |
void |
setVolumeClass(int volumeClass)
Set the volume class. |
boolean |
startWithFilter(int filter)
Start object with a filter. |
| Method Detail |
|---|
void setVolumeClass(int volumeClass)
volumeClass - one of VolumeSelectorint getVolumeClass()
VolumeSelectorvoid setVolume(int volume)
volume - 100 is 100% of normal, 200 is double volume, 50
is half volume, etc.int getVolume()
void setStereoPosition(int position)
position - range is -100 (full left) to 100 (full right). Default is 0 (center)int getStereoPosition()
void setTranspose(int semitones)
setTuning(int) and getTuning().
A semitone, or half-step is a musical interval. A full octave is 12 semitones.
semitones - range -12 to 12int getTranspose()
setTuning(int) has been called, This will truncate actual value to nearest 100 cents.
void setTuning(int cents)
setTranspose(int) and getTranspose().
cents - 1200 is down an octave, -1200 is up an octaveint getTuning()
setTranspose(int) and getTranspose()
void setBuzzFlashEnable(boolean buzzOn,
boolean flashOn)
buzzOn - if true, media will use vibrationflashOn - if true, media will use LED
void setBuzzFlash(boolean buzzOn,
boolean flashOn)
buzzOn - if true, media will generate vibrationflashOn - if true, media will generate LEDboolean startWithFilter(int filter)
If you pass in ToneFilter.BUZZER or ToneFilter.FLASHER, then the flash and buzz will be synthetically generated.
filter - one or more of ToneFilter
void setMute(boolean mute)
mute - true will mute, false will unmuteboolean isMuted()
void fadeFromToInTime(int sourceVolume,
int destVolume,
int timeInMilliseconds)
sourceVolume - range 0 to 100destVolume - range 0 to 100timeInMilliseconds - how long the fade takes
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||