0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00

TOOLS/ao-null-reload.lua: fix lint warnings

This commit is contained in:
Guido Cella 2024-05-27 22:46:53 +02:00 committed by Kacper Michajłow
parent 62868beffe
commit ee514c6acf
2 changed files with 4 additions and 3 deletions

View File

@ -110,7 +110,6 @@ max_line_length = 100
-- TODO: Remove everything below this line -- TODO: Remove everything below this line
local todo = { local todo = {
"player/lua/osc.lua", "player/lua/osc.lua",
"TOOLS/lua/ao-null-reload.lua",
"TOOLS/lua/autocrop.lua", "TOOLS/lua/autocrop.lua",
"TOOLS/lua/autodeint.lua", "TOOLS/lua/autodeint.lua",
"TOOLS/lua/autoload.lua", "TOOLS/lua/autoload.lua",

View File

@ -3,12 +3,14 @@
-- particular for ao=wasapi, since the internal IMMNotificationClient code that -- particular for ao=wasapi, since the internal IMMNotificationClient code that
-- normally triggers ao-reload will not be running in this case. -- normally triggers ao-reload will not be running in this case.
function do_reload() local reloading
local function do_reload()
mp.command("ao-reload") mp.command("ao-reload")
reloading = nil reloading = nil
end end
function on_audio_device_list_change() local function on_audio_device_list_change()
if mp.get_property("current-ao") == "null" and not reloading then if mp.get_property("current-ao") == "null" and not reloading then
mp.msg.verbose("audio-device-list changed: reloading audio") mp.msg.verbose("audio-device-list changed: reloading audio")
-- avoid calling ao-reload too often -- avoid calling ao-reload too often