diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-07-07 15:29:47 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-07-07 15:29:47 +1000 |
| commit | 39f7545cd5ef7a30bbd482f3579df7744c6b688d (patch) | |
| tree | a760a50cc17365fbcd69eb89ca627ad7feb8c0b6 /src/app_console/app_console.cpp | |
| parent | 2f16d230025c3173cfbecc58b38d6a52b6b0f5f2 (diff) | |
| download | tangara-fw-39f7545cd5ef7a30bbd482f3579df7744c6b688d.tar.gz | |
wire up the playing screen with some real data
Includes implementing song duration calculation for CBR MP3 files
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; |
