◆ PlayMode
Enumerator |
---|
PlayModeNormal | Normal play mode.
|
PlayModeShuffle | Shuffle play mode.
|
◆ RepeatMode
Enumerator |
---|
RepeatModeOff | Play all track at once.
|
RepeatModeOn | Play all track repeat.
|
◆ ListType
Enumerator |
---|
ListTypeAllTrack | All track (which is written in playlist file) list.
|
ListTypeArtist | Artist categorized track list.
|
ListTypeAlbum | Album categorized track list.
|
ListTypeUser | User defined track list.
|
◆ Playlist()
◆ init()
bool init |
( |
const char * |
playlist_path | ) |
|
Init playlist.
- Parameters
-
[in] | playlist_path | Path to playlist file |
- Return values
-
true | : success |
false | : failure |
◆ setPlayMode()
Set play mode.
- Parameters
-
[in] | play_mode | PlayModeNormal, PlayModeShuffle |
- Return values
-
true | : success |
false | : failure |
◆ setRepeatMode()
Set repeat mode.
- Parameters
-
[in] | repeat_mode | RepeatModeOff, RepeatModeOn |
- Return values
-
true | : success |
false | : failure |
◆ select()
bool select |
( |
ListType |
type, |
|
|
FAR const char * |
key_str |
|
) |
| |
Select playlist to play.
- Note
- If type is ListTypeAllTrack, key_str is not cared.
- Parameters
-
[in] | type | ListTypeAllTrack, ListTypeArtist, ListTypeAlbum, ListTypeUser |
[in] | key_str | Key string to select playlist. Author name, album name, etc... |
- Return values
-
true | : success |
false | : failure |
◆ updatePlaylist()
bool updatePlaylist |
( |
ListType |
type, |
|
|
FAR const char * |
key_str |
|
) |
| |
Update playlist.
Create or update playlist. Target playlist should be selected by parameters.
- Note
- If type is ListTypeAllTrack, key_str is not cared.
- Parameters
-
[in] | type | ListTypeAllTrack, ListTypeArtist, ListTypeAlbum, ListTypeUser |
[in] | key_str | Key string to filter playlist. Author name, album name, etc... |
- Return values
-
true | : success |
false | : failure |
◆ addTrack()
bool addTrack |
( |
FAR const char * |
key_str, |
|
|
int |
track_no |
|
) |
| |
Add track to playlist.
- Note
- Target playlist is always user defined playlist(ListTypeUser).
- Parameters
-
[in] | key_str | Key string to filter playlist. Author name, album name, etc... |
[in] | track_no | Track number of which would like to add to playlist. |
- Return values
-
true | : success |
false | : failure |
◆ removeTrack()
bool removeTrack |
( |
FAR const char * |
key_str, |
|
|
uint32_t |
remove_pos |
|
) |
| |
Remove track from playlist.
- Note
- Target playlist is always user defined playlist(ListTypeUser).
- Parameters
-
[in] | key_str | Key string to filter playlist. Author name, album name, etc... |
[in] | remove_pos | Track number of which would like to remove from playlist. |
- Return values
-
true | : success |
false | : failure |
◆ updateTrackDb()
bool updateTrackDb |
( |
const char * |
audiofile_root_path | ) |
|
Update track database.
Create or update all track playlist by tracks in path/to/.
- Parameters
-
[in] | audiofile_root_path | Path to audio data file. |
- Return values
-
true | : success |
false | : failure |
◆ deleteAll()
Delete all playlist.
- Note
- Delete playlist which is created internally. track database(***.csv) will not be deleted.
- Return values
-
true | : success |
false | : failure |
◆ deleteOne()
bool deleteOne |
( |
ListType |
type, |
|
|
FAR const char * |
key_str |
|
) |
| |
Delete playlist.
- Parameters
-
[in] | type | ListTypeAllTrack, ListTypeArtist, ListTypeAlbum, ListTypeUser |
[in] | key_str | Key string to filter playlist. Author name, album name, etc... |
- Return values
-
true | : success |
false | : failure |
◆ getNextTrack()
bool getNextTrack |
( |
FAR Track * |
track | ) |
|
Get next track.
Get next track in playlist which is selected by select().
- Parameters
-
[out] | track | Track information |
- Return values
-
true | : success |
false | : failure |
◆ getPrevTrack()
bool getPrevTrack |
( |
FAR Track * |
track | ) |
|
Get previous track.
Get previous track in playlist which is selected by select().
- Parameters
-
[out] | track | Track information |
- Return values
-
true | : success |
false | : failure |
◆ restart()
Restart playlist.
Restart from top of playlist.
- Return values
-
true | : success |
false | : failure |
The documentation for this class was generated from the following file:
- spresense/sdk/modules/include/audio/utilities/playlist.h