N64FlashcartMenu
Loading...
Searching...
No Matches
mp3_player.h
Go to the documentation of this file.
1
7#ifndef MP3_PLAYER_H__
8#define MP3_PLAYER_H__
9
10#include <stdbool.h>
11
24
30void mp3player_mixer_init(void);
31
40
46void mp3player_deinit(void);
47
57
63void mp3player_unload(void);
64
73
81bool mp3player_is_playing(void);
82
90bool mp3player_is_finished(void);
91
100
106void mp3player_stop(void);
107
116
124void mp3player_mute(bool mute);
125
135
143float mp3player_get_duration(void);
144
152float mp3player_get_bitrate(void);
153
162
170float mp3player_get_progress(void);
171
172#endif /* MP3_PLAYER_H__ */
mp3player_err_t mp3player_load(char *path)
Load an MP3 file.
Definition mp3_player.c:156
void mp3player_mute(bool mute)
Mute or unmute the MP3 player.
Definition mp3_player.c:280
void mp3player_deinit(void)
Deinitialize the MP3 player.
Definition mp3_player.c:150
float mp3player_get_progress(void)
Get the current playback progress.
Definition mp3_player.c:343
mp3player_err_t mp3player_play(void)
Start playback of the MP3 file.
Definition mp3_player.c:249
mp3player_err_t mp3player_process(void)
Process the MP3 player.
Definition mp3_player.c:228
void mp3player_mixer_init(void)
Initialize the MP3 player mixer.
Definition mp3_player.c:118
int mp3player_get_samplerate(void)
Get the sample rate of the MP3 file.
Definition mp3_player.c:335
mp3player_err_t mp3player_init(void)
Initialize the MP3 player.
Definition mp3_player.c:125
float mp3player_get_duration(void)
Get the duration of the MP3 file.
Definition mp3_player.c:319
bool mp3player_is_finished(void)
Check if the MP3 player has finished playing.
Definition mp3_player.c:245
mp3player_err_t mp3player_seek(int seconds)
Seek to a specific position in the MP3 file.
Definition mp3_player.c:285
void mp3player_stop(void)
Stop playback of the MP3 file.
Definition mp3_player.c:265
mp3player_err_t mp3player_toggle(void)
Toggle playback of the MP3 file.
Definition mp3_player.c:271
float mp3player_get_bitrate(void)
Get the bitrate of the MP3 file.
Definition mp3_player.c:327
mp3player_err_t
MP3 file error enumeration.
Definition mp3_player.h:17
@ MP3PLAYER_ERR_INVALID_FILE
Definition mp3_player.h:22
@ MP3PLAYER_OK
Definition mp3_player.h:18
@ MP3PLAYER_ERR_OUT_OF_MEM
Definition mp3_player.h:19
@ MP3PLAYER_ERR_IO
Definition mp3_player.h:20
@ MP3PLAYER_ERR_NO_FILE
Definition mp3_player.h:21
bool mp3player_is_playing(void)
Check if the MP3 player is playing.
Definition mp3_player.c:241
void mp3player_unload(void)
Unload the current MP3 file.
Definition mp3_player.c:220