mirror of
https://github.com/opentx/opentx.git
synced 2025-07-15 04:15:26 +03:00
Fixes #3462: PlayTone check for min/max frequency added. Fixes Lua playTone() crash when called with abnormal parameter values. (#3468) (ported from master)
This commit is contained in:
parent
8cd677d697
commit
6349ff9496
3 changed files with 437 additions and 424 deletions
|
@ -604,22 +604,20 @@ static int luaPlayDuration(lua_State *L)
|
|||
|
||||
Play a tone
|
||||
|
||||
@param frequency (number) tone frequency in Hz
|
||||
@param frequency (number) tone frequency in Hz (from 150 to 15000)
|
||||
|
||||
@param duration (number) length of the tone in (TODO units)
|
||||
@param duration (number) length of the tone in milliseconds
|
||||
|
||||
@param pause (number) length of the pause in (TODO units)
|
||||
@param pause (number) length of the silence after the tone in milliseconds
|
||||
|
||||
@param flags (number):
|
||||
* `0 or not present` play with normal priority.
|
||||
* `PLAY_BACKGROUND` play in background (built in vario function used this context)
|
||||
* `PLAY_BACKGROUND` play in background (built in vario function uses this context)
|
||||
* `PLAY_NOW` play immediately
|
||||
|
||||
@param freqIncr (number) positive number increases the tone pitch (frequency with time),
|
||||
negative number decreases it. Bigger number has more effect
|
||||
|
||||
@notice Minimum played frequency is 150Hz even if a lower value is specified.
|
||||
|
||||
@status current Introduced in 2.1.0
|
||||
*/
|
||||
static int luaPlayTone(lua_State *L)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue