class for creating playlists. Uses AudioStream internally to play the files.
More...
#include <AudioPlaylist.h>
class for creating playlists. Uses AudioStream internally to play the files.
◆ AudioPlaylist() [1/5]
creates a new instance and initializes it with the provided values.
- Parameters
-
pNativeAudio | shared pointer to the native audio instance that will be used for playing the files. |
◆ AudioPlaylist() [2/5]
HephAudio::AudioPlaylist::AudioPlaylist |
( |
Audio & | audio | ) |
|
creates a new instance and initializes it with the provided values.
- Parameters
-
audio | the audio instance that will be used for playing the files. |
◆ AudioPlaylist() [3/5]
HephAudio::AudioPlaylist::AudioPlaylist |
( |
std::shared_ptr< Native::NativeAudio > | pNativeAudio, |
|
|
const std::vector< std::filesystem::path > & | files ) |
creates a new instance and initializes it with the provided values.
- Parameters
-
pNativeAudio | shared pointer to the native audio instance that will be used for playing the files. |
files | file paths. |
◆ AudioPlaylist() [4/5]
HephAudio::AudioPlaylist::AudioPlaylist |
( |
Audio & | audio, |
|
|
const std::vector< std::filesystem::path > & | files ) |
creates a new instance and initializes it with the provided values.
- Parameters
-
audio | the audio instance that will be used for playing the files. |
files | file paths. |
◆ AudioPlaylist() [5/5]
creates a new instance and moves the rhs's data to it.
- Parameters
-
rhs | instance whose data will be moved. |
◆ Size()
size_t HephAudio::AudioPlaylist::Size |
( |
| ) |
const |
gets the number of files present in the playlist.
◆ GetNativeAudio()
gets the shared pointer to the native audio instance that's used for playing the files.
◆ GetAudioObject()
AudioObject * HephAudio::AudioPlaylist::GetAudioObject |
( |
| ) |
const |
gets the pointer to the audio object instance that's created to play audio data.
◆ Start()
void HephAudio::AudioPlaylist::Start |
( |
| ) |
|
starts (resumes) playing the files.
◆ Stop()
void HephAudio::AudioPlaylist::Stop |
( |
| ) |
|
stops (pauses) playing the files.
◆ Add() [1/2]
void HephAudio::AudioPlaylist::Add |
( |
const std::filesystem::path & | filePath | ) |
|
adds a file to the end of the playlist.
- Parameters
-
filePath | path of the file that will be added to the playlist. |
◆ Add() [2/2]
void HephAudio::AudioPlaylist::Add |
( |
const std::vector< std::filesystem::path > & | files | ) |
|
adds multiple files to the end of the playlist.
- Parameters
-
◆ Insert() [1/2]
void HephAudio::AudioPlaylist::Insert |
( |
const std::filesystem::path & | filePath, |
|
|
size_t | index ) |
inserts the provided file to the playlist.
- Parameters
-
filePath | path of the file that will be added to the playlist. |
index | position of the new file within the playlist. |
◆ Insert() [2/2]
void HephAudio::AudioPlaylist::Insert |
( |
const std::vector< std::filesystem::path > & | files, |
|
|
size_t | index ) |
inserts the provided files to the playlist.
- Parameters
-
files | file paths. |
index | position of the new files within the playlist. |
◆ Remove() [1/3]
void HephAudio::AudioPlaylist::Remove |
( |
size_t | index | ) |
|
removes the file at the provided index.
- Parameters
-
index | index of the file to be removed. |
◆ Remove() [2/3]
void HephAudio::AudioPlaylist::Remove |
( |
size_t | index, |
|
|
size_t | count ) |
removes the files at the provided index.
- Parameters
-
index | index of the first file to be removed. |
count | number of files to remove. |
◆ Remove() [3/3]
void HephAudio::AudioPlaylist::Remove |
( |
const std::filesystem::path & | filePath | ) |
|
removes the file with the provided path.
◆ Skip() [1/2]
void HephAudio::AudioPlaylist::Skip |
( |
| ) |
|
◆ Skip() [2/2]
void HephAudio::AudioPlaylist::Skip |
( |
size_t | n | ) |
|
skips the first n files.
- Parameters
-
n | number of files to skip. |
◆ Clear()
void HephAudio::AudioPlaylist::Clear |
( |
| ) |
|
removes all files from the playlist.