VolumeDetector
Detects the overall volume level of the audio source in real time.
| Type | Name | Interface Description |
|---|---|---|
| Functions | constructor() | |
| Functions | getResult(): number | • Function: Gets the current volume detection result. Returns A normalized volume value in the range [0, 1], or -1 when no result is available. |
Examples
constructor()
let obj = new APJS.VolumeDetector();
Use Case
@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use VolumeDetector here
}
onUpdate(deltaTime: number) {
}
}