123456789101112131415161718192021222324252627 |
- #include <spdlog/spdlog.h>
- #include <memory>
- #include "LogAudio.h"
- #include "MiniAudio.h"
- int main () {
- #ifndef DEBUG
- std::unique_ptr<Audio::AudioInterface> m = std::make_unique<Audio::MiniAudio>(Audio::MiniAudio());
- #else
- std::unique_ptr<Audio::AudioInterface> m = std::make_unique<Audio::LogAudio>(Audio::LogAudio());
- #endif
- m->play();
-
- if (m->is_playing()) {
- spdlog::info("Player is on play mode");
- } else {
- spdlog::info("Player is on pause mode");
- }
- m->pause();
-
- }
|