Skip to content

small fixes playfile.md: prepend and volume level comment #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lua-api-reference/audio-sound/playfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,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
Expand All @@ -25,7 +25,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
```