diff options
| author | jacqueline <me@jacqueline.id.au> | 2022-12-07 15:36:47 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2022-12-07 15:36:47 +1100 |
| commit | 01be69eca1fa89c047fc29f5cb0ea8ba0898dad1 (patch) | |
| tree | d40f749b3ebf6327f13d51d585f7c315a6d864c3 /src/main/app_console.cpp | |
| parent | f35bb64c2b8dbb72fd15f1880e4d01d263660910 (diff) | |
| download | tangara-fw-01be69eca1fa89c047fc29f5cb0ea8ba0898dad1.tar.gz | |
better handling of chunk buffer
Diffstat (limited to 'src/main/app_console.cpp')
| -rw-r--r-- | src/main/app_console.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/main/app_console.cpp b/src/main/app_console.cpp index fbb8df87..281454dc 100644 --- a/src/main/app_console.cpp +++ b/src/main/app_console.cpp @@ -8,11 +8,14 @@ #include <iostream> #include <string> +#include "audio_playback.hpp" #include "esp_console.h" namespace console { -std::string toSdPath(std::string filepath) { +static AppConsole* sInstance = nullptr; + +std::string toSdPath(const std::string& filepath) { return std::string(drivers::kStoragePath) + "/" + filepath; } @@ -57,12 +60,7 @@ int CmdPlayFile(int argc, char** argv) { return 1; } - /* sInstance->playback_->Play(toSdPath(argv[1])); - if (argc == 3) { - sInstance->playback_->SetNextFile(toSdPath(argv[2])); - } - */ return 0; } @@ -125,14 +123,12 @@ void RegisterVolume() { esp_console_cmd_register(&cmd); } -/* -AppConsole::AppConsole() { +AppConsole::AppConsole(audio::AudioPlayback* playback) : playback_(playback) { sInstance = this; } AppConsole::~AppConsole() { sInstance = nullptr; } -*/ auto AppConsole::RegisterExtraComponents() -> void { RegisterListDir(); |
