X hits on this document

PDF document

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

82 views

0 shares

3 downloads

0 comments

16 / 29

Example 2 - Play while browsing

Table 5-6. Command

Example: play while browsing

Order

Command Name

0 1 2

ai_nav_drive_nb(): returns 1 disk. ai_nav_drive_set(0): selects the disk 0. ai_nav_drive_mount(): mounts the select disk 0.

3

ai_audio_nav_playfile(): selects a file in the audio navigator. By default it will seek inside the directories to play the first file which is “file5.wma” in our case.

4

ai_audio_ctrl_resume(): plays the selected file.

5

ai_nav_getplayfile(): synchronizes the disk navigator with the audio navigator. Now the disk navigator is pointing on the “file5.wma” file.

6

ai_nav_file_nb() + ai_nav_dir_nb() + ai_nav_playlist nb(): gets the total number of entries (files+folder+playlist) in the current directory (dir3).

_

7

ai_nav_file_goto(0): goes to file position 0

8

ai_nav_file_name(): returns the name “file5.wma“. (Notice the difference with Figure 5.8.1 - step #4)

9 10 11

ai_nav_file_goto(1): goes to file position 1 ai_nav_file_name(): returns the name “file6.mp3“ ai_audio ctrl stop(): stops the audio

_

_

5.8.1

5.8.2

Example 1 - Play “file1.mp3” Table 5-5.

Example: play “file1.mp3”

Command Order

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

a i _ n Command Name ai_nav_drive_nb(): returns 1 disk. ai_nav_drive_set(0): selects the disk 0. ai_nav_drive_mount(): mounts the select disk 0. ai_nav_file_goto(0): goes to file position 0 ai_nav_file_name(): returns the name dir1 ai_nav_file_isdir(): returns true, the current file is a directory. ai_nav_file_goto(1): goes to file position 1 ai_nav_file_name(): returns the name dir2 ai_nav_file_goto(2): goes to file position 2 ai_nav_file_name(): returns the name file1.mp3 ai_audio_nav_playfile(): selects the file selected by the file navigator (file1.mp3) ai_audio_ctrl_resume(): plays the selected file. Wait for 10 seconds to listen to the begining of the playback. a v _ f i l e _ g o t o ( 3 ) : g o e s t o f i l e p o s i t i o n 3 a i _ n a v _ f i l e _ n a m e ( ) : r e t u r n s t h e n a m e f i l e 2 . w m a

16

AVR32709

7817D–AVR32–05/11

Document info
Document views82
Page views82
Page last viewedSun Dec 04 13:09:23 UTC 2016
Pages29
Paragraphs1022
Words9236

Comments