當前位置: 首頁 > 工業(yè)電氣產(chǎn)品 > 端子與連接器 > 線路板連接器 > FFC連接器
發(fā)布日期:2022-04-17 點擊率:35
Atmel provides detailed source code for an MP3 decoder that runs on its AVR32 UC3 MCU. This article explains in detail how to configure and use it.
This article will help the reader to use the AVR32? UC3 Audio Decoder over USB software. This software includes a software MP3 decoder, a file system, and USB host mass storage class support.
For more information about the AVR32 architecture, please refer to the appropriate documents available at http://www.atmel.com/avr32.
License
The MP3 audio decoder (MAD) is distributed under the terms of the GPL. The JPEG decoder (IJG) license can be found in the file /SERVICES/PICTURES/JPG/IJG/license.txt. The memory manager (dlmalloc) license can be found in the file /SERVICES/MEMORY/MEMORY_MANAGER/DLMALLOC/license.txt.
Requirements
The software referenced in this article requires several components:
A computer running Microsoft? Windows? 2000/XP/Vista or Linux?
AVR32 Studio and the GNU toolchain (GCC) or IAR Embedded Workbench? for the AVR32 compiler
A JTAGICE mkII or AVROne! debugger
Theory of operation
Overview
Today, embedded MP3 decoders are everywhere for consumers listening to audio content on mobile devices.
MP3
MPEG-1 Audio Layer III, more commonly referred to as MP3, is a digital audio encoding format using a form of lossy data compression. Several bit rates are specified in the MPEG-1 Audio Layer III standard: 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, and 320 Kbps. The available sampling frequencies are 32, 44.1, and 48 KHz, and a sample rate of 44.1 KHz is almost always used. 128 Kbps bitrate files are slowly being replaced with higher bitrates such as 192 Kbps, with some being encoded up to the MP3 maximum of 320 Kbps.
A tag, in a compressed audio file, is a section of the file which contains metadata such as the title, artist, album, track number, or other information about the file's contents.
The chosen MP3 decoder here is MAD (libmad), a high-quality MPEG audio decoder. It currently supports MPEG-1 and the MPEG-2 extension to lower sampling frequencies, as well as the so-called MPEG 2.5 format. All three audio layers (Layer I, Layer II, and Layer III) are fully implemented. MAD does not yet support MPEG-2 multichannel audio (although it should be backward compatible with such streams).
Block diagram
Figure 1 shows the UC3 interfacing to the USB stick, and outputting the audio stream from the key to the external DAC. The user can control the player using a keypad, or running a customizable Human Machine Interface (HMI).

Figure 1: Block diagram.
Software architecture
Figure 2 shows the basic software architecture of the application.

Figure 2: Software architecture.
The application does not require any operating system to run. The main() function is in charge of calling the software tasks (using a scheduler) that make audio decoding, HMI, and USB management possible. There are five tasks:
The Communication Task contains the HMI of the application. This task holds the real intelligence of the user application and interfaces directly with the Audio Interface (AI). This is the task that the user should modify for their own application.
Audio Interface Task: This task handles dynamic support for any newly plugged-in device types. For example, if a new device, using another class than the mass storage class, is plugged in, and if this class is supported by the application, then this task will tell the Audio Interface to link the Audio Interface API to a low level API that supports this class. All the mechanisms in place to dynamically link an API to this abstract API are located in the file: /SERVICES/AUDIO/AUDIO_PLAYER/audio_interface.[c|h]. In this application, only the USB mass storage class is implemented. Therefore, this function is not used.
The last task is a macro used for feature tasks. In the MP3 audio player using USB, the modules involved will be the MP3 decoder, the USB stack, and the host mass storage task:
The MP3 Codec Task: This task is in charge of Audio Decoding management.
The USB Task: This task handles the USB stack and events.
The Host Mass Storage Task: This task will check for newly connected devices and initialize them using the USB mass storage class.
The main loop of the application is a simple free-running task scheduler:
while (TRUE)
{
ai_task();
com_task();
task();
The Audio Interface can also support iPod audio decoding through the USB audio class. Please refer to the application note AVR32730: AVR32 UC3 iPod Support Over USB for more information.
Audio Interface API
The audio player is a generic audio player interface and is designed to support multiple audio formats besides MP3.
Overview
The Audio Interface manages disk navigation, audio navigation, and audio control. 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 two ways:
Using asynchronous functions, the results or effects of which may not be produced in a single iteration, 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 risk of audio underrun. Asynchronous functions always have the "ai_async" prefix.
Note that only one asynchronous function can be used at a time.
Using 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 underruns 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 example, the command which returns the number of drives is:
ai_async_nav_drive_nb() in the asynchronous interface
ai_nav_drive_nb() in the synchronous interface
Using asynchronous functions shall be the preferred solution in order to avoid audio underruns.
Audio Interface (AI) architecture
The AI commands to interface the audio player are divided into three categories (See Figure 3):
Disk navigation (Disk Nav) to browse into the tree architectures of the USB device
Audio navigation (Audio Nav) to manage a list of playable songs
Audio control (Audio CTRL) to control the audio stream (such as play, pause, and fast forward)

Figure 3: Audio player navigators overview.
Disk Navigator: "Browse into the tree architectures of the mass storage device"
The Disk Navigator is similar to a file explorer. It is used to navigate in the tree architectures of the connected USB device. It will hide all files whose extension differs from *.mp3, *.pls, *.smp, or *.m3u. The file extension filtering is automatically updated according to the modules selected (such as MP3 and playlists).
The Disk Navigator is totally independent from the Audio Navigator.
The commands associated with this module are used to navigate into the disks/directories, and to synchronize the selected file/folder with the Audio Nav module. This synchronization is made with two commands: ai_nav_getplayfile and ai_audio_nav_playfile. See the "Disk Navigation" section later in this article for a complete list of commands.
Audio Navigator: "Manage a list of playable songs"
The Audio Navigator deals with a list of files. This list is defined once an ai_audio_nav_playfile command is executed. This command sets the list of files to be played according to the current selection in the Disk Navigator and to the Audio Navigator ai_audio_nav_expmode_set option.
When the ai_audio_nav_playfile command is executed:
If the Disk Navigator is currently pointing to a playlist (*.m3u), then only the files of this playlist will be included in the Audio Navigator file list.
If the Disk Navigator is currently pointing to a disk or a file, then the file list will depend on the audio explorer mode (set by the ai_audio_nav_expmode_set command) (See Table 1).
If the Disk Navigator is currently pointing to a folder, the Audio Navigator will not enter into it. It will look for the first file that is in the current directory and build its file list according to the previous rules.
If the Disk Navigator is not pointing to any files or folders (which is the case after a mount or a goto) when a directory or a playlist is selected, then it will select the first file of the file list.
| Explorer Mode | Behavior |
| AUDIO_EXPLORER_MODE_DISKS | Builds a file list off all playable songs of all disks, and starts playing from the selected file. |
| AUDIO_EXPLORER_MODE_DISK | Builds a file list off all playable songs of the current disk only, and starts playing from the selected file. |
| AUDIO_EXPLORER_MODE_DIRONLY | Builds a file list of all playable songs that are contained in the current directory, and starts playing from the selected file. Sub directories are ignored. |
| AUDIO_EXPLORER_MODE_DIRSUB | Builds a file list off all playable songs that are contained in the current directory and its sub-directories, and starts playing from the selected file. |
Table 1: ai_audio_nav_expmode_set command behavior.
Note that the playing order can be changed at compilation time by enabling a define. This is fully explained in the "Example 3 — Change the playing order" section later in this article.
once the file list is set, two main commands are available to navigate into it:
ai_audio_nav_next (select next file).
ai_audio_nav_previous (select previous file).
Options can also be defined for the Audio Navigator (to change the repeat mode, or enable/disable the shuffle mode).
To synchronize the Disk Navigator with the Audio Navigator, i.e., to make the Disk Navigator select the file played by the Audio Navigator, the command ai_nav_getplayfile can be used. See the "Audio Navigation" section later in this article for a complete list of commands.
Audio Control: "control the audio stream
(play/pause/fast forward/...)"
This module controls the audio stream of the selected file (selected by the Audio Navigator). Commands like play, pause, stop, fast forward, and fast rewind are available. See the "Audio Control" section later in this article for a complete list of commands (See Table 2).
Limitations
Speed
Speed navigation (such as file browsing) in directories may be affected if:
A high-bitrate file is played at the same time.
Directories have many files.
The playlist includes many files.
Disk navigation
The exploration is based on a selector displacement. The file list is the list of the files in the current directory according to the extension filter (i.e., .mp3, .m3u, .pls, and .smp).
The file list:
Is updated when you exit or enter a directory or a disk
Starts with the directories then the files
Is sorted in the creation order
| Command Name | Input | Output | Description | |
| Return | Extra Result | |||
| ai_get_product_id | – | Product ID | – | Returns the product identifier (USB PID) of the connected device (if available). |
| ai_get_vendor_id | – | Vendor ID | – | Returns the vendor identifier (USB VID) of the connected device (if available). |
| ai_get_serial_number | – | Length of the serial number in bytes | Serial number | Returns the serial number of the connected device (if available). |
| ai_nav_drive_nb | – | Number of drive | – | Returns the serial number of disk available. |
| ai_nav_drive_set | Drive Number | True or false | – | Selects the disk but does not mount it: (0 for drive 0, 1 for drive 1...). Returns false in case of error. |
| ai_nav_drive_get | – | Drive Number | – | Returns the selected disk number. |
| ai_nav_drive_mount | – | True or false | – | Mounts the selected disk. Returns false in case of error. |
| ai_nav_drive_total_space | – | Capacity of the drive | – | Returns the total space, in bytes and available on the device. |
| ai_nav_drive_free_space | – | Free space on the drive | – | Returns the free space, in bytes, available on the device. |
| ai_nav_dir_root | – | True or false | – | Initializes the file list on the root directory. Return false in case of error. |
| ai_nav_dir_cd | – | True or false | – | Enters in the current directory selected in file list. Return false in case of error. |
| ai_nav_dir_gotoparent | – | True or False | – | Exits current directory and goes to the parent's directory. Then selects the folder from which it just exits, rather than selecting the first file of the parent directory. This simplifies navigation since the user firmware does not have to memorize the information. Returns false in case of error. |
| ai_nav_file_isdir | – | True or false | – | Returns true if the selected file is a directory, otherwise returns false. |
| ai_nav_file_goto | Position in the list | True or false | – | Goes to a position in file list (0 for position 0, 1 for position 1...). Returns false in case of error. |
| ai_nav_file_pos | – | File position | – | Returns the file position of the selected file in the current directory. Returns FS_NO_SEL if no file is selected. |
| ai_nav_file_nb | – | Number of audio files | – | Returns the number of audio files in the file list. Audio files are all the files which extensions matches *.mp3 or *.wma (it depends on the file format supported). There is a specific command for playlist files, see below. |
| ai_nav_dir_nb | – | Number of directories | – | Returns the number of directories in the file list. |
| ai_nav_playlist_nb | – | Number of playlists | – | Returns the number of playlists in the file list. The playlists are all the files matching with the extension *m3u, *.pls and *.smp. |
| ai_nav_dir_name | – | Length of the string in bytes | UNICODE name | Returns the name of the current directory. |
| ai_nav_file_name | – | Length of the string in bytes | UNICODE name | Returns the name of the selected file. |
| ai_nav_file_info_type | – | File type | – | Returns the type of the audio file selected. |
| ai_nav_file_info_version | – | Version number | – | Returns the version of the metadata storage method used for the selected audio file if available, otherwise, returns 0. |
| ai_nav_file_info_title | – | Length of the string in bytes | UNICODE title | Returns the title of the selected audio file if available, otherwise, returns an empty string. |
| ai_nav_file_info_artist | – | Length of the string in bytes | UNICODE artist | Returns the artist's name of the selected audio file if available, otherwise, returns an empty string. |
| ai_nav_file_info_album | – | Length of the string in bytes | UNICODE album | Returns the album's name of the selected audio file if available, otherwise, returns an empty string. |
| ai_nav_file_info_year | – | Year | – | Returns the year of the selected audio file if available, otherwise, returns 0. |
| ai_nav_file_info_track | – | Length of the string in bytes | UNICODE info | Returns the track information of the selected audio file if available, otherwise, returns an empty string. |
| ai_nav_file_info_genre | – | Length of the string in bytes | UNICODE genre | Returns genre of the selected audio file if available, otherwise, returns an empty string. |
| ai_nav_file_info_duration | – | Duration of the track | – | Returns the total time of the selected audio file in milliseconds if available, otherwise, returns 0. |
| ai_nav_file_image | Max image size | Image size | -True or false -A pointer on the image data | Returns information and a pointer on the bitmap of the embedded cover art of the selected audio file. Returns false in case of error. |
| ai_nav_getoplayfile | – | True or false | – | Selects the file selected by the navigator. This command is the only link between these two navigators. Returns false in case of error. |
Table 2: Disk Navigator commands.
Audio navigation
This navigator sets the list of files to be played. It can be seen as a playlist. Before accessing this navigator, an ai_audio_nav_playfile command must be issued.
| Command Name | Input | Output | Description | |
| Return | Extra Result | |||
| ai_audio_nav_playfile | — | True or false | — | This command sets the audio file list according to the current mode of the audio navigator and plays (or sets to pause) the file selected in the disk navigator. In other words, it synchronizes the audio navigator with the disk navigator and plays (or sets to pause) the selected file from the disk navigator. Note that this command returns immediately and does not wait until the current track is completely played. This command does not change the current options (repeat/random/expmode). It is the opposite of the command ai_nav_getplayfile. Returns false in case of error. |
| ai_audio_context_save | — | Structure context | — | — True or false — The length of the structure in bytes |
| ai_audio_context_restore | Structure Context | True or false | — | Restores an audio context (eventually restart playing). |
| ai_audio_nav_next | — | True or false | — | Jump to next audio file available in the list. The next song file is chosen according to the current options (repeat/random/mode). |
| ai_audio_nav_previous | — | True or false | — | Jumps to previous audio file available in the list. The next song file is chosen according to the current options (repeat/random/mode). |
| ai_audio_nav_eof_occur | — | True or false | — | This routine must be called once a track ends. It will choose, according to the options (repeat/random/expmode), the next file to play. |
| ai_audio_nav_nb | — | Number of audio files present in the list | — | Returns the number of audio files present in the list. |
| ai_audio_nav_getpos | — | File position | — | Returns the file position of the selected file in the list. |
| ai_audio_nav_setpos | File position | True or false | — | Goes to a position in the list. |
| ai_audio_nav_repeat_get | — | Ai_repeat_mode | — | Returns the current repeat mode (no repeat, repeat single, repeat folder, repeat all). |
| ai_audio_nav_repeat_set | Ai_repeat_mode | — | — | Sets the current repeat mode (no repeat single, repeat folder, repeat all). |
| ai_audio_nav_shuffle_get | — | Ai_shuffle_mode | — | Returns the current shuffle mode (no shuffle, shuffle folder, shuffle all). |
| ai_audio_nav_shuffle_set | Ai_shuffle_mode | — | — | Sets the current shuffle mode (no shuffle, shuffle folder, shuffle all). |
| ai_audio_nav_expmode_get | — | Ai_explorer_mode | — | Returns the current explorer mode (all disks, one disk, directory only, directory + sub directories). |
| ai_audio_nav_expmode_set | Ai_explorer_mode | — | — | Sets the current explorer mode (all disks, one disk, directory only, directory + sub directories). This mode cannot be changed while an audio file is being played. |
| ai_audio_nav_getname | — | Length of the string in bytes | UNICODE name | Returns the name of selected file. |
| ai_audio_nav_file_info_type | — | File type | — | Returns the type of the audio file selected. |
| ai_audio_nav_file_info_version | — | Version number | — | Returns the version of the metadata storage method used for the selected audio file if available, otherwise, returns 0. |
| ai_audio_nav_file_info_title | — | Length of the string in bytes | UNICODE title | Returns the title of the selected audio file if available, otherwise, returns and empty string. |
| ai_audio_nav_file_artist | — | Length of the string in bytes | UNICODE artist | Returns the artist's name of the selected audio file if available, otherwise, returns an empty string. |
| ai_audio_nav_file_info_album | — | Length of string in bytes | UNICODE album | Returns the albums name of the selected audio file if available, otherwise, returns an empty string. |
| ai_audio_nav_file_info_year | — | Year | — | Returns the year of the selected audio file if available, otherwise, returns 0. |
| ai_audio_nav_file_info_track | — | Length of the string in bytes | UNICODE info | Returns the track information of the selected audio file if available, otherwise, returns an empty string. |
| ai_audio_nav_file_info_genre | — | Length of the string in bytes | UNICODE genre | Returns the genre of the selected audio file if available, otherwise, returns an empty string. |
| ai_audio_nav_file_info_duration | — | Duration of the track | — | Returns the total time of the selected audio file in milliseconds if available, otherwise, returns 0. |
| ai_audio_nav_file_info_image | Max image size | Image size | —True or false — A pointer on the image data | Returns information and a pointer on a bitmap of the embedded cover art of the selected audio file. Returns false in case of error. |
Table 3: Audio Navigator commands.
Modes used by the interface
Ai_repeat_mode defines the repeat mode:
| — | AUDIO_REPEAT_OFF: no repeat |
| — | AUDIO_REPEAT_TRACK: repeat the current track |
| — | AUDIO_REPEAT_FOLDER: repeat the current folder |
| — | AUDIO_REPEAT_ALL: repeat the list of files |
Ai_shuffle_mode defines the shuffle/random mode:
| — | AUDIO_SHUFFLE_OFF: no shuffle |
| — | AUDIO_SHUFFLE_FOLDER: shuffle into the current folder |
| — | AUDIO_SHUFFLE_ALL: shuffle into the list of files |
Ai_explorer_mode defines the explorer mode (see the "Example 3 — Change the playing order" section later in this article for more information).
Audio Control
The audio controller is used to control the audio stream of the audio file selected by the Audio Navigator.
| Command Name | Input | Output | Description | |
| Return | Extra Result | |||
| ai_audio_ctrl_stop | — | True or false | — | Stops the audio. |
| ai_audio_ctrl_resume | — | True or false | — | Plays or resumes play after an ai_audio_ctrl_pause or an ai_audio_ctrl_stop command. |
| ai_audio_ctrl_pause | — | 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. |
| ai_audio_stop_ffw_frw | — | True or false | — | Stops fast forwarding/rewinding and set the audio player into the previous mode (play or resume). Function not yet implemented. |
Table 4: Audio Control commands.
Using asynchronous or synchronous API
Using synchronous functions is straightforward. once finished, synchronous functions return, with or without a result. Using asynchronous functions is more complicated; they may not produce the requested task in a single shot. Thus, these functions need some other functions to operate properly:
void ai_async_cmd_task (void): This function is the entry point of all asynchronous commands. It must be called to execute the current state of the internal state machine of the current asynchronous function.
Bool is_ai_async_cmd_finished (void): This function returns TRUE if the last command is finished.
U8 ai_async_cmd_out_status (void): Returns the status of the last executed command (CMD_DONE, CMD_EXECUTING or CMD_ERROR).
U32 ai_async_cmd_out_u32 (void): If the last executed command should return a 32-bit result or less, this function will return this value.
U64 ai_async_cmd_out_u64 (void): If the last executed command should return a 64-bit result, this function will return this value.
16 ai_async_cmd_out_SizeArrayU8 (void): If the last executed command should return an extra result (e.g., a song name), this function returns the size in bytes of the extra result (no size limit).
U8 ai_async_cmd_out_PtrArrayU8 (void): Returns a pointer to the extra result (assuming that the last executed command returns an extra result). This pointer can be freed by the application with the ai_async_cmd_out_free_ArrayU8() function.
void ai_async_cmd_out_free_ArrayU8 (void): This function may be called to free the allocated buffer that holds the extra result. Note that the Audio Interface will automatically do this before executing a new command that needs extra results. This ensures that the application will not have memory leakage. Allowing the application calling this function to free the extra results sooner and improve allocated memory usage. Figure 4 shows the flow of the asynchronous function use.

Figure 4: Asynchronous function flow.
Examples
The code for the next a three examples can be found in the following directories:

Let's take this disk as disk number 0 for the system.
Example 1 - Play "file1.mp3"
| Command Order | Command Name |
| 0 | ai_nav_drive_nb(): returns 1 disk. |
| 1 | ai_nav_drive_set(0): selects the disk 0. |
| 2 | ai_nav_drive_mount(): mounts the select disk 0. |
| 3 | ai_nav_file_goto(0): goes to file position 0 |
| 4 | ai_nav_file_name(): returns the name dir1 |
| 5 | ai_nav_file_isdir(): returns true, the current file is a directory. |
| 6 | ai_nav_file_goto(1): goes to file position 1 |
| 7 | ai_nav_file_name(): returns the name dir2 |
| 8 | ai_nav_file_goto(2): goes to file position 2 |
| 9 | ai_nav_file_name():returns the name file1.mp3 |
| 10 | ai_audio_nav_playfile(): selects the file selected by the file nagivator (file1.mp3) |
| 11 | ai_audio_ctrl_resume(): plays the selected file. |
| 12 | Wait for 10 seconds to listen to the beginning of the playback. |
| 13 | ai_nav_file_goto(3): goes to file position 3 |
| 14 | ai_nav_file_name(): returns the name file2.wma |
Table 5: Example: Play "file1.mp3."
Example 2 — Play while browsing
| Command Order | Command Name |
| 0 | ai_nav_drive_nb(): returns 1 disk. |
| 1 | ai_nav_drive_set(0): selects the disk 0. |
| 2 | 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 the file position 0 |
| 8 | ai_nav_file_name(): returns the name "file5.wma". (Notice the difference with Table 5 - step #4) |
| 9 | ai_nav_file_goto(1): goes to file position 1 |
| 10 | ai_nav_file_name(): returns the name "file6.mp3" |
| 11 | ai_audio_ctrl_stop(): stops the audio |
Table 6: Example: Play while browsing.
Example 3 — Change the playing order
The playing order can be changed at compilation time by enabling the NAV_AUTO_FILE_IN_FIRST define (see the "Project Configuration" section later in this article).
| Command Order | Command Name |
| 0 | ai_nav_drive_nb(): returns 1 disk. |
| 1 | ai_nav_drive_set(0): selects the disk 0. |
| 2 | ai_nav_drive_moutn(): mounts the select disk 0. |
| 3 | ai_audio_nav_playfile(): selects a file in the audio player. |
| 4 | ai_audio_ctrl_resume(): plays the selected file. |
Table 7: Playfile sequence.
If the NAV_AUTO_FILE_IN_FIRST define is not set, the sequence will play audio files in the order shown in Table 8.
| Command Order | Command Name | Parent directory path |
| 0 | file5.wma | /dir1/dir3/ |
| 1 | file6.mp3 | /dir1/dir3/ |
| 2 | file4.mp3 | /dir1/ |
| 3 | file7.mp3 | /dir2/ |
| 4 | file1.mp3 | / |
| 5 | file2.wma | / |
| 6 | file3.wma | / |
Table 8: Playfile sequence with NAV_AUTO_FILE_IN_FIRST undefined.
If this define is set, the sequence will play audio files starting with files on the root, as shown in Table 9.
| Command Order | Command Name | Parent directory path |
| 0 | file1.mp3 | / |
| 1 | file2.wma | / |
| 2 | file3.wma | / |
| 3 | file4.mp3 | /dir1/ |
| 4 | file5.wma | /dir1/dir3/ |
| 5 | file5.mp3 | /dir1/dir3/ |
| 6 | file7.mp3 | /dir2/ |
Table 9: Playfile sequence with NAV_AUTO_FILE_IN_FIRST defined.
Source code architecture
Package
AUDIO-PLAYER-
下一篇: PLC、DCS、FCS三大控
上一篇: Microcontrollers Ena