User:Corban/AudioAPI: Difference between revisions

Jump to navigation Jump to search
Line 113: Line 113:
The '''mozFrameBuffer''' attribute contains the raw audio data (float values) obtained from decoding a single frame of audio.  This is of the form <nowiki>[left, right, left, right, ...]</nowiki>.  All audio frames are normalized to a length of 4096 or greater, where shorter frames are padded with 0 (zero).
The '''mozFrameBuffer''' attribute contains the raw audio data (float values) obtained from decoding a single frame of audio.  This is of the form <nowiki>[left, right, left, right, ...]</nowiki>.  All audio frames are normalized to a length of 4096 or greater, where shorter frames are padded with 0 (zero).


The '''mozSpectrum''' attribute contains a pre-calculated FFT for this frame of audio data.  It is calculated on using the first 4096 float values in the current audio frame only, which may include zeros used to pad the buffer.  It is always 2048 elements in length.
The '''mozSpectrum''' attribute contains a pre-calculated FFT for this frame of audio data.  It is calculated using the first 4096 float values in the current audio frame only, which may include zeros used to pad the buffer.  It is always 2048 elements in length.


===== nsIDOMHTMLMediaElement additions =====
===== nsIDOMHTMLMediaElement additions =====
Confirmed users
656

edits

Navigation menu