- Home Startseite ホーム 主页 首頁
- SDK
- Dev Guide Handbuch Guía Guide Guida 開発ガイド 开发人员指南 開發指南
- Reference Referenz Referencia Référence Riferimento リファレンス 参考 參考資料
- Resources
- Videos ビデオ
- Blog ブログ 博客 網誌

Android.com

Multimedia and Camera >

# JetPlayer

## In this document

1. Playing JET content

## Key classes

1. `JetPlayer`

## Related Samples

1. JetBoy

## See also

1. JetCreator User Manual
2. Android Supported Media Formats
3. Data Storage
4. MediaPlayer

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 `JetPlayer` class.

## Playing JET content

This section shows you how to write, set up and play JET content. 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 on Windows, OS X, and Linux platforms (Linux does not support auditioning of imported assets like with the Windows and OS X versions).

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

    JetPlayer jetPlayer = JetPlayer.getJetPlayer();
    jetPlayer.loadJetFile("/sdcard/level1.jet");
    byte segmentId = 0;

    // queue segment 5, repeat once, use General MIDI, transpose by -1 octave
    jetPlayer.queueJetSegment(5, -1, 1, -1, 0, segmentId++);
    // queue segment 2
    jetPlayer.queueJetSegment(2, -1, 0, 0, 0, segmentId++);

    jetPlayer.play();

The SDK includes an example application — JetBoy — that shows how to use `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 JetBoy.
↑ Go to top

← Back to Multimedia and Camera