Audio

An audio entity created with:

new virtuosity.audioManager.Audio(name, path);

new virtuosity.audioManager.Audio();


Parameter Type Description

Methods

Properties


Methods

play

plays the audio

virtuosity.audioManager.Audio.play();

pause

pauses the audio

virtuosity.audioManager.Audio.pause();

stop

stops the audio

virtuosity.audioManager.Audio.stop();

fade

fades the audio

virtuosity.audioManager.Audio.fade(from, to, duration);


Parameter Type Description
from Number starting point, value between 0-1 (1 being the loudest).
to Number ending point, value between 0-1 (1 being the loudest).
duration Number length of time the fade takes (in miliseconds)


Properties

x

Int

x position of the audio

virtuosity.audioManager.Audio.x

y

Int

y position of the audio

virtuosity.audioManager.Audio.y

z

Int

z position of the audio

virtuosity.audioManager.Audio.z

volume

Number

volume of the audio

virtuosity.audioManager.Audio.volume

length

Int

length of the audio

virtuosity.audioManager.Audio.length

time

Int

current time of the audio

virtuosity.audioManager.Audio.time

speed

Number

speed of the audio (between 0.5 and 4)

virtuosity.audioManager.Audio.speed

loaded

Boolean

boolean value of if the audio has loaded

virtuosity.audioManager.Audio.loaded

loop

Boolean

boolean value of if the audio will loop

virtuosity.audioManager.Audio.loop