X hits on this document

PDF document

AVR32709: AVR32 UC3 Audio Decoder Over USB - page 5 / 29

101 views

0 shares

3 downloads

0 comments

5 / 29

AVR32709

5.

Audio Interface API

Note that the audio player is a generic audio player interface and is designed to support multiple audio formats besides MP3.

5.1

Overview

The Audio Interface (AI) manages disk navigation, audio navigation and audio control (see below). Thus, the user does not have to directly interface with the File System and audio control APIs. This greatly simplifies the software architecture.

The Audio Interface can be used in 2 different ways:

asynchronous” functions, which result/effect may not be produced in one single iteration. Using these functions usually leads to the use of state-machines in the user firmware (since one must wait for the completion of a command before launching a new one), and has the advantage of reducing the risks of audio underrun. Asynchronous functions always have the “ai_async” prefix. Note that only one asynchronous function can be used at a time.

synchronous” functions, which are executed immediately. This drastically simplifies the user firmware architecture (no use of state-machines since the synchronous AI functions are immediately executed) but *may* produce audio underrun since the execution time of these functions may be too long. Synchronous functions just have the “ai_” prefix.

All functions of the Audio Interface have a synchronous and asynchronous interface. For exam- ple, the command which returns the number of drives is:

async_nav_drive_nb() in the asynchronous interface.

Using asynchronous functions shall be the preferred solution in order to avoid audio underruns.

5.2

Audio Interface Architecture The AI commands to interface the audio player are divided into three categories:

Disk navigation (Disk Nav) Audio navigation (Audio Nav) Audio Control (Audio CTRL)

to browse into the tree architectures of the USB device. to manage a list of playable songs. to control the audio stream (play/pause/fast forward/...).

5

7817D–AVR32–05/11

Document info
Document views101
Page views101
Page last viewedSun Dec 11 01:01:20 UTC 2016
Pages29
Paragraphs1022
Words9236

Comments