Skip to content

Latest commit

 

History

History
82 lines (45 loc) · 3.23 KB

index.rst

File metadata and controls

82 lines (45 loc) · 3.23 KB

Playlist

:link_to_translation:zh_CN:[中文]

A playlist is a list of audio files that can be played back either sequentially or in a specified order.

The :cppsdcard_scan function in the :component_file:`playlist/include/sdcard_scan.h` scans the audio files in a microSD card and generate a playlist of files. You can specify file depth and filter out file types when scanning. The playlist instances can be saved to a variety of storage media. The following are the supported storage media:

After scanning the audio files, you can use the playlist_operator_handle_t handle to call the corresponding functions to create, save, print playlists, and obtain the path corresponding to the audio ID. Currently, most of the storage media mentioned in this document support the above functions.

See the description below for the API details.

Scanning MicroSD Card

The :cppsdcard_scan function can scan audio files in a specified path and generate playlists. It supports the scanning of files at a specified depth and filtering of file types. Then, the playlist can be saved to the specified storage medium using a callback function.

Application Example

  • player/pipeline_sdcard_mp3_control
  • cli

Saving Playlist

Saving to MicroSD Card

The playlist can be stored in the microSD card. Functions, such as those to save and display the playlist, can be called through the playlist_operator_handle_t handle.

Application Example

  • player/pipeline_sdcard_mp3_control
  • cli

Saving to DRAM

The playlist can be stored in DRAM. Functions, such as those to save and display the playlist, can be called through the playlist_operator_handle_t handle.

Saving to NVS Partition in Flash

The playlist can be stored in the NVS partition in flash. Functions, such as those to save and display the playlist, can be called through the playlist_operator_handle_t handle.

Saving to DATA_UNDEFINED Partition in Flash

The playlist can be stored in the DATA_UNDEFINED partition (see Partition Tables for details) in flash. Functions, such as those to save and display the playlist, can be called through the playlist_operator_handle_t handle. Please add the two partitions whose subtypes are 0x06 and 0x07 to the flash partition table first.

Playlist Manager

Playlist Manager manages the above playlists and can add multiple playlist instances to the playlist_handle_t handle.