Changes

Jump to: navigation, search

Audio Data API

129 bytes added, 14:14, 2 June 2010
nsIDOMNotifyAudioWrittenEvent
{
// mozFrameBuffer is really a Float32Array, via dom_quickstubs
readonly attribute nsIVariant mozFrameBuffer; readonly attribute unsigned long long mozTime;
};
</pre>
The '''mozFrameBuffer''' attribute contains a typed array ('''Float32Array''') and with the raw audio data (32-bit float values) obtained from decoding a single frame of the audio (e.g., the raw data being sent to the audio hardware vs. encoded audio). This is of the form <nowiki>[leftchannel1, channel2, ..., channelN, channel1, rightchannel2, left..., rightchannelN, ...]</nowiki>. All audio frames are normalized to a length of channels * 1024 by default, but could be any power of 2 between 512 and 32768 if the user has set a different size using '''mozSetFrameBufferSize()'''.
The '''mozTime''' attribute contains an unsigned integer (64-bit) representing the time in milliseconds since the start.
===== nsIDOMHTMLAudioElement additions =====
Confirm
656
edits

Navigation menu