esp32-audio-player
0.1.0
Audio player engine for ESP32
Loading...
Searching...
No Matches
playlist.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: Apache-2.0
8
#pragma once
9
10
#include "
audio_player/base.h
"
11
12
#ifdef __cplusplus
13
extern
"C"
{
14
#endif
15
16
typedef
struct
{
17
char
path[
CORE_PATH_MAX
];
18
char
title[128];
19
char
artist[128];
20
uint32_t
start_ms
;
21
uint32_t
end_ms
;
22
}
playlist_entry_t
;
23
24
typedef
struct
playlist
playlist_t
;
25
26
playlist_t
*
playlist_load_m3u
(
const
char
*path);
27
playlist_t
*
playlist_load_cue
(
const
char
*path);
28
playlist_t
*
playlist_new
(
void
);
29
int
playlist_add
(
playlist_t
*p,
const
playlist_entry_t
*e);
30
uint32_t
playlist_count
(
const
playlist_t
*p);
31
const
playlist_entry_t
*
playlist_get
(
const
playlist_t
*p, uint32_t index);
32
int
playlist_save_m3u8
(
const
playlist_t
*p,
const
char
*path);
33
void
playlist_free
(
playlist_t
*p);
34
35
#ifdef __cplusplus
36
}
37
#endif
base.h
Base definitions shared by every core module: error codes, memory, logging, locks.
CORE_PATH_MAX
#define CORE_PATH_MAX
Maximum path length used by the core (bytes, UTF-8, including terminator).
Definition
base.h:39
playlist_save_m3u8
int playlist_save_m3u8(const playlist_t *p, const char *path)
atomic (tmp + rename)
playlist_count
uint32_t playlist_count(const playlist_t *p)
playlist_load_cue
playlist_t * playlist_load_cue(const char *path)
entries are virtual tracks
playlist_add
int playlist_add(playlist_t *p, const playlist_entry_t *e)
playlist_new
playlist_t * playlist_new(void)
playlist_free
void playlist_free(playlist_t *p)
playlist_load_m3u
playlist_t * playlist_load_m3u(const char *path)
playlist_t
struct playlist playlist_t
Definition
playlist.h:24
playlist_get
const playlist_entry_t * playlist_get(const playlist_t *p, uint32_t index)
playlist_entry_t
Definition
playlist.h:16
playlist_entry_t::end_ms
uint32_t end_ms
0 = until end of file
Definition
playlist.h:21
playlist_entry_t::start_ms
uint32_t start_ms
CUE virtual track start (0 for whole file)
Definition
playlist.h:20
src
audio_player
playlist.h
Generated by
1.9.8