feat: make everything threads-safe.
feat: complete `uninstall.sh` logic to make everything synced. feat: complete basic play logic to handle background, music, lyric play.
This commit is contained in:
@@ -10,13 +10,18 @@
|
||||
#include <atomic>
|
||||
#include <string>
|
||||
|
||||
#include "timeline.h"
|
||||
|
||||
namespace mp {
|
||||
|
||||
// Blocking playback of `path`. Returns 0 on success (played to the end or
|
||||
// stopped early via `stop`). Non-zero return values:
|
||||
// Blocking playback of `path` in real time. `timeline` is optional; if given
|
||||
// and not yet anchored, the music anchors it (audio is the show's clock).
|
||||
// Returns 0 on success (played to the end or stopped early via `stop`).
|
||||
// Non-zero return values:
|
||||
// 1 argument error
|
||||
// 2 could not open/decode the file
|
||||
// 3 no audio device available (caller should degrade gracefully)
|
||||
int play(const std::string& path, std::atomic<bool>* stop = nullptr);
|
||||
int play(const std::string& path, Timeline* timeline = nullptr,
|
||||
std::atomic<bool>* stop = nullptr);
|
||||
|
||||
} // namespace mp
|
||||
|
||||
Reference in New Issue
Block a user