feat(files): launch MP3 player from file explorer, 28p header cache

- SupportedFiles: isSupportedAudioFile (.mp3/.wav/.ogg/.flac)
- View::viewFile: audio files start one.tactility.mp3player with
  file=<path> argv (CurrentAppCompat parses key=value pairs)
- es3c28p: add CONFIG_LV_IMAGE_HEADER_CACHE_DEF_CNT=16 for parity
  with es3c35p
This commit is contained in:
Adolfo Reyna
2026-09-12 00:01:13 -04:00
parent 4b7f82c38f
commit 87c82f5314
4 changed files with 20 additions and 0 deletions
+10
View File
@@ -1,6 +1,7 @@
#include <app/event.h>
#include <app/execute.h>
#include <app/install.h>
#include <app/start.h>
#include <app/stream.h>
#include <lvgl/lvgl.h>
@@ -204,6 +205,15 @@ void View::viewFile(const std::string& path, const std::string& filename) {
// Remove forward slash, because we need a relative path
notes::start(file_path.substr(1));
}
} else if (isSupportedAudioFile(filename)) {
// External MP3 player reads argv as key=value pairs (see
// CurrentAppCompat tt_app_start_with_bundle): file=<path>
std::string file_arg = "file=" + file_path;
const char* argv[] = { file_arg.c_str() };
uint32_t instance_id = 0;
if (app_start("one.tactility.mp3player", 1, argv, &instance_id) != ERROR_NONE) {
LOG_W(TAG, "Failed to start MP3 player for %s", file_path.c_str());
}
} else if (isExecutablePath(file_path)) {
runFile(file_path);
} else {