AudioManager controls the audio file and all of its chunk. Each audio file should have exactly one manager. The AudioManager uses HTML Audio for playback.

Constructors

Properties

time: {
    end: number;
    start: number;
} = ...

Accessors

Methods

  • destroys the audio manager

    Parameters

    • disconnect: boolean = true

    Returns Promise<void>

  • starts audio playback using a given selection.

    Parameters

    • audioSelection: AudioSelection
    • volume: number
    • playbackRate: number
    • playOnHover: boolean = false

    Returns Promise<void>

  • creates a new audio manager and reports the progress using an observable. The initialization includes audio decoding.

    Parameters

    • filename: string
    • type: string
    • buffer: ArrayBuffer
    • Optionalurl: string
    • audioMechanism: AudioMechanism = ...

    Returns Observable<{
        audioManager: AudioManager;
        progress: number;
    }>

  • returns the FileFormat instance relative of the file extension or undefined if not found.

    Parameters

    • extension: string

      file extension

    • audioformats: AudioFormat[]

      list of supported audio formats

    Returns undefined | AudioFormat

  • returns the number of data parts

    Parameters

    • fileSize: number

    Returns number

  • checks if there is an audio format that matches with the extension of the audio file.

    Parameters

    Returns boolean