* Create a {@link AudioAnalyser} object, which uses an {@link https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode | AnalyserNode} to analyse audio data.
5
* This uses the {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API | Web Audio API}.
6
* @example
7
* ```typescript
8
* // create an AudioListener and add it to the camera
9
* const listener = new THREE.AudioListener();
10
* camera.add(listener);
11
* // create an Audio source
12
* const sound = new THREE.Audio(listener);
13
* // load a sound and set it as the Audio object's buffer
14
* const audioLoader = new THREE.AudioLoader();
15
* audioLoader.load('sounds/ambient.ogg', function (buffer) {
16
* sound.setBuffer(buffer);
17
* sound.setLoop(true);
18
* sound.setVolume(0.5);
19
* sound.play();
20
* });
21
* // create an AudioAnalyser, passing in the sound and desired fftSize
22
* const analyser = new THREE.AudioAnalyser(sound, 32);
* An {@link https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode | AnalyserNode} used to analyze audio.
41
*/
42
analyser: AnalyserNode;
43
44
/**
45
* A Uint8Array with size determined by {@link https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/frequencyBinCount | analyser.frequencyBinCount} used to hold analysis data.
46
*/
47
data: Uint8Array;
48
49
/**
50
* Uses the Web Audio's {@link https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getByteFrequencyData | getByteFrequencyData} method
51
*/
52
getFrequencyData(): Uint8Array;
53
54
/**
55
* Get the average of the frequencies returned by the {@link AudioAnalyser.getFrequencyData | getFrequencyData} method.