Preface
This chapter is about Framework Topics/Multimedia and Camera/Jet Player in the Android developer guide. The version is Android 4.0 r1. Translated from: "Dummies". Welcome to his Weibo Website: "http://weibo.com/popapa", thanks again "dumb prawns "! We look forward to your participation in translation of Android related information, contact me over140@gmail.com.
Statement
You are welcome to repost, but please keep the original source of the article :)
Blog Garden: http://www.cnblogs.com/
Android Chinese translation group: http://goo.gl/6vJQl
JetPlayer
Translator's signature: Dummies
Translator's microblog: http://weibo.com/popapa
Version: Android 4.0 r1
Original
Http://developer.android.com/guide/topics/media/jetplayer.html
In this article
Play JET content
Key
JetPlayer
Related Routines
JetBoy
See
JetCreator User Manual
Media formats supported by Android
Data Storage
MediaPlayer
The Android platform includes a JET engine that enables interactive playback of JET audio in applications. The JetCreator program attached to the SDK allows you to create JET audio that supports interactive playback. Applications can use the JetPlayer class to play and manage JET audio content.
PlayJETContent
This section describes how to write, set, and play JET content. For more information about the concept of JET and the use of the JetCreator tool, see the JetCreator user manual. This tool is applicable to Windows, OS x, and Linux platforms (unlike OS X and Windows, Linux does not support resource import audition ).
The following example shows how to set the. JET file on the SD card for jet playback:
JetPlayer jetPlayer = JetPlayer. getJetPlayer ();
JetPlayer. loadJetFile ("/sdcard/level1.jet ");
Byte segmentId = 0;
// Query section 5, repeat once, and use general MIDI to reduce the tone by one octal.
JetPlayer. queueJetSegment (5,-1, 1,-1, 0, segmentId ++ );
// Query Section 2
JetPlayer. queueJetSegment (2,-1, 0, 0, 0, segmentId ++ );
JetPlayer. play ();
The SDK contains a routine, JetBoy, which demonstrates how to use JetPlayer to create interactive audio tracks in a game and how to use JET events to synchronize music and game logic. This routine is located in <sdk>/platforms/android-1.5/samples/JetBoy.