# [name]

Cria um objeto AudioAnalyser, que usa um [link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode AnalyserNode] para analisar informações de audio.
Utiliza a [link:https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API Web Audio API].

## Exemplo de Código

`// create an AudioListener and add it to the camera const listener = new THREE.AudioListener(); camera.add( listener ); // create an Audio source const sound = new THREE.Audio( listener ); // load a sound and set it as the Audio object's buffer const audioLoader = new THREE.AudioLoader(); audioLoader.load( 'sounds/ambient.ogg', function( buffer ) { sound.setBuffer( buffer ); sound.setLoop(true); sound.setVolume(0.5); sound.play(); }); // create an AudioAnalyser, passing in the sound and desired fftSize const analyser = new THREE.AudioAnalyser( sound, 32 ); // get the average frequency of the sound const data = analyser.getAverageFrequency();`

## Exemplos

[example:webaudio_sandbox webaudio / sandbox ]
[example:webaudio_visualizer webaudio / visualizer ]

## Construtor

### [name]( audio, [link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/fftSize fftSize] )

Cria um novo [page:AudioAnalyser AudioAnalyser].

## Propriedades

### [property:AnalyserNode analyser]

Um [link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode AnalyserNode] usado para analisar áudio.

### [property:Integer fftSize]

Uma potência diferente de zero que vai de 2 até 2048, representando o tamanho da FFT (Fast Fourier Transform - Transformada Rápida de Fourier) a ser usada para determinar o domínio da frequência. Ver [link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/fftSize esse link] para detalhes.

### [property:Uint8Array data]

Um Uint8Array com tamanho determinado por [link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/frequencyBinCount analyser.frequencyBinCount] usado para armazenar dados de análise.

## Métodos

### [method:Uint8Array getFrequencyData]()

Usa o método [link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getByteFrequencyData getByteFrequencyData] do Web Audio. Veja essa página.

### [method:Number getAverageFrequency]()

Obtenha a média das frequências retornadas pelo método [page:AudioAnalyser.getFrequencyData getFrequencyData].

## Source

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]