melonJS
    Preparing search index...

    Function load

    • Load an audio file

      Parameters

      • sound: SoundAsset

        sound asset descriptor

      • Optionalonloadcb: () => void

        function to be called when the resource is loaded

      • Optionalonerrorcb: () => void

        function to be called in case of error

      • Optionalsettings: LoadSettings = {}

        custom settings to apply to the request (@link https://developer.mozilla.org/en-US/docs/Web/API/fetch#options)

      Returns number

      the amount of asset loaded (always 1 if successful)