From 2e5196c3315c447ebfce3af8d54ffa92ac235df0 Mon Sep 17 00:00:00 2001 From: Peter Feerick <5500713+pfeerick@users.noreply.github.com> Date: Fri, 23 Oct 2026 19:52:57 +1000 Subject: [PATCH] fix(2.11): playFile prepends the language path, fix volume example A relative filename gets the current language's sound directory put in front of it, so the language is prepended, not appended. The first example passes volume 5 but its comment said 2. Supersedes #10. Co-Authored-By: Alex K Co-Authored-By: Claude Opus 5.5 --- website/md-docs/api-reference/audio-sound/playfile.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/md-docs/api-reference/audio-sound/playfile.md b/website/md-docs/api-reference/audio-sound/playfile.md index 5f1bfeb53..c307ac1ac 100644 --- a/website/md-docs/api-reference/audio-sound/playfile.md +++ b/website/md-docs/api-reference/audio-sound/playfile.md @@ -12,9 +12,9 @@ description: Play a file from the SD card * `filename` (string) full path to wav file (i.e. “/SOUNDS/en/system/tada.wav”) - Introduced in 2.1.0: If you use a relative path, the current language is appended + Introduced in 2.1.0: If you use a relative path, the current language is prepended - to the path (example: for English language: `/SOUNDS/en` is appended) + to the path (example: for English language: `/SOUNDS/en` is prepended) * `volume` (number): (1..5) override radio settings Wav volume for the duration of file. Omitting the parameter uses radio settings Wav volume ## Return value @@ -24,7 +24,7 @@ none ## Examples ```lua -playFile("armed.wav", 5) -- play file armed.wav, use Wav volume 2 +playFile("armed.wav", 5) -- play file armed.wav, use Wav volume 5 playFile("armed.wav", 1) -- play file armed.wav, use Wav volume 1 playFile("armed.wav") -- play file armed.wav, use radio settings Wav volume ```