Java ME Developer Guide

Chapter 10 - JSR-135 - Mobile Media API

Code Sample 2 JSR-135 MMA

10.2 ToneControl

ToneControl is the interface to enable playback of a user-defined monotonic tone se- quence. The JSR-135 Mobile Media API will implement public interface ToneControl.

A tone sequence is specified as a list of non-tone duration pairs and user-defined se- quence blocks and is packaged as an array of bytes. The ￿￿￿￿￿￿￿￿￿￿￿￿￿ method is used to input the sequence to the ToneControl.

The following is the available method for ToneControl:

￿￿￿￿￿￿￿￿￿￿￿￿ ￿￿￿￿￿￿￿ ￿￿￿￿￿￿￿￿￿￿ Sets the tone sequence

10.3 VolumeControl

VolumeControl is an interface for manipulating the audio volume of a Player. The JSR-135 Mobile Media API will implement public interface VolumeControl.

The following describes the different volume settings found within VolumeControl:

Volume Settings - allows the output volume to be specified using an integer value that varies between 0 and 100. Depending on the application, this will need to be mapped to the volume level on the phone (0-7).

Specifying Volume in the Level Scale - specifies volume in a linear scale. It ranges from 0 - 100 where 0 represents silence and 100 represents the highest volume available.

Mute - setting mute on or off does not change the volume level returned by the getLevel. If mute is on, no audio signal is produced by the Player. If mute is off, an audio signal is produced and the volume is restored.

The following is a list of available methods with regards to VoumeControl:

￿￿￿￿￿￿￿￿￿￿ Get the current volume setting.

￿￿￿￿￿￿￿￿￿ Get the mute state of the signal associated with this VolumeControl.

DRAFT - Subject to Change [75/201]

Page 75
Image 75
Motorola maxx V6 manual ToneControl, VolumeControl, Draft Subject to Change 75/201