From e0817094b6a6e9f3b75ab4e429a6c30eebe57be7 Mon Sep 17 00:00:00 2001 From: JakubTheDeveloper Date: Mon, 26 Oct 2026 14:57:00 +0100 Subject: [PATCH] Log the outcome of scanning /samples on the SD card A missing or unreadable /samples directory returned silently, so an empty library gave no hint in the boot log. Log that case and the WAV count. Co-Authored-By: Claude Opus 5.5 --- src/sample_library.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sample_library.cpp b/src/sample_library.cpp index e592e52..70a6e1d 100644 --- a/src/sample_library.cpp +++ b/src/sample_library.cpp @@ -42,7 +42,7 @@ void loadFromSd(Catalog &catalog, ValidationProgress progress, void *context) { File dir = SD.open("/samples"); if (!dir || !dir.isDirectory()) { - + Serial.println(!dir ? "Samples: cannot open /samples" : "Samples: /samples is not a directory"); return; } @@ -63,6 +63,7 @@ void loadFromSd(Catalog &catalog, ValidationProgress progress, void *context) { entry.close(); } dir.close(); + Serial.printf("Samples: found %d WAV files in /samples\n", catalog.count); sortByName(catalog); if (progress) progress(context);