API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classSoundFactory

@codexo/exojs / resources / stable

AssetFactory implementation that loads short audio assets (MP3, OGG, WAV, AAC, and other Web Audio API-supported formats), fully decodes them into an AudioBuffer, and produces a Sound instance ready for low-latency playback. For long-form background music use MusicFactory instead, which streams audio without up-front decoding. Supports audio sprite sheets via the `sprites` option.

1
props
5
methods
0
events
Import
import { SoundFactory } from '@codexo/exojs'

AssetFactory implementation that loads short audio assets (MP3, OGG, WAV, AAC, and other Web Audio API-supported formats), fully decodes them into an AudioBuffer, and produces a Sound instance ready for low-latency playback.

For long-form background music use MusicFactory instead, which streams audio without up-front decoding. Supports audio sprite sheets via the `sprites` option.

Constructors 1
new(): SoundFactory
Methods 5
create(source: ArrayBuffer, options: SoundFactoryOptions): Promise<Sound>
createObjectUrl(blob: Blob): string
destroy(): void
process(response: Response): Promise<ArrayBuffer>
revokeObjectUrl(objectUrl: string): void
Properties 1
storageName: "sound"
Source