Java Reference
In-Depth Information
You can use the same casting procedure to create a com.nttdocomo.
ui.ogl.GraphicsOGL interface object, which uses the OpenGL ES
engine for rendering:
Graphics g = Canvas.getGraphics();
GraphicsOGL g3D = (com.nttdocomo.ui.ogl.GraphicsOGL) g;
Further documentation is available from the Khronos Group; 18 it not
only describes each method of the GraphicsOGL class in much greater
detail than the DoJa API, but it is also in English. Unfortunately, there is
a notable lack of any coded examples for DoJa.
7.8.4 Sound
The DoJa 5.0 profile builds on previous versions by allowing playback
of iMotion audio tracks. Support is also enabled for the simultaneous
playback of four MFi/Phrase format sounds and PANPOT (stereo-sound-
effect positioning).
3D sound, including PANPOT, has been a feature implemented in
DoJa since version 4.0. Supported on handsets with top and bottom
speakers, as well as left and right speakers, these functions provide
fine-grained directional output. The three-dimensional sound playback
features allow sounds to be played from a virtual sound source, giving the
illusion of orientation and direction. 3D coordinate data can be specified
and updated either dynamically at run time or by embedding coordinate
data in the sound.
PANPOT allows sound to be directed through either the left or right
speakers. The attribute value ranges from 0 to 127, with 64 being the
central position. It can only be used on sounds in the MFi/Phrase format,
and only where supported by the handset.
The following short code extract demonstrates how to set the location
of a sound using the CartesianListener to specify the position and
orientation of the sound:
MediaSound mediaSound;
AudioPresenter audioPresenter;
Audio3D audio3d;
// acquire a new audio presenter and set the media sound
audioPresenter = AudioPresenter.getAudioPresenter();
// set up the 3d audio to be controlled by the application
audio3d = audioPresenter.getAudio3D();
18 X
Search WWH ::

Custom Search