class for creating playlists. Uses AudioStream internally to play the files.
More...
#include <AudioPlaylist.h>
|
| AudioPlaylist (Native::NativeAudio *pNativeAudio) |
|
| AudioPlaylist (Audio &audio) |
|
| AudioPlaylist (Native::NativeAudio *pNativeAudio, const std::vector< std::filesystem::path > &files) |
|
| AudioPlaylist (Audio &audio, const std::vector< std::filesystem::path > &files) |
|
| AudioPlaylist (Native::NativeAudio *pNativeAudio, TransitionEffect transitionEffect, double transitionDuration_s) |
|
| AudioPlaylist (Audio &audio, TransitionEffect transitionEffect, double transitionDuration_s) |
|
| AudioPlaylist (Native::NativeAudio *pNativeAudio, TransitionEffect transitionEffect, double transitionDuration_s, const std::vector< std::filesystem::path > &files) |
|
| AudioPlaylist (Audio &audio, TransitionEffect transitionEffect, double transitionDuration_s, const std::vector< std::filesystem::path > &files) |
|
| AudioPlaylist (const AudioPlaylist &)=delete |
|
| AudioPlaylist (AudioPlaylist &&rhs) noexcept |
|
AudioPlaylist & | operator= (const AudioPlaylist &)=delete |
|
AudioPlaylist & | operator= (const std::filesystem::path &rhs) |
|
AudioPlaylist & | operator= (const std::vector< std::filesystem::path > &rhs) |
|
AudioPlaylist & | operator= (AudioPlaylist &&rhs) noexcept |
|
size_t | Size () const |
|
Native::NativeAudio * | GetNativeAudio () const |
|
TransitionEffect | GetTransitionEffect () const |
|
void | SetTransitionEffect (TransitionEffect transitionEffect) |
|
double | GetTransitionDuration () const |
|
void | SetTransitionDuration (double transitionDuration_s) |
|
void | Start () |
|
void | Stop () |
|
bool | IsPaused () const |
|
void | Add (const std::filesystem::path &filePath) |
|
void | Add (const std::vector< std::filesystem::path > &files) |
|
void | Insert (const std::filesystem::path &filePath, size_t index) |
|
void | Insert (const std::vector< std::filesystem::path > &files, size_t index) |
|
void | Remove (size_t index) |
|
void | Remove (size_t index, size_t count) |
|
void | Remove (const std::filesystem::path &filePath) |
|
void | Skip () |
|
void | Skip (size_t n) |
|
void | Clear () |
|
class for creating playlists. Uses AudioStream internally to play the files.
◆ TransitionEffect
indicates which effect will be applied while switching from one file to another.
◆ AudioPlaylist() [1/9]
creates a new instance and initializes it with the provided values.
- Parameters
-
pNativeAudio | pointer to the native audio instance that will be used for playing the files. |
◆ AudioPlaylist() [2/9]
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/9]
HephAudio::AudioPlaylist::AudioPlaylist |
( |
Native::NativeAudio * | pNativeAudio, |
|
|
const std::vector< std::filesystem::path > & | files ) |
creates a new instance and initializes it with the provided values.
- Parameters
-
pNativeAudio | pointer to the native audio instance that will be used for playing the files. |
files | file paths. |
◆ AudioPlaylist() [4/9]
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/9]
creates a new instance and initializes it with the provided values.
- Parameters
-
pNativeAudio | pointer to the native audio instance that will be used for playing the files. |
transitionEffect | the effect that will be applied while switching files. |
transitionDuration_s | duration of the transition effect in seconds. |
◆ AudioPlaylist() [6/9]
HephAudio::AudioPlaylist::AudioPlaylist |
( |
Audio & | audio, |
|
|
TransitionEffect | transitionEffect, |
|
|
double | transitionDuration_s ) |
creates a new instance and initializes it with the provided values.
- Parameters
-
audio | the audio instance that will be used for playing the files. |
transitionEffect | the effect that will be applied while switching files. |
transitionDuration_s | duration of the transition effect in seconds. |
◆ AudioPlaylist() [7/9]
HephAudio::AudioPlaylist::AudioPlaylist |
( |
Native::NativeAudio * | pNativeAudio, |
|
|
TransitionEffect | transitionEffect, |
|
|
double | transitionDuration_s, |
|
|
const std::vector< std::filesystem::path > & | files ) |
creates a new instance and initializes it with the provided values.
- Parameters
-
pNativeAudio | pointer to the native audio instance that will be used for playing the files. |
transitionEffect | the effect that will be applied while switching files. |
transitionDuration_s | duration of the transition effect in seconds. |
files | file paths. |
◆ AudioPlaylist() [8/9]
HephAudio::AudioPlaylist::AudioPlaylist |
( |
Audio & | audio, |
|
|
TransitionEffect | transitionEffect, |
|
|
double | transitionDuration_s, |
|
|
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. |
transitionEffect | the effect that will be applied while switching files. |
transitionDuration_s | duration of the transition effect in seconds. |
files | file paths. |
◆ AudioPlaylist() [9/9]
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 pointer to the NativeAudio instance that's used for playing the files.
◆ GetTransitionEffect()
gets the transition effect.
◆ SetTransitionEffect()
void HephAudio::AudioPlaylist::SetTransitionEffect |
( |
TransitionEffect | transitionEffect | ) |
|
sets the transition effect.
◆ GetTransitionDuration()
double HephAudio::AudioPlaylist::GetTransitionDuration |
( |
| ) |
const |
gets the transition duration in seconds.
◆ SetTransitionDuration()
void HephAudio::AudioPlaylist::SetTransitionDuration |
( |
double | transitionDuration_s | ) |
|
sets the transition duration in seconds.
◆ Start()
void HephAudio::AudioPlaylist::Start |
( |
| ) |
|
starts (resumes) playing the files.
◆ Stop()
void HephAudio::AudioPlaylist::Stop |
( |
| ) |
|
stops (pauses) playing the files.
◆ IsPaused()
bool HephAudio::AudioPlaylist::IsPaused |
( |
| ) |
const |
checks whether the playlist is paused (stopped).
- Returns
- true if the playlist is paused, otherwise false.
◆ 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.