Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions docs-system/generated/api-model.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -7074,7 +7074,7 @@
"name": "filename",
"type": "string",
"required": true,
"description": "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\nto the path (example: for English language: `/SOUNDS/en` is appended)"
"description": "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 prepended\nto the path (example: for English language: `/SOUNDS/en` is prepended)"
},
{
"name": "volume",
Expand All @@ -7098,7 +7098,7 @@
},
"notes": [],
"source_location": "radio/src/lua/api_general.cpp",
"raw_luadoc": "@function playFile(filename [, volume])\n\nPlay a file from the SD card\n\n@param filename (string) full path to wav file (i.e. \"/SOUNDS/en/system/tada.wav\")\nIntroduced in 2.1.0: If you use a relative path, the current language is appended\nto the path (example: for English language: `/SOUNDS/en` is appended)\n\n@param volume (number):\n - (1..5) override radio settings Wav volume for the duration of file\n - omitting the parameter uses radio settings Wav volume\n\n@retval none \n\n@status current Introduced in 2.0.0, changed in 2.1.0, changed in 2.10\n\n// targets: BW, COLOR\n//\n// EXAMPLES:\n// playFile(\"armed.wav\", 5) -- play file armed.wav, use Wav volume 2\n// playFile(\"armed.wav\", 1) -- play file armed.wav, use Wav volume 1\n// playFile(\"armed.wav\")\t\t-- play file armed.wav, use radio settings Wav volume",
"raw_luadoc": "@function playFile(filename [, volume])\n\nPlay a file from the SD card\n\n@param filename (string) full path to wav file (i.e. \"/SOUNDS/en/system/tada.wav\")\nIntroduced in 2.1.0: If you use a relative path, the current language is prepended\nto the path (example: for English language: `/SOUNDS/en` is prepended)\n\n@param volume (number):\n - (1..5) override radio settings Wav volume for the duration of file\n - omitting the parameter uses radio settings Wav volume\n\n@retval none \n\n@status current Introduced in 2.0.0, changed in 2.1.0, changed in 2.10\n\n// targets: BW, COLOR\n//\n// EXAMPLES:\n// playFile(\"armed.wav\", 5) -- play file armed.wav, use Wav volume 5\n// playFile(\"armed.wav\", 1) -- play file armed.wav, use Wav volume 1\n// playFile(\"armed.wav\")\t\t-- play file armed.wav, use radio settings Wav volume",
"source_line": 1455
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs-system/generated/luals/runtime.d.lua
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ function playDuration(duration, hourformat) end

--- Play a file from the SD card
--- @since 2.0.0
---@param 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 to the path (example: for English language: /SOUNDS/en is appended)
---@param 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 prepended to the path (example: for English language: /SOUNDS/en is prepended)
---@param volume? integer - (1..5) override radio settings Wav volume for the duration of file - omitting the parameter uses radio settings Wav volume
---@return unknown none
function playFile(filename, volume) end
Expand Down
2 changes: 1 addition & 1 deletion website/md-docs/api-reference/audio-sound/play-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Play a file from the SD card

| Name | Req | Type | Description |
| --- | --- | --- | --- |
| `filename` | yes | `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<br>to the path (example: for English language: `/SOUNDS/en` is appended) |
| `filename` | yes | `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 prepended<br>to the path (example: for English language: `/SOUNDS/en` is prepended) |
| `volume` | no | `integer` | <ul><li>(1..5) override radio settings Wav volume for the duration of file</li><li>omitting the parameter uses radio settings Wav volume</li></ul> |

## Returns
Expand Down
18 changes: 9 additions & 9 deletions website/md-docs/api-reference/review-runtime-play-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ edit docs-system/overlays/<doc_id>.md, then rebuild.
<table class="decision-table">
<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead>
<tbody>
<tr><td><code>filename</code></td><td>param</td><td><code>string</code></td><td>full path to wav file (i.e. &quot;/SOUNDS/en/system/tada.wav&quot;) Introduced in 2.1.0: If you use a relative path, the current language is appended
to the path (example: for English language: `/SOUNDS/en` is appended)</td><td><select data-field-kind="param" data-field-name="filename" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="filename" data-custom-type="true" /></td></tr>
<tr><td><code>filename</code></td><td>param</td><td><code>string</code></td><td>full path to wav file (i.e. &quot;/SOUNDS/en/system/tada.wav&quot;) 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 prepended)</td><td><select data-field-kind="param" data-field-name="filename" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="filename" data-custom-type="true" /></td></tr>
<tr><td><code>volume</code></td><td>param</td><td><code>integer</code></td><td>- (1..5) override radio settings Wav volume for the duration of file
- omitting the parameter uses radio settings Wav volume</td><td><select data-field-kind="param" data-field-name="volume" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="volume" data-custom-type="true" /></td></tr>
<tr><td><code>none</code></td><td>return</td><td><code>unknown</code></td><td></td><td><select data-field-kind="return" data-field-name="none" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="none" data-custom-type="true" /></td></tr>
</tbody>
</table>
<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div>
<script type="application/json" class="decision-payload">{&quot;item_id&quot;: &quot;playFile&quot;, &quot;symbol&quot;: &quot;playFile&quot;, &quot;summary&quot;: &quot;Play a file from the SD card&quot;, &quot;parameters&quot;: [{&quot;name&quot;: &quot;filename&quot;, &quot;type&quot;: &quot;string&quot;, &quot;required&quot;: true, &quot;description&quot;: &quot;full path to wav file (i.e. \&quot;/SOUNDS/en/system/tada.wav\&quot;) Introduced in 2.1.0: If you use a relative path, the current language is appended\nto the path (example: for English language: `/SOUNDS/en` is appended)&quot;}, {&quot;name&quot;: &quot;volume&quot;, &quot;type&quot;: &quot;integer&quot;, &quot;required&quot;: false, &quot;description&quot;: &quot;- (1..5) override radio settings Wav volume for the duration of file\n - omitting the parameter uses radio settings Wav volume&quot;}], &quot;returns&quot;: [{&quot;name&quot;: &quot;none&quot;, &quot;type&quot;: &quot;unknown&quot;, &quot;description&quot;: &quot;&quot;}], &quot;notes&quot;: [], &quot;since&quot;: &quot;2.0.0&quot;}</script>
<script type="application/json" class="decision-payload">{&quot;item_id&quot;: &quot;playFile&quot;, &quot;symbol&quot;: &quot;playFile&quot;, &quot;summary&quot;: &quot;Play a file from the SD card&quot;, &quot;parameters&quot;: [{&quot;name&quot;: &quot;filename&quot;, &quot;type&quot;: &quot;string&quot;, &quot;required&quot;: true, &quot;description&quot;: &quot;full path to wav file (i.e. \&quot;/SOUNDS/en/system/tada.wav\&quot;) Introduced in 2.1.0: If you use a relative path, the current language is prepended\nto the path (example: for English language: `/SOUNDS/en` is prepended)&quot;}, {&quot;name&quot;: &quot;volume&quot;, &quot;type&quot;: &quot;integer&quot;, &quot;required&quot;: false, &quot;description&quot;: &quot;- (1..5) override radio settings Wav volume for the duration of file\n - omitting the parameter uses radio settings Wav volume&quot;}], &quot;returns&quot;: [{&quot;name&quot;: &quot;none&quot;, &quot;type&quot;: &quot;unknown&quot;, &quot;description&quot;: &quot;&quot;}], &quot;notes&quot;: [], &quot;since&quot;: &quot;2.0.0&quot;}</script>
</div>

<div class="review-workbench">
Expand All @@ -53,8 +53,8 @@ to the path (example: for English language: `/SOUNDS/en` is appended)</td><td><s
Play a file from the SD card

@param 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
to the path (example: for English language: `/SOUNDS/en` 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 prepended)

@param volume (number):
- (1..5) override radio settings Wav volume for the duration of file
Expand All @@ -67,7 +67,7 @@ to the path (example: for English language: `/SOUNDS/en` is appended)
// targets: BW, COLOR
//
// EXAMPLES:
// 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
~~~~
Expand All @@ -83,7 +83,7 @@ Play a file from the SD card

| Name | Req | Type | Description |
| --- | --- | --- | --- |
| `filename` | yes | `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 to the path (example: for English language: `/SOUNDS/en` is appended) |
| `filename` | yes | `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 prepended to the path (example: for English language: `/SOUNDS/en` is prepended) |
| `volume` | no | `integer` | - (1..5) override radio settings Wav volume for the duration of file - omitting the parameter uses radio settings Wav volume |

#### Returns
Expand All @@ -108,8 +108,8 @@ Use this as a starting point when the issue is in the C++ annotation. `TODO` mea

Play a file from the SD card

@param 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
to the path (example: for English language: `/SOUNDS/en` is appended)
@param 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 prepended
to the path (example: for English language: `/SOUNDS/en` is prepended)

@param volume (integer) - (1..5) override radio settings Wav volume for the duration of file
- omitting the parameter uses radio settings Wav volume
Expand Down
2 changes: 1 addition & 1 deletion website/md-docs/assets/luals/runtime.d.lua
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ function playDuration(duration, hourformat) end

--- Play a file from the SD card
--- @since 2.0.0
---@param 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 to the path (example: for English language: /SOUNDS/en is appended)
---@param 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 prepended to the path (example: for English language: /SOUNDS/en is prepended)
---@param volume? integer - (1..5) override radio settings Wav volume for the duration of file - omitting the parameter uses radio settings Wav volume
---@return unknown none
function playFile(filename, volume) end
Expand Down
Loading