1page.title=JetPlayer 2parent.title=Multimedia and Camera 3parent.link=index.html 4@jd:body 5 6 <div id="qv-wrapper"> 7 <div id="qv"> 8 9<h2>In this document</h2> 10<ol> 11<li><a href="#jetcontent">Playing JET content</a> 12</ol> 13 14<h2>Key classes</h2> 15<ol> 16<li>{@link android.media.JetPlayer}</li> 17</ol> 18 19<h2>Related Samples</h2> 20<ol> 21<li><a href="{@docRoot}resources/samples/JetBoy/index.html">JetBoy</a></li> 22</ol> 23 24<h2>See also</h2> 25<ol> 26<li><a href="{@docRoot}guide/topics/media/jet/jetcreator_manual.html">JetCreator User 27Manual</a></li> 28<li><a href="{@docRoot}guide/appendix/media-formats.html">Android Supported Media Formats</a></li> 29<li><a href="{@docRoot}guide/topics/data/data-storage.html">Data Storage</a></li> 30<li><a href="{@docRoot}guide/topics/media/mediaplayer.html">MediaPlayer</a></li> 31</ol> 32 33</div> 34</div> 35 36<p>The Android platform includes a JET engine that lets you add interactive playback of JET audio 37content in your applications. You can create JET content for interactive playback using the 38JetCreator authoring application that ships with the SDK. To play and manage JET content from your 39application, use the {@link android.media.JetPlayer JetPlayer} class.</p> 40 41 42<h2 id="jetcontent">Playing JET content</h2> 43 44<p>This section shows you how to write, set up and play JET content. For a description of JET 45concepts and instructions on how to use the JetCreator authoring tool, see the <a 46href="{@docRoot}guide/topics/media/jet/jetcreator_manual.html">JetCreator User 47Manual</a>. The tool is available on Windows, OS X, and Linux platforms (Linux does not 48support auditioning of imported assets like with the Windows and OS X versions). 49</p> 50 51<p>Here's an example of how to set up JET playback from a <code>.jet</code> file stored on the SD 52card:</p> 53 54<pre> 55JetPlayer jetPlayer = JetPlayer.getJetPlayer(); 56jetPlayer.loadJetFile("/sdcard/level1.jet"); 57byte segmentId = 0; 58 59// queue segment 5, repeat once, use General MIDI, transpose by -1 octave 60jetPlayer.queueJetSegment(5, -1, 1, -1, 0, segmentId++); 61// queue segment 2 62jetPlayer.queueJetSegment(2, -1, 0, 0, 0, segmentId++); 63 64jetPlayer.play(); 65</pre> 66 67<a>The SDK includes an example application — JetBoy — that shows how to use {@link 68android.media.JetPlayer JetPlayer} to create an interactive music soundtrack in your game. It also 69illustrates how to use JET events to synchronize music and game logic. The application is located at 70<a href="{@docRoot}resources/samples/JetBoy/index.html">JetBoy</a>.</p>