diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-07-07 15:30:19 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-07-07 15:30:19 +1000 |
| commit | b6e0e0dd4a177614797b6c6ac3b0c213d5a56f8a (patch) | |
| tree | 1bf97a9455e27840c4c6d65bc9cc9832e8379dea /src/app_console/app_console.cpp | |
| parent | 5af0ff2972023f35d8930ab3189cf04f6d9ff21b (diff) | |
| parent | 39f7545cd5ef7a30bbd482f3579df7744c6b688d (diff) | |
| download | tangara-fw-b6e0e0dd4a177614797b6c6ac3b0c213d5a56f8a.tar.gz | |
Merge branch 'functional-playing'
Diffstat (limited to 'src/app_console/app_console.cpp')
| -rw-r--r-- | src/app_console/app_console.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/app_console/app_console.cpp b/src/app_console/app_console.cpp index b0a90155..2b5b84f7 100644 --- a/src/app_console/app_console.cpp +++ b/src/app_console/app_console.cpp @@ -30,6 +30,7 @@ namespace console { std::weak_ptr<database::Database> AppConsole::sDatabase; +audio::TrackQueue* AppConsole::sTrackQueue; int CmdListDir(int argc, char** argv) { auto lock = AppConsole::sDatabase.lock(); @@ -108,9 +109,10 @@ int CmdPlayFile(int argc, char** argv) { if (is_id) { database::TrackId id = std::atoi(argv[1]); - events::Dispatch<audio::PlayTrack, audio::AudioState>( - audio::PlayTrack{.id = id}); + AppConsole::sTrackQueue->AddLast(id); } else { + // TODO. + /* std::ostringstream path; path << '/' << argv[1]; for (int i = 2; i < argc; i++) { @@ -119,6 +121,7 @@ int CmdPlayFile(int argc, char** argv) { events::Dispatch<audio::PlayFile, audio::AudioState>( audio::PlayFile{.filename = path.str()}); + */ } return 0; |
