Class: AudioManager

AudioManager()

new AudioManager()

The static class that handles BGM, BGS, ME and SE.
Properties:
Name Type Description
masterVolume Number [static]
bgmVolume Number [static]
bgsVolume Number [static]
meVolume Number [static]
seVolume Number [static]
_bgmVolume Number [static]
_bgsVolume Number [static]
_meVolume Number [static]
_seVolume Number [static]
_currentBgm MV.AudioParameters [static]
_currentBgs MV.AudioParameters [static]
_bgmBuffer Html5AudioStatic | WebAudio [static]
_bgsBuffer Html5AudioStatic | WebAudio [static]
_meBuffer Html5AudioStatic | WebAudio [static]
_seBuffers Array.<(Html5AudioStatic|WebAudio)> [static]
_replayFadeTime Array.<(Html5AudioStatic|WebAudio)> [static]
_path String [static]
_blobUrl String [static]

Methods

(static) audioFileExt() → {String}

Returns:
Type
String

(static) checkErrors()

(static) checkWebAudioError(webAudio)

Parameters:
Name Type Description
webAudio Html5AudioStatic | WebAudio

(static) createBuffer() → {Html5AudioStatic|WebAudio}

Returns:
Type
Html5AudioStatic | WebAudio

(static) createDecryptBuffer(url, bgm, posopt)

Parameters:
Name Type Attributes Description
url String
bgm MV.AudioParameters
pos Number <optional>

(static) fadeInBgm(duration)

Parameters:
Name Type Description
duration Number

(static) fadeInBgs(duration)

Parameters:
Name Type Description
duration Number

(static) fadeOutBgm(duration)

Parameters:
Name Type Description
duration Number

(static) fadeOutBgs(duration)

Parameters:
Name Type Description
duration Number

(static) fadeOutMe(duration)

Parameters:
Name Type Description
duration Number

(static) isCurrentBgm(bgm) → {Boolean}

Parameters:
Name Type Description
bgm MV.AudioParameters
Returns:
Type
Boolean

(static) isCurrentBgs(bgs) → {Boolean}

Parameters:
Name Type Description
bgs MV.AudioParameters
Returns:
Type
Boolean

(static) isStaticSe(se) → {Boolean}

Parameters:
Name Type Description
se MV.AudioParameters
Returns:
Type
Boolean

(static) loadStaticSe(se)

Parameters:
Name Type Description
se MV.AudioParameters

(static) makeEmptyAudioObject() → {MV.AudioParameters}

Returns:
Type
MV.AudioParameters

(static) playBgm(bgm, posopt)

Parameters:
Name Type Attributes Description
bgm MV.AudioParameters
pos Number <optional>

(static) playBgs(bgs, posopt)

Parameters:
Name Type Attributes Description
bgs MV.AudioParameters
pos Number <optional>

(static) playEncryptedBgm(bgm, posopt)

Parameters:
Name Type Attributes Description
bgm MV.AudioParameters
pos Number <optional>

(static) playMe(me)

Parameters:
Name Type Description
me MV.AudioParameters

(static) playSe(se)

Parameters:
Name Type Description
se MV.AudioParameters

(static) playStaticSe(se)

Parameters:
Name Type Description
se MV.AudioParameters

(static) replayBgm(bgm)

Parameters:
Name Type Description
bgm MV.AudioParameters

(static) replayBgs(bgs)

Parameters:
Name Type Description
bgs MV.AudioParameters

(static) saveBgm() → {MV.AudioParameters}

Returns:
Type
MV.AudioParameters

(static) saveBgs() → {MV.AudioParameters}

Returns:
Type
MV.AudioParameters

(static) shouldUseHtml5Audio() → {Boolean}

The only case where we wanted html5audio was android/ no encrypt Atsuma-ru asked to force webaudio there too, so just return false for ALL
Returns:
Type
Boolean

(static) stopAll()

(static) stopBgm()

(static) stopBgs()

(static) stopMe()

(static) stopSe()

(static) updateBgmParameters(bgm)

Parameters:
Name Type Description
bgm MV.AudioParameters

(static) updateBgsParameters(bgs)

Parameters:
Name Type Description
bgs MV.AudioParameters

(static) updateBufferParameters(buffer, configVolume, audio)

Parameters:
Name Type Description
buffer MV.AudioParameters
configVolume Number
audio MV.AudioParameters

(static) updateCurrentBgm(bgm, pos)

Parameters:
Name Type Description
bgm MV.AudioParameters
pos Number

(static) updateCurrentBgs(bgs, pos)

Parameters:
Name Type Description
bgs MV.AudioParameters
pos Number

(static) updateMeParameters(me)

Parameters:
Name Type Description
me MV.AudioParameters

(static) updateSeParameters(buffer, se)

Parameters:
Name Type Description
buffer MV.AudioParameters
se MV.AudioParameters