The AudioOutputControl
example MIDlet shows you how to use AudioOutputControl
on a Symbian device to manage audio output modes for a variety of media players. The example MIDlet shows you how
to:
Retrieve a list of all the audio output modes supported by the device
Set the audio output mode to the device loudspeaker (PUBLIC
) or headset (PRIVATE
)
Retrieve the current audio output mode
Retrieve the previous audio output mode set by the setOutputMode
method
Receive notifications when the audio output mode changes
The example MIDlet is also configured to ignore automatic audio muting. If you want the example MIDlet to follow the default audio muting
behavior, remove the Nokia-UI-Enhancement
attribute
from the file AudioOutputControlMidlet\dist\AudioOutputControlMidlet.jad
and install the MIDlet using the modified file.
To use the example MIDlet on your Symbian device:
Install and launch the MIDlet on the device.
Create a player for one media type by selecting Options > Create [player].
Start the media playback by selecting Options > Start playback.
Set the audio output mode by selecting Options > Set mode [mode]. The MIDlet displays a notification when the audio output mode becomes active.
Retrieve the currently used audio output mode by selecting Options > Get active mode. The MIDlet displays the name of the current audio output mode.
Close the player by selecting Options > Close player.
Repeat steps 2 through 6 for another media type.
Exit the MIDlet.
Figure: Using the AudioOutputControl example MIDlet