X hits on this document

PDF document

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

90 views

0 shares

3 downloads

0 comments

13 / 29

AVR32709

5.6

Audio Control

The audio controller is used to control the audio stream of the audio file selected by the audio navigator.

Table 5-4.

Audio Control Commands

Command Name

Input

Return

Output Extra result

Description

a i _ a u d i o _ c t r l _ s t o p

True or false

Stops the audio.

ai audio ctrl resume

_

_

_

True or false

P l a y s o r r e s u m e s p l a y a f t e r a n a i _ a u d i o _ c t r l _ p a u s e o r ai_audio_ctrl_stop command. a n

a i _ a u d i o _ c t r l _ p a u s e

True or false

Pauses the audio.

ai audio ctrl time

_

_

_

Elapsed time

Returns the elapsed time of the audio track being played.

ai audio ctrl status

_

_

_

Status

Returns the status of the audio controller (stop, play, pause, a new audio file is being played, the current folder has changed).

ai audio ctrl ffw

_

_

_

Skip time

True or false

Fast forwards the audio until the skip time has been reached. Then, it will continue to play the rest of the audio file. The skip time passed in parameter is in second.

ai audio ctrl frw

_

_

_

Skip time

True or false

Fast rewinds the audio until the skip time has been reached.

Then, it will set the audio player in play mode. The skip time passed in parameter is in second.

ai audio ctrl start ffw

_

_

_

_

True or false

Sets the audio player into fast forward mode. Function not implemented yet.

ai audio ctrl start frw

_

_

_

_

True or false

Sets the audio player into fast rewind mode. Function not implemented yet.

a i _ a u d i o _ c t r l _ s t o p _ f f w _ f r w

True or false

Stops fast forwarding/rewinding and set the audio player into the previous mode (play or pause).

Function not implemented yet.

5.7

Using Asynchronous or Synchronous API

Using synchronous function is straightforward. Once finished, synchronous functions returns, with or without a result.

Using asynchronous function is more complicated: they may not produce the requested task in a single shot. Thus these functions need some other functions to properly operate:

asynchronous commands. It must be called to execute the current state of the internal state machine of the current asynchronous function.

is finished.

( C M D _ D O N E , C M D _ E X E C U T I N G o CMD_ERROR). r

13

7817D–AVR32–05/11

Document info
Document views90
Page views90
Page last viewedThu Dec 08 08:13:41 UTC 2016
Pages29
Paragraphs1022
Words9236

Comments