Home Reference Source Test
import {_AudioManager} from 'seed-engine/src/manager/AudioManager.js'
private class | source

_AudioManager

You can directly use an instance of this class. AudioManager

Extends:

Manager → _AudioManager

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public

sounds: {}

Method Summary

Public Methods
public

addSound(soundName: *, soundAssetPath: *): *

public

end()

public

playSound(soundName: *, volume: number): boolean

public

removeSound(soundName: *)

public

setMasterVolume(volume: *)

public

start()

Private Methods
private

_createSoundBufferFromAsset(assetPath: *): *

Inherited Summary

From class Manager
public

end()

public

pause()

public

start()

public
public

update()

Public Constructors

public constructor() source

Override:

Manager#constructor

Public Members

public audioCtx: * source

public masterVolume: number source

public sounds: {} source

Public Methods

public addSound(soundName: *, soundAssetPath: *): * source

Params:

NameTypeAttributeDescription
soundName *
soundAssetPath *

Return:

*

public end() source

Override:

Manager#end

public playSound(soundName: *, volume: number): boolean source

Params:

NameTypeAttributeDescription
soundName *
volume number
  • optional
  • default: 1

Return:

boolean

public removeSound(soundName: *) source

Params:

NameTypeAttributeDescription
soundName *

public setMasterVolume(volume: *) source

Params:

NameTypeAttributeDescription
volume *

public start() source

Override:

Manager#start

Private Methods

private _createSoundBufferFromAsset(assetPath: *): * source

Params:

NameTypeAttributeDescription
assetPath *

Return:

*