Search completed in 0.99 seconds.
AudioContextOptions.sampleRate - Web APIs
the audiocontextoptions dictionary (used when instantiating an audiocontext) may contain a property named
samplerate, which indicates the sample rate to use for the new context.
... the audiocontextoptions dictionary (used when instantiating an audiocontext) may contain a property named
samplerate, which indicates the sample rate to use for the new context.
...ns dictionary (used when instantiating an audiocontext) may contain a property named
samplerate, which indicates the sample rate to use for the new context.
...And 5 more matches
AudioBuffer.sampleRate - Web APIs
the
samplerate property of the audiobuffer interface returns a float representing the sample rate, in samples per second, of the pcm data stored in the buffer.
... the
samplerate property of the audiobuffer interface returns a float representing the sample rate, in samples per second, of the pcm data stored in the buffer.
... the
samplerate property of the audiobuffer interface returns a float representing the sample rate, in samples per second, of the pcm data stored in the buffer.
...And 3 more matches
MediaTrackSettings.sampleRate - Web APIs
the mediatracksettings dictionary's
samplerate property is an integer indicating how many audio samples per second the mediastreamtrack is currently configured for.
... the mediatracksettings dictionary's
samplerate property is an integer indicating how many audio samples per second the mediastreamtrack is currently configured for.
...or.
...And 3 more matches
MediaTrackSupportedConstraints.sampleRate - Web APIs
the mediatracksupportedconstraints dictionary's
samplerate property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the
samplerate constraint.
...ean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the
samplerate constraint.
...rned by mediadevices.getsupportedconstraints() if and only if the user agent supports the
samplerate constraint.
...And 3 more matches
BaseAudioContext.sampleRate - Web APIs
the
samplerate property of the baseaudiocontext interface returns a floating point number representing the sample rate, in samples per second, used by all nodes in this audio context.
... the
samplerate property of the baseaudiocontext interface returns a floating point number representing the sample rate, in samples per second, used by all nodes in this audio context.
...by all nodes in this audio context.
...And 2 more matches
MediaTrackConstraints.sampleRate - Web APIs
the mediatrackconstraints dictionary's
samplerate property is a constrainlong describing the requested or mandatory constraints placed upon the value of the
samplerate constrainable property.
... the mediatrackconstraints dictionary's
samplerate property is a constrainlong describing the requested or mandatory constraints placed upon the value of the
samplerate constrainable property.
...ue of the
samplerate constrainable property.
...And 2 more matches
Index - Web APIs
iobuffer.length api, audiobuffer, property, reference, web audio api, length the length property of the audiobuffer interface returns an integer representing the length, in sample-frames, of the pcm data stored in the buffer.
...api, length the length property of the audiobuffer interface returns an integer representing the length, in sample-frames, of the pcm data stored in the buffer.
..., web audio, web audio api, latency the audiocontextlatencycategory type is an enumerated set of strings which are used to select one of a number of default values for acceptable maximum latency of an audio context.
...And 18 more matches
Creating a Web based tone generator - Archive of obsolete content
d so that we can fill a 500 ms buffer of audio samples.
...te example</title> </head> <body> <input type="text" size="4" id="freq" value="440"><label for="hz">hz</label> <button onclick="start()">play</button> <button onclick="stop()">stop</button> <script type="text/javascript"> function audiodatadestination(
samplerate, readfn) { // initialize the audio output.
...value="440"><label for="hz">hz</label> <button onclick="start()">play</button> <button onclick="stop()">stop</button> <script type="text/javascript"> function audiodatadestination(
samplerate, readfn) { // initialize the audio output.
...And 3 more matches
Introducing the Audio API extension - Archive of obsolete content
escribes a non-standard experimental api.
...tracts the data from an audio element: <!doctype html> <html> <head> <title>javascript metadata example</title> </head> <body> <audio id="audio-element" src="song.ogg" controls="true" style="width: 512px;"> </audio> <script> function loadedmetadata() { channels = audio.mozchannels; rate = audio.moz
samplerate; framebufferlength = audio.mozframebufferlength; } var audio = document.getelementbyid('audio-element'); audio.addeventlistener('loadedmetadata', loadedmetadata, false); </script> </body> </html> the mozaudioavailable event as the audio is played, sample data is made available to the audio layer and the audio buffer (size defined in mozframebufferlength) gets f...
...ent: <!doctype html> <html> <head> <title>javascript visualization example</title> </head> <body> <audio id="audio-element" src="revolve.ogg" controls="true" style="width: 512px;"> </audio> <pre id="raw">hello</pre> <script> function loadedmetadata() { channels = audio.mozchannels; rate = audio.moz
samplerate; framebufferlength = audio.mozframebufferlength; } function audioavailable(event) { var framebuffer = event.framebuffer; var t = event.time; var text = "samples at: " + t + "\n"; text += framebuffer[0] + " " + framebuffer[1]; raw.innerhtml = text; } var raw = document.getelementbyid('raw'); var audio = document...
...And 3 more matches
BaseAudioContext.createBuffer() - Web APIs
ing other code execution.
...integer representing the number of channels this buffer should have.
...senting the number of channels this buffer should have.
...And 3 more matches
AudioContext() - Web APIs
ncyhint optional the type of playback that the context will be used for, as a value from the audiocontextlatencycategory enum or a double-precision floating-point value indicating the preferred maximum latency of the context in seconds.
...e of playback that the context will be used for, as a value from the audiocontextlatencycategory enum or a double-precision floating-point value indicating the preferred maximum latency of the context in seconds.
...ue latency after creating the context.
...throws a typeerror exception with the message "the provided value '...' is not a valid enum value of type audiocontextlatencycategory".
BiquadFilterNode.getFrequencyResponse() - Web APIs
encyarray, magresponseoutput, phaseresponseoutput); parameters frequencyarray a float32array containing an array of frequencies, specified in hertz, which you want to filter.
...seoutput, phaseresponseoutput); parameters frequencyarray a float32array containing an array of frequencies, specified in hertz, which you want to filter.
...ue is outside the range 0.0 to
samplerate/2 (where
samplerate is the sample rate of the audiocontext), the corresponding value in this array is nan.
...nge 0.0 to
samplerate/2 (where
samplerate is the sample rate of the audiocontext), the corresponding value in this array is nan.
OfflineAudioContext.OfflineAudioContext() - Web APIs
the offlineaudiocontext() constructor—part of the web audio api—creates and returns a new offlineaudiocontext object instance, which can then be used to render audio to an audiobuffer rather than to an audio output device.
...ndividual parameters are the same.
...e number of channels the resulting audiobuffer should have.
...frames, samples and channels from our basic concepts guide.
Advanced techniques: Creating and sequencing audio - Web APIs
se numbers into, however, one that the web audio api understands.
...tands.
...to a buffer (we'll get to that later on in the tutorial), or you can create an empty buffer and fill it with your own data.
...; durcontrol.addeventlistener('input', function() { noiseduration = number(this.value); }, false); let bandhz = 1000; const bandcontrol = document.queryselector('#band'); bandcontrol.addeventlistener('input', function() { bandhz = number(this.value); }, false); the final playnoise() function here's the entire playnoise() function: function playnoise() { const buffersize = audioctx.
samplerate * noiseduration; // set the time of the note const buffer = audioctx.createbuffer(1, buffersize, audioctx.
samplerate); // create an empty buffer let data = buffer.getchanneldata(0); // get data // fill the buffer with noise for (let i = 0; i < buffersize; i++) { data[i] = math.random() * 2 - 1; } // create a buffer source for our created data let noise = audi...
AudioBuffer() - Web APIs
the audiobuffer constructor of the web audio api creates a new audiobuffer object.
...nherits parameters from the audionodeoptions dictionary.
...to 96,000 hz (but are allowed to go farther outside this range).
AudioBuffer.duration - Web APIs
the duration property of the audiobuffer interface returns a double representing the duration, in seconds, of the pcm data stored in the buffer.
...e audiobuffer interface returns a double representing the duration, in seconds, of the pcm data stored in the buffer.
...he pcm data stored in the buffer.
AudioBuffer.getChannelData() - Web APIs
the getchanneldata() method of the audiobuffer interface returns a float32array containing the pcm data associated with the channel, defined by the channel parameter (with 0 representing the first channel).
...he source.
...var button = document.queryselector('button'); var pre = document.queryselector('pre'); var myscript = document.queryselector('script'); pre.innerhtml = myscript.innerhtml; // stereo var channels = 2; // create an empty two second stereo buffer at the // sample rate of the audiocontext var framecount = audioctx.
samplerate * 2.0; var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.
samplerate); button.onclick = function() { // fill the buffer with white noise; //just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < framecount; i++) { // math.random() is in [0; 1.0] // audio needs ...
AudioBuffer.length - Web APIs
the length property of the audiobuffer interface returns an integer representing the length, in sample-frames, of the pcm data stored in the buffer.
...iobuffer interface returns an integer representing the length, in sample-frames, of the pcm data stored in the buffer.
...the pcm data stored in the buffer.
AudioBuffer.numberOfChannels - Web APIs
the numberofchannels property of the audiobuffer interface returns an integer representing the number of discrete audio channels described by the pcm data stored in the buffer.
... integer representing the number of discrete audio channels described by the pcm data stored in the buffer.
...a stored in the buffer.
AudioBuffer - Web APIs
buffer contains data in the following format: non-interleaved ieee754 32-bit linear pcm with a nominal range between -1 and +1, that is, 32bits floating point buffer, with each samples between -1.0 and 1.0.
... shows how to create an audiobuffer and fill it with random white noise.
...udiobuffer and fill it with random white noise.
AudioContextOptions - Web APIs
ncyhint optional the type of playback that the context will be used for, as a value from the audiocontextlatencycategory enum or a double-precision floating-point value indicating the preferred maximum latency of the context in seconds.
...e of playback that the context will be used for, as a value from the audiocontextlatencycategory enum or a double-precision floating-point value indicating the preferred maximum latency of the context in seconds.
...ould select a latency that will maximize playback time by minimizing power consumption at the expense of latency.
Visualizing an audio spectrum - Archive of obsolete content
idth: 512px;"> </audio> <div><canvas id="fft" width="512" height="200"></canvas></div> <script> var canvas = document.getelementbyid('fft'), ctx = canvas.getcontext('2d'), channels, rate, framebufferlength, fft; function loadedmetadata() { channels = audio.mozchannels; rate = audio.moz
samplerate; framebufferlength = audio.mozframebufferlength; fft = new fft(framebufferlength / channels, rate); } function audioavailable(event) { var fb = event.framebuffer, t = event.time, /* unused, but it's there */ signal = new float32array(fb.length / channels), magnitude; for (var i = 0, fbl = framebufferlength / 2; i ...
...aw rectangle bars for each frequency bin ctx.fillrect(i * 4, canvas.height, 3, -magnitude); } } var audio = document.getelementbyid('audio-element'); audio.addeventlistener('mozaudioavailable', audioavailable, false); audio.addeventlistener('loadedmetadata', loadedmetadata, false); // fft from dsp.js, see below var fft = function(buffersize,
samplerate) { this.buffersize = buffersize; this.
samplerate =
samplerate; this.spectrum = new float32array(buffersize/2); this.real = new float32array(buffersize); this.imag = new float32array(buffersize); this.reversetable = new uint32array(buffersize); this.sintable = new float32array(buffersize); this.costable ...
AudioBufferSourceNode - Web APIs
, fill it with white noise, and then play it using an audiobuffersourcenode.
...e, and then play it using an audiobuffersourcenode.
AudioWorkletGlobalScope - Web APIs
presents the ever-increasing current sample-frame of the audio block being processed.
... console.log(currentframe) console.log(currenttime) } // the process method is required - simply output silence, // which the outputs are already filled with process (inputs, outputs, parameters) { return true } } // the sample rate is not going to change ever, // because it's a read-only property of a baseaudiocontext // and is set only during its instantiation console.log(
samplerate) // you can declare any variables and use them in your processors // for example it may be an arraybuffer with a wavetable const usefulvariable = 42 console.log(usefulvariable) registerprocessor('test-processor', testprocessor) next, in our main scripts file we'll load the processor, create an instance of audioworkletnode — passing the name of the processor to it — and connect the node to...
BaseAudioContext.createBufferSource() - Web APIs
e source.
...var button = document.queryselector('button'); var pre = document.queryselector('pre'); var myscript = document.queryselector('script'); pre.innerhtml = myscript.innerhtml; // stereo var channels = 2; // create an empty two second stereo buffer at the // sample rate of the audiocontext var framecount = audioctx.
samplerate * 2.0; var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.
samplerate); button.onclick = function() { // fill the buffer with white noise; //just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < framecount; i++) { // math.random() is in [0; 1.0] // audio needs ...
MediaConfiguration - Web APIs
s the parameter for mediacapabilities.encodinginfo() method, has it's `type` set as: record: for recording media.
...// number of bits used to encode 1s of video framerate : 30 // number of frames making up that 1s.
MediaTrackSettings - Web APIs
ime which elapses between the start of processing the audio and the data being available to the next stop in the audio utilization process.
...ata being available to the next stop in the audio utilization process.
MediaTrackSupportedConstraints - Web APIs
nstraint is supported in the current environment.
...ngmode a boolean value whose value is true if the facingmode constraint is supported in the current environment.
Displaying a graphic with audio samples - Archive of obsolete content
ight="200"></canvas></div> <img id="mozlogo" style="display:none" src="mozilla2.png"></img> <script> var canvas = document.getelementbyid('fft'), ctx = canvas.getcontext('2d'), channels, rate, framebufferlength, fft; function loadedmetadata() { channels = audio.mozchannels; rate = audio.moz
samplerate; framebufferlength = audio.mozframebufferlength; fft = new fft(framebufferlength / channels, rate); } function audioavailable(event) { var fb = event.framebuffer, t = event.time, /* unused, but it's there */ signal = new float32array(fb.length / channels), magnitude; for (var i = 0, fbl = framebufferlength...
nsIDOMMozNetworkStatsManager
est getallalarms([optional] in nsisupports network); nsidomdomrequest removealarms([optional] in long alarmid); nsidomdomrequest clearstats(in nsisupports network); nsidomdomrequest clearallstats(); nsidomdomrequest getavailablenetworks(); nsidomdomrequest getavailableservicetypes(); attributes attribute type description
samplerate long minimum time in milliseconds between samples stored in the database.
HTMLMediaElement: loadedmetadata event - Web APIs
bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onloadedmetadata specification html5 media additional properties property type description mozchannels read only int the number of channels.
Using the Media Capabilities API - Web APIs
erate: 15 } }; had we been querying the decodability of an audio file, we would create an audio configuration including the number of channels and sample rate, leaving out the properties that apply only to video—namely, the dimensions and the frame rate: const audioconfiguration = { type: "file", audio: { contenttype: "audio/ogg", channels: 2, bitrate: 132700,
samplerate: 5200 } }; had we been testing encoding capabilities, we would have created a mediaencodingconfiguration, which requires the type of media being tested — either record (for recording media, i.e.
Media Capabilities API - Web APIs
this example defines a audio configuration then checks to see if the user agent supports decoding that media configuration, and whether it will perform well in terms of smoothness and power efficiency.
Using the Screen Capture API - Web APIs
s: const gdmoptions = { video: true, audio: true } this allows the user total freedom to select whatever they want, within the limits of what the user agent supports.
Configuring servers for Ogg media - HTTP
age, 27.508% ogg overhead presentation-time: 0.000 basetime: 0.000 theora: serialno 0170995062 1790 packets in 1068 pages, 1.7 packets/page, 1.049% ogg overhead video-framerate: 29.983 fps video-width: 640 video-height: 360 vorbis: serialno 0708996688 4531 packets in 167 pages, 27.1 packets/page, 1.408% ogg overhead audio-
samplerate: 44100 hz audio-channels: 2 note that you can't simply serve up the reported content-duration line reported by oggz-info, because it's reported in hh:mm:ss format.