|
esp32-audio-player 0.1.0
Audio player engine for ESP32
|
Folder browsing without the index: works right after inserting a card. More...
#include "audio_player/base.h"

Go to the source code of this file.
Data Structures | |
| struct | fs_entry_t |
Typedefs | |
| typedef struct fs_listing | fs_listing_t |
Enumerations | |
| enum | fs_entry_type_t { FS_ENTRY_DIR = 0 , FS_ENTRY_AUDIO , FS_ENTRY_PLAYLIST , FS_ENTRY_CUE } |
Functions | |
| fs_listing_t * | fs_list_dir (const char *path, uint32_t max_entries) |
| Read and sort a directory. Returns NULL on error. Limit protects RAM on huge folders. | |
| uint32_t | fs_listing_count (const fs_listing_t *l) |
| bool | fs_listing_truncated (const fs_listing_t *l) |
| True when the directory has entries the listing left out: more than max_entries, or memory ran out while reading. | |
| const fs_entry_t * | fs_listing_get (const fs_listing_t *l, uint32_t index) |
| uint32_t | fs_listing_find_letter (const fs_listing_t *l, uint32_t letter) |
| uint32_t | fs_listing_audio_paths (const fs_listing_t *l, const char *dir, char(*out)[CORE_PATH_MAX], uint32_t max) |
| Paths of all audio files in this directory (not recursive) in display order. | |
| void | fs_listing_free (fs_listing_t *l) |
Folder browsing without the index: works right after inserting a card.
Lists subdirectories first, then audio files and playlists, sorted with collate_cmp. Hidden entries (starting with '.') and system folders are skipped.
| typedef struct fs_listing fs_listing_t |
| enum fs_entry_type_t |
| fs_listing_t * fs_list_dir | ( | const char * | path, |
| uint32_t | max_entries | ||
| ) |
Read and sort a directory. Returns NULL on error. Limit protects RAM on huge folders.
| uint32_t fs_listing_audio_paths | ( | const fs_listing_t * | l, |
| const char * | dir, | ||
| char(*) | out[CORE_PATH_MAX], | ||
| uint32_t | max | ||
| ) |
Paths of all audio files in this directory (not recursive) in display order.
| uint32_t fs_listing_count | ( | const fs_listing_t * | l | ) |
| uint32_t fs_listing_find_letter | ( | const fs_listing_t * | l, |
| uint32_t | letter | ||
| ) |
| void fs_listing_free | ( | fs_listing_t * | l | ) |
| const fs_entry_t * fs_listing_get | ( | const fs_listing_t * | l, |
| uint32_t | index | ||
| ) |
| bool fs_listing_truncated | ( | const fs_listing_t * | l | ) |
True when the directory has entries the listing left out: more than max_entries, or memory ran out while reading.
The listing holds the first entries read, sorted.