From 47f3a7ae793d271b6731436eb854fc8ae7cb9871 Mon Sep 17 00:00:00 2001 From: Dirk Dougherty <> Date: Fri, 24 Apr 2009 19:16:21 -0700 Subject: AI 147782: Add a link to the JET docs from media index page. BUG=1790234 Automated import of CL 147782 --- docs/html/guide/topics/media/index.jd | 37 ++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/html/guide/topics/media/index.jd b/docs/html/guide/topics/media/index.jd index fd7d2da..96c500c 100644 --- a/docs/html/guide/topics/media/index.jd +++ b/docs/html/guide/topics/media/index.jd @@ -14,19 +14,28 @@ page.title=Audio and Video

Key classes

    -
  1. MediaPlayer (all audio and video formats)
  2. -
  3. MediaRecorder (record, all audio formats)
  4. +
  5. {@link android.media.MediaPlayer MediaPlayer} (all available formats)
  6. +
  7. {@link android.media.MediaRecorder MediaRecorder} (all available formats)
  8. +
  9. {@link android.media.JetPlayer JetPlayer} (playback, JET content)
  10. +
  11. {@link android.media.SoundPool SoundPool} (sound management)

In this document

    -
  1. Audio and Video Playback
  2. +
  3. Audio and Video Playback +
      +
    1. Playing from a Raw Resource
    2. +
    3. Playing from a File or Stream
    4. +
    5. Playing JET Content
    6. +
    +
  4. Audio Capture

See also

  1. Data Storage
  2. +
  3. JetCreator User Manual
@@ -115,6 +124,28 @@ above.

If you're passing a URL to an online media file, the file must be capable of progressive download.

+

Playing JET content

+

The Android platform includes a JET engine that lets you add interactive playback of JET audio content in your applications. You can create JET content for interactive playback using the JetCreator authoring application that ships with the SDK. To play and manage JET content from your application, use the {@link android.media.JetPlayer JetPlayer} class.

+ +

For a description of JET concepts and instructions on how to use the JetCreator authoring tool, see the JetCreator User Manual. The tool is available fully-featured on the OS X and Windows platforms and the Linux version supports all the content creation features, but not the auditioning of the imported assets.

+ +

Here's an example of how to set up JET playback from a .jet file stored on the SD card:

+ +
+JetPlayer myJet = JetPlayer.getJetPlayer();
+myJet.loadJetFile("/sdcard/level1.jet");
+byte segmentId = 0;
+
+// queue segment 5, repeat once, use General MIDI, transpose by -1 octave
+myJet.queueJetSegment(5, -1, 1, -1, 0, segmentId++);
+// queue segment 2
+myJet.queueJetSegment(2, -1, 0, 0, 0, segmentId++);
+
+myJet.play();
+
+ +

The SDK includes an example application — JetBoy — that shows how to use {@link android.media.JetPlayer JetPlayer} to create an interactive music soundtrack in your game. It also illustrates how to use JET events to synchronize music and game logic. The application is located at <sdk>/platforms/android-1.5/samples/JetBoy. +

Audio Capture

Audio capture from the device is a bit more complicated than audio/video playback, but still fairly simple:

    -- cgit v1.1