Tonecontrol; Code Sample 4 Jsr 135 Mobile Media Api - Motorola C381P J2ME Technical Manual

J2me developer guide
Table of Contents

Advertisement

9
JSR 135 Mobile Media API
catch (MediaException e)
{
System.out.println("FAILED: exception for realize: " +
e.toString());
}
// Acquire exclusive resources, fill buffers with media data
try
{
player.prefetch();
}
catch (MediaException e)
{
System.out.println("FAILED: exception for prefetch: " +
e.toString());
}
// Start the media playback
try
{
player.start();
}
catch (MediaException e)
{
System.out.println("FAILED: exception for start: " +
e.toString());
}
// Pause the media playback
try
{
player.stop();
}
catch (MediaException e)
{
System.out.println("FAILED: exception for stop: " +
e.toString());
}
// Release the resources
player.close();

ToneControl

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

Code Sample 4 JSR 135 Mobile Media API

36

Advertisement

Table of Contents
loading

Table of Contents