|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AudioOutputControl
AudioOutputControl
is an interface for setting application
audio output mode.
The AudioOutputControl is a Global Control and will effect all players.
When the MIDlet which set the audio routing is finished with the audio change then it must set it back to DEFAULT.
Example:
Field Summary | |
---|---|
static int |
ALL
The ALL audio output mode. |
static int |
DEFAULT
The DEFAULT audio output mode. |
static int |
NONE
The NONE audio output mode. |
static int |
PRIVATE
The PRIVATE audio output mode. |
static int |
PUBLIC
The PUBLIC audio output mode. |
Method Summary | |
---|---|
int[] |
getAvailableOutputModes()
Get all supported audio output modes |
AudioOutput |
getCurrent()
returns an AudioOutput object which consists Device Type and the mode of the audio output |
int |
getOutputMode()
Get the currently set audio output mode. |
int |
setOutputMode(int mode)
Sets the preferred audio output mode. |
Field Detail |
---|
static final int DEFAULT
No Preference. The audio routing is restored to the default value.
Value 0 is assigned to DEFAULT
.
static final int ALL
Audio is routed to one public and one private output at the same time. The primary output method within public and private outputs is selected by the device and can change dynamically when external periphals are connected or disconnected by the user (see "public" and "private" for their priorities).
Value 1 is assigned to ALL
.
static final int NONE
Audio is not routed to any output.
Value 2 is assigned to NONE
.
static final int PRIVATE
Audio is routed to earpiece or wired / wireless(BT) headset if connected. If there are several private output methods available at the same time audio is routed to only one of those selected with following priority order 1) wired headset 2) wireless headset 3) earpiece.
Value 3 is assigned to PRIVATE
.
static final int PUBLIC
Audio is routed to loudspeaker, wireless(BT) speakers or TV output. If there are several public output methods available at the same time audio is routed to only one of those selected with following priority order: to be defined.
Value 4 is assigned to PUBLIC
.
Method Detail |
---|
int[] getAvailableOutputModes()
int getOutputMode()
This does not return the actual audio output mode of the device. The AudioOutput can be used to provide the actual audio output mode.
AudioOutput getCurrent()
int setOutputMode(int mode)
This will effect all players.
mode
- one of the supported input modes
java.lang.IllegalArgumentException
- with message "audio output mode is
not valid" when the audio output mode is not valid
java.lang.IllegalStateException
- with message "Accessory connected" if
unable to change the audio routing due to an accessory connected
java.lang.SecurityException
- with message "Permission denied" if the
called does not have permission to control the audio routing.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |