Audio data cache manager. It uses a least recently used (LRU) caching strategy to manage cached audio data.

音频数据缓存管理器。内部使用了最少最近使用(LRU)缓存策略来管理缓存的音频数据。

构造函数

方法

构造函数

方法

  • 参数

    • url: string

      The URL of the audio data.

    • obj: any

      The AudioBuffer object.

    • size: number

      The size of the audio data in bytes.

    返回 void

    Add an audio data to the cache.

    将音频数据添加到缓存中。

  • 参数

    • url: string

      The URL of the audio data.

    • callback: ((obj: any) => void)

      The callback function to be called with the audio data.

        • (obj): void
        • 参数

          • obj: any

          返回 void

    • 可选callbackThis: any

      The context of the callback function.

    返回 void

    Get an audio data from the cache.

    从缓存中获取音频数据。