javax.microedition.media.control
Interface ToneControl

All Superinterfaces:
Control

public interface ToneControl
extends Control

The ToneControl is the interface to enable playback of a simple, application-defined tone sequence. Use method setSequence() to set up array of tones and durations, and set up blocks in the sequence that can be repeated or looped.


Field Summary
static byte BLOCK_END
          Defines an ending point for a block.
static byte BLOCK_START
          Defines a starting point for a block
static byte C4
          Middle C.
static byte PLAY_BLOCK
          Play a defined block.
static byte REPEAT
          The REPEAT event tag
static byte RESOLUTION
          The RESOLUTION event tag
static byte SET_VOLUME
          The SET_VOLUME event tag
static byte SILENCE
          Silence.
static byte TEMPO
          The TEMPO event tag
static byte VERSION
          The VERSION attribute tag
 
Method Summary
 void setSequence(byte[] sequence)
          Sets the tone sequence.
 

Field Detail

SILENCE

public static final byte SILENCE
Silence.

See Also:
Constant Field Values

VERSION

public static final byte VERSION
The VERSION attribute tag

See Also:
Constant Field Values

TEMPO

public static final byte TEMPO
The TEMPO event tag

See Also:
Constant Field Values

RESOLUTION

public static final byte RESOLUTION
The RESOLUTION event tag

See Also:
Constant Field Values

BLOCK_START

public static final byte BLOCK_START
Defines a starting point for a block

See Also:
Constant Field Values

BLOCK_END

public static final byte BLOCK_END
Defines an ending point for a block.

See Also:
Constant Field Values

PLAY_BLOCK

public static final byte PLAY_BLOCK
Play a defined block.

See Also:
Constant Field Values

SET_VOLUME

public static final byte SET_VOLUME
The SET_VOLUME event tag

See Also:
Constant Field Values

REPEAT

public static final byte REPEAT
The REPEAT event tag

See Also:
Constant Field Values

C4

public static final byte C4
Middle C.

See Also:
Constant Field Values
Method Detail

setSequence

public void setSequence(byte[] sequence)
Sets the tone sequence.

Parameters:
sequence - The sequence to be set
Throws:
IllegalArgumentException - if the sequence is null or invalid
IllegalStateException - if the Player that this control belongs to is in the PREFETCHED or STARTED state.