mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-16 22:46:03 +01:00
Some people accidentally, mistakenly, and without any malicious intent forget to attribute code from this resource to its source. This change will hopefully assist people, so that they do not make that mistake again.
20 lines
683 B
Lua
20 lines
683 B
Lua
--[[
|
|
https://github.com/overextended/ox_lib
|
|
|
|
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
|
|
|
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
|
]]
|
|
|
|
---Loads an audio bank.
|
|
---@param audioBank string
|
|
---@param timeout number?
|
|
---@return string
|
|
function lib.requestAudioBank(audioBank, timeout)
|
|
return lib.waitFor(function()
|
|
if RequestScriptAudioBank(audioBank, false) then return audioBank end
|
|
end, ("failed to load audiobank '%s' - this may be caused by\n- too many loaded assets\n- oversized, invalid, or corrupted assets"):format(audioBank), timeout or 30000)
|
|
end
|
|
|
|
return lib.requestAudioBank
|