Black Trigram (흑괘) - Korean Martial Arts Combat Simulator API - v0.5.31
    Preparing search index...

    Class AudioManager

    Implements

    Index

    Accessors

    Constructors

    Methods

    • Batch load multiple assets with progress tracking

      Parameters

      • assets: readonly AudioAsset[]

        Array of audio assets to load

      • Optionaloptions: LoadOptions

        Optional load configuration (timeout, retries, etc.)

      • OptionalonProgress: (loaded: number, total: number) => void

        Optional callback for progress updates with loaded and total counts

      Returns Promise<void>

      Promise that resolves when all assets are processed

    • Parameters

      • fromTrackId: string
      • toTrackId: string
      • duration: number = 1000

      Returns Promise<void>

    • Get FPS impact analysis showing baseline vs current FPS and detected drops

      Returns AudioFPSImpact

      FPS impact analysis object

    • Returns ReadonlyMap<string, HTMLAudioElement>

    • Get loader statistics including cached assets and loading state

      Returns { cached: number; loading: number; totalAttempts: number }

      Loader statistics object

    • Get memory statistics including total loaded MB, asset count, and warnings

      Returns AudioMemoryStats

      Memory statistics object

    • Get all memory warnings

      Returns readonly MemoryWarning[]

      Array of memory warnings

    • Get comprehensive monitoring report including memory, performance, FPS, and warnings

      Returns {
          fps: AudioFPSImpact;
          memory: AudioMemoryStats;
          performance: AudioPerformanceStats;
          warnings: readonly MemoryWarning[];
      }

      Comprehensive monitoring report object

    • Get performance statistics including load times and playback latency

      Returns AudioPerformanceStats

      Performance statistics object

    • Get pool statistics for a specific asset or all pools

      Parameters

      • OptionalassetId: string

        Optional asset ID to get specific pool stats

      Returns PoolStatistics | Map<string, PoolStatistics> | undefined

      Pool statistics for the specified asset or all pools

    • Helper method to release pooled audio back to the pool after playback

      Parameters

      • id: string

        Asset ID

      • audio: HTMLAudioElement

        Audio element to release

      Returns void

    • Unload an asset to free memory

      Parameters

      • assetId: string

        ID of the asset to unload

      Returns boolean

      true if asset was unloaded, false if asset was not found

    • Update FPS measurement for monitoring

      Parameters

      • fps: number

        Current frames per second measurement

      Returns void

    Properties

    _currentMusicTrack: string | null = null
    _fallbackMode: boolean = false
    _isInitialized: boolean = false
    _masterVolume: number = 1.0
    _musicVolume: number = 0.7
    _muted: boolean = false
    _sfxVolume: number = 0.8
    assetLoader: AudioAssetLoader
    audioPool: AudioElementPool
    currentMusic: HTMLAudioElement | null = null
    frequentSounds: Set<string> = ...
    monitor: AudioMonitor
    soundCache: Map<string, HTMLAudioElement> = ...