Книга: Beginning Android

Audio Playback Options

Audio Playback Options

The SoundPool class, largely undocumented in Android 1.1, is now ready for widespread use in Android 1.5. The SoundPool is designed to play back multiple overlapping sounds, particularly useful for games. Moreover, you can specify priorities for these audio streams and a maximum number of streams, so your application can simply play back clips as needed (e.g., based on game events), and Android will ensure the maximum number of streams is not exceeded. That way, you can minimize the amount of CPU power audio playback requires.

Android 1.5 also offers AudioTrack, whereby the device can play back audio that your code converts, perhaps from a streaming source, into PCM data. So, for example, should you want to implement a Voice-Over-IP (VOIP) application, you might use AudioTrack to handle playback of the audio coming off of, say, the SIP connection.

Android 1.5 also introduces the JetPlayer, designed to play back JET interactive music filesJET interactive music files.

Оглавление книги

Оглавление статьи/книги

Генерация: 1.187. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз