mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Auto merge of #21910 - ferjm:audiobuffer.shared.fix, r=Manishearth
Allow reusing AudioBuffers - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #21887 - [X] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21910) <!-- Reviewable:end -->
This commit is contained in:
commit
bf192caf4b
21 changed files with 208 additions and 268 deletions
10
Cargo.lock
generated
10
Cargo.lock
generated
|
@ -3235,7 +3235,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "servo-media"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/media#ce50f1332cc2b70e859b793425c9ec7086137303"
|
||||
source = "git+https://github.com/servo/media#b274b9636d4f90e44835735279674c1279e75592"
|
||||
dependencies = [
|
||||
"servo-media-audio 0.1.0 (git+https://github.com/servo/media)",
|
||||
"servo-media-gstreamer 0.1.0 (git+https://github.com/servo/media)",
|
||||
|
@ -3245,7 +3245,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "servo-media-audio"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/media#ce50f1332cc2b70e859b793425c9ec7086137303"
|
||||
source = "git+https://github.com/servo/media#b274b9636d4f90e44835735279674c1279e75592"
|
||||
dependencies = [
|
||||
"boxfnonce 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byte-slice-cast 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3262,7 +3262,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "servo-media-gstreamer"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/media#ce50f1332cc2b70e859b793425c9ec7086137303"
|
||||
source = "git+https://github.com/servo/media#b274b9636d4f90e44835735279674c1279e75592"
|
||||
dependencies = [
|
||||
"byte-slice-cast 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"glib 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3280,7 +3280,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "servo-media-player"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/media#ce50f1332cc2b70e859b793425c9ec7086137303"
|
||||
source = "git+https://github.com/servo/media#b274b9636d4f90e44835735279674c1279e75592"
|
||||
dependencies = [
|
||||
"ipc-channel 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3376,7 +3376,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "servo_media_derive"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/servo/media#ce50f1332cc2b70e859b793425c9ec7086137303"
|
||||
source = "git+https://github.com/servo/media#b274b9636d4f90e44835735279674c1279e75592"
|
||||
dependencies = [
|
||||
"quote 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
|
@ -17,6 +17,7 @@ use js::rust::CustomAutoRooterGuard;
|
|||
use js::rust::wrappers::JS_DetachArrayBuffer;
|
||||
use js::typedarray::{CreateWith, Float32Array};
|
||||
use servo_media::audio::buffer_source_node::AudioBuffer as ServoMediaAudioBuffer;
|
||||
use std::cell::Ref;
|
||||
use std::cmp::min;
|
||||
use std::ptr::{self, NonNull};
|
||||
|
||||
|
@ -27,15 +28,30 @@ pub const MAX_SAMPLE_RATE: f32 = 192000.;
|
|||
|
||||
type JSAudioChannel = Heap<*mut JSObject>;
|
||||
|
||||
/// The AudioBuffer keeps its data either in js_channels
|
||||
/// or in shared_channels if js_channels buffers are detached.
|
||||
///
|
||||
/// js_channels buffers are (re)attached right before calling GetChannelData
|
||||
/// and remain attached until its contents are needed by some other API
|
||||
/// implementation. Follow https://webaudio.github.io/web-audio-api/#acquire-the-content
|
||||
/// to know in which situations js_channels buffers must be detached.
|
||||
///
|
||||
#[dom_struct]
|
||||
pub struct AudioBuffer {
|
||||
reflector_: Reflector,
|
||||
/// Float32Arrays returned by calls to GetChannelData.
|
||||
js_channels: DomRefCell<Vec<JSAudioChannel>>,
|
||||
/// Aggregates the data from js_channels.
|
||||
/// This is Some<T> iff the buffers in js_channels are detached.
|
||||
#[ignore_malloc_size_of = "servo_media"]
|
||||
shared_channels: DomRefCell<ServoMediaAudioBuffer>,
|
||||
shared_channels: DomRefCell<Option<ServoMediaAudioBuffer>>,
|
||||
/// https://webaudio.github.io/web-audio-api/#dom-audiobuffer-samplerate
|
||||
sample_rate: f32,
|
||||
/// https://webaudio.github.io/web-audio-api/#dom-audiobuffer-length
|
||||
length: u32,
|
||||
/// https://webaudio.github.io/web-audio-api/#dom-audiobuffer-duration
|
||||
duration: f64,
|
||||
/// https://webaudio.github.io/web-audio-api/#dom-audiobuffer-numberofchannels
|
||||
number_of_channels: u32,
|
||||
}
|
||||
|
||||
|
@ -47,10 +63,7 @@ impl AudioBuffer {
|
|||
AudioBuffer {
|
||||
reflector_: Reflector::new(),
|
||||
js_channels: DomRefCell::new(vec),
|
||||
shared_channels: DomRefCell::new(ServoMediaAudioBuffer::new(
|
||||
number_of_channels as u8,
|
||||
length as usize,
|
||||
)),
|
||||
shared_channels: DomRefCell::new(None),
|
||||
sample_rate,
|
||||
length,
|
||||
duration: length as f64 / sample_rate as f64,
|
||||
|
@ -68,7 +81,7 @@ impl AudioBuffer {
|
|||
) -> DomRoot<AudioBuffer> {
|
||||
let buffer = AudioBuffer::new_inherited(number_of_channels, length, sample_rate);
|
||||
let buffer = reflect_dom_object(Box::new(buffer), global, AudioBufferBinding::Wrap);
|
||||
buffer.set_channels(initial_data);
|
||||
buffer.set_initial_data(initial_data);
|
||||
buffer
|
||||
}
|
||||
|
||||
|
@ -96,18 +109,18 @@ impl AudioBuffer {
|
|||
|
||||
// Initialize the underlying channels data with initial data provided by
|
||||
// the user or silence otherwise.
|
||||
#[allow(unsafe_code)]
|
||||
pub fn set_channels(&self, initial_data: Option<&[Vec<f32>]>) {
|
||||
fn set_initial_data(&self, initial_data: Option<&[Vec<f32>]>) {
|
||||
let mut channels = ServoMediaAudioBuffer::new(
|
||||
self.number_of_channels as u8,
|
||||
self.length as usize,
|
||||
);
|
||||
for channel in 0..self.number_of_channels {
|
||||
(*self.shared_channels.borrow_mut()).buffers[channel as usize] = match initial_data {
|
||||
channels.buffers[channel as usize] = match initial_data {
|
||||
Some(data) => data[channel as usize].clone(),
|
||||
None => vec![0.; self.length as usize],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_channels(&self) -> ServoMediaAudioBuffer {
|
||||
self.shared_channels.borrow().clone()
|
||||
*self.shared_channels.borrow_mut() = Some(channels);
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
|
@ -117,35 +130,39 @@ impl AudioBuffer {
|
|||
for (i, channel) in self.js_channels.borrow_mut().iter().enumerate() {
|
||||
if !channel.get().is_null() {
|
||||
// Already have data in JS array.
|
||||
// We may have called GetChannelData, and web content may have modified
|
||||
// js_channels. So make sure that shared_channels contains the same data as
|
||||
// js_channels.
|
||||
typedarray!(in(cx) let array: Float32Array = channel.get());
|
||||
if let Ok(array) = array {
|
||||
(*self.shared_channels.borrow_mut()).buffers[i] = array.to_vec();
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// Copy the channel data from shared_channels to js_channels.
|
||||
rooted!(in (cx) let mut array = ptr::null_mut::<JSObject>());
|
||||
if Float32Array::create(
|
||||
cx,
|
||||
CreateWith::Slice(&(*self.shared_channels.borrow_mut()).buffers[i]),
|
||||
array.handle_mut(),
|
||||
).is_err()
|
||||
{
|
||||
return false;
|
||||
if let Some(ref shared_channels) = *self.shared_channels.borrow() {
|
||||
// Step 4. of
|
||||
// https://webaudio.github.io/web-audio-api/#acquire-the-content
|
||||
// "Attach ArrayBuffers containing copies of the data to the AudioBuffer,
|
||||
// to be returned by the next call to getChannelData()".
|
||||
if Float32Array::create(
|
||||
cx,
|
||||
CreateWith::Slice(&shared_channels.buffers[i]),
|
||||
array.handle_mut(),
|
||||
).is_err()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
channel.set(array.get());
|
||||
}
|
||||
|
||||
*self.shared_channels.borrow_mut() = None;
|
||||
|
||||
true
|
||||
}
|
||||
|
||||
// https://webaudio.github.io/web-audio-api/#acquire-the-content
|
||||
#[allow(unsafe_code)]
|
||||
pub fn acquire_contents(&self) -> Option<ServoMediaAudioBuffer> {
|
||||
fn acquire_contents(&self) -> Option<ServoMediaAudioBuffer> {
|
||||
let mut result = ServoMediaAudioBuffer::new(
|
||||
self.number_of_channels as u8,
|
||||
self.length as usize,
|
||||
);
|
||||
let cx = self.global().get_cx();
|
||||
for (i, channel) in self.js_channels.borrow_mut().iter().enumerate() {
|
||||
// Step 1.
|
||||
|
@ -173,13 +190,20 @@ impl AudioBuffer {
|
|||
channel.set(ptr::null_mut());
|
||||
|
||||
// Step 3.
|
||||
(*self.shared_channels.borrow_mut()).buffers[i] = channel_data;
|
||||
|
||||
// Step 4 will complete turning shared_channels
|
||||
// data into js_channels ArrayBuffers in restore_js_channel_data.
|
||||
result.buffers[i] = channel_data;
|
||||
}
|
||||
|
||||
Some((*self.shared_channels.borrow()).clone())
|
||||
Some(result)
|
||||
}
|
||||
|
||||
pub fn get_channels(&self) -> Ref<Option<ServoMediaAudioBuffer>> {
|
||||
if self.shared_channels.borrow().is_none() {
|
||||
let channels = self.acquire_contents();
|
||||
if channels.is_some() {
|
||||
*self.shared_channels.borrow_mut() = channels;
|
||||
}
|
||||
}
|
||||
return self.shared_channels.borrow()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -254,10 +278,10 @@ impl AudioBufferMethods for AudioBuffer {
|
|||
let data = unsafe { array.as_slice() };
|
||||
dest.extend_from_slice(&data[offset..offset + bytes_to_copy]);
|
||||
}
|
||||
} else if let Some(shared_channel) =
|
||||
self.shared_channels.borrow().buffers.get(channel_number)
|
||||
{
|
||||
dest.extend_from_slice(&shared_channel.as_slice()[offset..offset + bytes_to_copy]);
|
||||
} else if let Some(ref shared_channels) = *self.shared_channels.borrow() {
|
||||
if let Some(shared_channel) = shared_channels.buffers.get(channel_number) {
|
||||
dest.extend_from_slice(&shared_channel.as_slice()[offset..offset + bytes_to_copy]);
|
||||
}
|
||||
}
|
||||
|
||||
unsafe {
|
||||
|
@ -297,21 +321,12 @@ impl AudioBufferMethods for AudioBuffer {
|
|||
typedarray!(in(cx) let js_channel: Float32Array = js_channel);
|
||||
if let Ok(mut js_channel) = js_channel {
|
||||
let bytes_to_copy = min(self.length - start_in_channel, source.len() as u32) as usize;
|
||||
let mut js_channel_data = unsafe { js_channel.as_mut_slice() };
|
||||
let (_, mut js_channel_data) =
|
||||
js_channel_data.split_at_mut(start_in_channel as usize);
|
||||
unsafe {
|
||||
let data = &source.as_slice()[0..bytes_to_copy];
|
||||
// Update shared channel.
|
||||
{
|
||||
let mut shared_channels = self.shared_channels.borrow_mut();
|
||||
let shared_channel = shared_channels.data_chan_mut(channel_number as u8);
|
||||
let (_, mut shared_channel) =
|
||||
shared_channel.split_at_mut(start_in_channel as usize);
|
||||
shared_channel[0..bytes_to_copy].copy_from_slice(data);
|
||||
}
|
||||
// Update js channel.
|
||||
js_channel.update(
|
||||
self.shared_channels.borrow().buffers[channel_number as usize].as_slice(),
|
||||
);
|
||||
}
|
||||
js_channel_data[0..bytes_to_copy].copy_from_slice(&source.as_slice()[0..bytes_to_copy])
|
||||
};
|
||||
} else {
|
||||
return Err(Error::IndexSize);
|
||||
}
|
||||
|
|
|
@ -137,14 +137,14 @@ impl AudioBufferSourceNodeMethods for AudioBufferSourceNode {
|
|||
self.buffer.set(new_buffer);
|
||||
|
||||
// Step 5.
|
||||
if self.source_node.started() {
|
||||
if self.source_node.has_start() {
|
||||
if let Some(buffer) = self.buffer.get() {
|
||||
let buffer = buffer.acquire_contents();
|
||||
let buffer = buffer.get_channels();
|
||||
if buffer.is_some() {
|
||||
self.source_node
|
||||
.node()
|
||||
.message(AudioNodeMessage::AudioBufferSourceNode(
|
||||
AudioBufferSourceNodeMessage::SetBuffer(buffer),
|
||||
AudioBufferSourceNodeMessage::SetBuffer((*buffer).clone()),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@ -215,12 +215,12 @@ impl AudioBufferSourceNodeMethods for AudioBufferSourceNode {
|
|||
}
|
||||
|
||||
if let Some(buffer) = self.buffer.get() {
|
||||
let buffer = buffer.acquire_contents();
|
||||
let buffer = buffer.get_channels();
|
||||
if buffer.is_some() {
|
||||
self.source_node
|
||||
.node()
|
||||
.message(AudioNodeMessage::AudioBufferSourceNode(
|
||||
AudioBufferSourceNodeMessage::SetBuffer(buffer),
|
||||
AudioBufferSourceNodeMessage::SetBuffer((*buffer).clone()),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ impl<'a> From<&'a AudioBufferSourceOptions> for AudioBufferSourceNodeOptions {
|
|||
Self {
|
||||
buffer: if let Some(ref buffer) = options.buffer {
|
||||
if let Some(ref buffer) = buffer {
|
||||
Some(buffer.get_channels())
|
||||
(*buffer.get_channels()).clone()
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
|
@ -18,8 +18,8 @@ use task_source::{TaskSource, TaskSourceName};
|
|||
#[dom_struct]
|
||||
pub struct AudioScheduledSourceNode {
|
||||
node: AudioNode,
|
||||
started: Cell<bool>,
|
||||
stopped: Cell<bool>,
|
||||
has_start: Cell<bool>,
|
||||
has_stop: Cell<bool>,
|
||||
}
|
||||
|
||||
impl AudioScheduledSourceNode {
|
||||
|
@ -39,8 +39,8 @@ impl AudioScheduledSourceNode {
|
|||
number_of_inputs,
|
||||
number_of_outputs,
|
||||
)?,
|
||||
started: Cell::new(false),
|
||||
stopped: Cell::new(false),
|
||||
has_start: Cell::new(false),
|
||||
has_stop: Cell::new(false),
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -48,8 +48,8 @@ impl AudioScheduledSourceNode {
|
|||
&self.node
|
||||
}
|
||||
|
||||
pub fn started(&self) -> bool {
|
||||
self.started.get()
|
||||
pub fn has_start(&self) -> bool {
|
||||
self.has_start.get()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ impl AudioScheduledSourceNodeMethods for AudioScheduledSourceNode {
|
|||
return Err(Error::Range("'when' must be a positive value".to_owned()));
|
||||
}
|
||||
|
||||
if self.started.get() || self.stopped.get() {
|
||||
if self.has_start.get() || self.has_stop.get() {
|
||||
return Err(Error::InvalidState);
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ impl AudioScheduledSourceNodeMethods for AudioScheduledSourceNode {
|
|||
AudioScheduledSourceNodeMessage::RegisterOnEndedCallback(callback),
|
||||
));
|
||||
|
||||
self.started.set(true);
|
||||
self.has_start.set(true);
|
||||
self.node
|
||||
.message(AudioNodeMessage::AudioScheduledSourceNode(
|
||||
AudioScheduledSourceNodeMessage::Start(*when),
|
||||
|
@ -107,10 +107,10 @@ impl AudioScheduledSourceNodeMethods for AudioScheduledSourceNode {
|
|||
return Err(Error::Range("'when' must be a positive value".to_owned()));
|
||||
}
|
||||
|
||||
if !self.started.get() {
|
||||
if !self.has_start.get() {
|
||||
return Err(Error::InvalidState);
|
||||
}
|
||||
self.stopped.set(true);
|
||||
self.has_stop.set(true);
|
||||
self.node
|
||||
.message(AudioNodeMessage::AudioScheduledSourceNode(
|
||||
AudioScheduledSourceNodeMessage::Stop(*when),
|
||||
|
|
|
@ -404385,6 +404385,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-reuse.html": [
|
||||
[
|
||||
"/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-reuse.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer.html": [
|
||||
[
|
||||
"/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer.html",
|
||||
|
@ -663014,6 +663020,10 @@
|
|||
"612a91cf4ef60f6f1d441d27e2ab86f32b94f0fd",
|
||||
"testharness"
|
||||
],
|
||||
"webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-reuse.html": [
|
||||
"dabe323cbe2226d32c63576199eda61c1aecb168",
|
||||
"testharness"
|
||||
],
|
||||
"webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer.html": [
|
||||
"a2c4581c4e80069f227fe29078bc3eb6409c8b4e",
|
||||
"testharness"
|
||||
|
|
|
@ -1,73 +1,2 @@
|
|||
[realtimeanalyser-fft-scaling.html]
|
||||
[X 2048-point FFT peak position is not equal to 64. Got 0.]
|
||||
expected: FAIL
|
||||
|
||||
[X 128-point FFT peak position is not equal to 4. Got 0.]
|
||||
expected: FAIL
|
||||
|
||||
[X 32768-point FFT peak value in dBFS is not greater than or equal to -13.56. Got -1000.]
|
||||
expected: FAIL
|
||||
|
||||
[X 64-point FFT peak value in dBFS is not greater than or equal to -13.56. Got -1000.]
|
||||
expected: FAIL
|
||||
|
||||
[X 4096-point FFT peak value in dBFS is not greater than or equal to -13.56. Got -1000.]
|
||||
expected: FAIL
|
||||
|
||||
[< [FFT scaling tests\] 22 out of 22 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X 128-point FFT peak value in dBFS is not greater than or equal to -13.56. Got -1000.]
|
||||
expected: FAIL
|
||||
|
||||
[X 8192-point FFT peak position is not equal to 256. Got 0.]
|
||||
expected: FAIL
|
||||
|
||||
[X 32-point FFT peak value in dBFS is not greater than or equal to -14.43. Got -1000.]
|
||||
expected: FAIL
|
||||
|
||||
[X 16384-point FFT peak value in dBFS is not greater than or equal to -13.56. Got -1000.]
|
||||
expected: FAIL
|
||||
|
||||
[X 256-point FFT peak value in dBFS is not greater than or equal to -13.56. Got -1000.]
|
||||
expected: FAIL
|
||||
|
||||
[X 8192-point FFT peak value in dBFS is not greater than or equal to -13.56. Got -1000.]
|
||||
expected: FAIL
|
||||
|
||||
[X 1024-point FFT peak position is not equal to 32. Got 0.]
|
||||
expected: FAIL
|
||||
|
||||
[X 64-point FFT peak position is not equal to 2. Got 0.]
|
||||
expected: FAIL
|
||||
|
||||
[X 512-point FFT peak value in dBFS is not greater than or equal to -13.56. Got -1000.]
|
||||
expected: FAIL
|
||||
|
||||
[X 32-point FFT peak position is not equal to 1. Got 0.]
|
||||
expected: FAIL
|
||||
|
||||
[X 16384-point FFT peak position is not equal to 512. Got 0.]
|
||||
expected: FAIL
|
||||
|
||||
[X 1024-point FFT peak value in dBFS is not greater than or equal to -13.56. Got -1000.]
|
||||
expected: FAIL
|
||||
|
||||
[X 2048-point FFT peak value in dBFS is not greater than or equal to -13.56. Got -1000.]
|
||||
expected: FAIL
|
||||
|
||||
[X 32768-point FFT peak position is not equal to 1024. Got 0.]
|
||||
expected: FAIL
|
||||
|
||||
[X 4096-point FFT peak position is not equal to 128. Got 0.]
|
||||
expected: FAIL
|
||||
|
||||
[X 512-point FFT peak position is not equal to 16. Got 0.]
|
||||
expected: FAIL
|
||||
|
||||
[X 256-point FFT peak position is not equal to 8. Got 0.]
|
||||
expected: FAIL
|
||||
|
||||
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||
expected: FAIL
|
||||
|
||||
expected: TIMEOUT
|
||||
|
|
|
@ -1,23 +1,20 @@
|
|||
[audiobuffersource-start.html]
|
||||
[X Case 4: start(when, 4_frames, 4_frames): play with explicit non-zero offset and duration expected to be equal to the array [4,5,6,7,0,0,0,0,0,0,0,0,0,0,0,0...\] but differs in 4 places:\n\tIndex\tActual\t\t\tExpected\n\t[0\]\t0.0000000000000000e+0\t4.0000000000000000e+0\n\t[1\]\t0.0000000000000000e+0\t5.0000000000000000e+0\n\t[2\]\t0.0000000000000000e+0\t6.0000000000000000e+0\n\t[3\]\t0.0000000000000000e+0\t7.0000000000000000e+0\n\t...and 0 more errors.]
|
||||
[< [Tests AudioBufferSourceNode start()\] 5 out of 18 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X Case 5: start(when, 7_frames): play with explicit non-zero offset near end of buffer expected to be equal to the array [7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...\] but differs in 1 places:\n\tIndex\tActual\t\t\tExpected\n\t[0\]\t0.0000000000000000e+0\t7.0000000000000000e+0]
|
||||
[X Case 7: start(when, 9_frames): play with explicit offset past end of buffer expected to be equal to the array [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...\] but differs in 7 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t1.0000000000000000e+0\t0.0000000000000000e+0\n\t[2\]\t2.0000000000000000e+0\t0.0000000000000000e+0\n\t[3\]\t3.0000000000000000e+0\t0.0000000000000000e+0\n\t[4\]\t4.0000000000000000e+0\t0.0000000000000000e+0\n\t...and 3 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
[X Case 8: start(when, 0, 15_frames): play with whole buffer, with long duration (clipped) expected to be equal to the array [0,1,2,3,4,5,6,7,0,0,0,0,0,0,0,0...\] but differs in 7 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t0.0000000000000000e+0\t1.0000000000000000e+0\n\t[2\]\t0.0000000000000000e+0\t2.0000000000000000e+0\n\t[3\]\t0.0000000000000000e+0\t3.0000000000000000e+0\n\t[4\]\t0.0000000000000000e+0\t4.0000000000000000e+0\n\t...and 3 more errors.]
|
||||
[X Case 4: start(when, 4_frames, 4_frames): play with explicit non-zero offset and duration expected to be equal to the array [4,5,6,7,0,0,0,0,0,0,0,0,0,0,0,0...\] but differs in 8 places:\n\tIndex\tActual\t\t\tExpected\n\t[0\]\t0.0000000000000000e+0\t4.0000000000000000e+0\n\t[1\]\t1.0000000000000000e+0\t5.0000000000000000e+0\n\t[2\]\t2.0000000000000000e+0\t6.0000000000000000e+0\n\t[3\]\t3.0000000000000000e+0\t7.0000000000000000e+0\n\t...and 4 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
[X Case 1: start(when, 0): play whole buffer from beginning to end explicitly giving offset of 0 expected to be equal to the array [0,1,2,3,4,5,6,7,0,0,0,0,0,0,0,0...\] but differs in 7 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t0.0000000000000000e+0\t1.0000000000000000e+0\n\t[2\]\t0.0000000000000000e+0\t2.0000000000000000e+0\n\t[3\]\t0.0000000000000000e+0\t3.0000000000000000e+0\n\t[4\]\t0.0000000000000000e+0\t4.0000000000000000e+0\n\t...and 3 more errors.]
|
||||
[X Case 6: start(when, 8_frames): play with explicit offset at end of buffer expected to be equal to the array [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...\] but differs in 7 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t1.0000000000000000e+0\t0.0000000000000000e+0\n\t[2\]\t2.0000000000000000e+0\t0.0000000000000000e+0\n\t[3\]\t3.0000000000000000e+0\t0.0000000000000000e+0\n\t[4\]\t4.0000000000000000e+0\t0.0000000000000000e+0\n\t...and 3 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
[X Case 2: start(when, 0, 8_frames): play whole buffer from beginning to end explicitly giving offset of 0 and duration of 8 frames expected to be equal to the array [0,1,2,3,4,5,6,7,0,0,0,0,0,0,0,0...\] but differs in 7 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t0.0000000000000000e+0\t1.0000000000000000e+0\n\t[2\]\t0.0000000000000000e+0\t2.0000000000000000e+0\n\t[3\]\t0.0000000000000000e+0\t3.0000000000000000e+0\n\t[4\]\t0.0000000000000000e+0\t4.0000000000000000e+0\n\t...and 3 more errors.]
|
||||
[X Case 3: start(when, 4_frames): play with explicit non-zero offset expected to be equal to the array [4,5,6,7,0,0,0,0,0,0,0,0,0,0,0,0...\] but differs in 8 places:\n\tIndex\tActual\t\t\tExpected\n\t[0\]\t0.0000000000000000e+0\t4.0000000000000000e+0\n\t[1\]\t1.0000000000000000e+0\t5.0000000000000000e+0\n\t[2\]\t2.0000000000000000e+0\t6.0000000000000000e+0\n\t[3\]\t3.0000000000000000e+0\t7.0000000000000000e+0\n\t...and 4 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
[< [Tests AudioBufferSourceNode start()\] 6 out of 18 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X Case 3: start(when, 4_frames): play with explicit non-zero offset expected to be equal to the array [4,5,6,7,0,0,0,0,0,0,0,0,0,0,0,0...\] but differs in 4 places:\n\tIndex\tActual\t\t\tExpected\n\t[0\]\t0.0000000000000000e+0\t4.0000000000000000e+0\n\t[1\]\t0.0000000000000000e+0\t5.0000000000000000e+0\n\t[2\]\t0.0000000000000000e+0\t6.0000000000000000e+0\n\t[3\]\t0.0000000000000000e+0\t7.0000000000000000e+0\n\t...and 0 more errors.]
|
||||
[X Case 5: start(when, 7_frames): play with explicit non-zero offset near end of buffer expected to be equal to the array [7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...\] but differs in 8 places:\n\tIndex\tActual\t\t\tExpected\n\t[0\]\t0.0000000000000000e+0\t7.0000000000000000e+0\n\t[1\]\t1.0000000000000000e+0\t0.0000000000000000e+0\n\t[2\]\t2.0000000000000000e+0\t0.0000000000000000e+0\n\t[3\]\t3.0000000000000000e+0\t0.0000000000000000e+0\n\t...and 4 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
[buffer-resampling.html]
|
||||
[X SNR (0.001829 dB) is not greater than or equal to 37.17. Got 0.0018292814994553732.]
|
||||
expected: FAIL
|
||||
|
||||
[< [interpolate\] 2 out of 2 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X Interpolated sine wave does not equal [0,0.05756402388215065,0.11493714898824692,0.17192909121513367,0.22835086286067963,0.28401535749435425,0.3387379050254822,0.3923371136188507,0.44463518261909485,0.4954586327075958,0.5446390509605408,0.5920131802558899,0.6374239921569824,0.680720865726471,0.7217602133750916,0.760405957698822...\] with an element-wise tolerance of {"absoluteThreshold":0.090348,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[0\]\t-1.6697746515274048e-1\t0.0000000000000000e+0\t1.6697746515274048e-1\tInfinity\t9.0347999999999998e-2\n\t[1\]\t-1.7548391222953796e-1\t5.7564023882150650e-2\t2.3304793611168861e-1\t4.0484997468002177e+0\t9.0347999999999998e-2\n\t[2\]\t-1.6324132680892944e-1\t1.1493714898824692e-1\t2.7817847579717636e-1\t2.4202660170874948e+0\t9.0347999999999998e-2\n\t[3\]\t-1.3169741630554199e-1\t1.7192909121513367e-1\t3.0362650752067566e-1\t1.7659984437464975e+0\t9.0347999999999998e-2\n\t[4\]\t-8.4581792354583740e-2\t2.2835086286067963e-1\t3.1293265521526337e-1\t1.3704027709594790e+0\t9.0347999999999998e-2\n\t...and 479 more errors.\n\tMax AbsError of 1.0805229544639587e+0 at index of 20.\n\t[20\]\t-1.6697746515274048e-1\t9.1354548931121826e-1\t1.0805229544639587e+0\t1.1827795847130018e+0\t9.0347999999999998e-2\n\tMax RelError of Infinity at index of 0.\n]
|
||||
[X Interpolated sine wave does not equal [0,0.05756402388215065,0.11493714898824692,0.17192909121513367,0.22835086286067963,0.28401535749435425,0.3387379050254822,0.3923371136188507,0.44463518261909485,0.4954586327075958,0.5446390509605408,0.5920131802558899,0.6374239921569824,0.680720865726471,0.7217602133750916,0.760405957698822...\] with an element-wise tolerance of {"absoluteThreshold":0.090348,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[1\]\t3.3873793482780457e-1\t5.7564023882150650e-2\t2.8117391094565392e-1\t4.8845423231929379e+0\t9.0347999999999998e-2\n\t[2\]\t6.3742399215698242e-1\t1.1493714898824692e-1\t5.2248684316873550e-1\t4.5458482985528308e+0\t9.0347999999999998e-2\n\t[3\]\t8.6074203252792358e-1\t1.7192909121513367e-1\t6.8881294131278992e-1\t4.0063780739170145e+0\t9.0347999999999998e-2\n\t[4\]\t9.8228722810745239e-1\t2.2835086286067963e-1\t7.5393636524677277e-1\t3.3016576149605394e+0\t9.0347999999999998e-2\n\t[5\]\t9.8768836259841919e-1\t2.8401535749435425e-1\t7.0367300510406494e-1\t2.4775878716982858e+0\t9.0347999999999998e-2\n\t...and 470 more errors.\n\tMax AbsError of 1.9994928240776062e+0 at index of 191.\n\t[191\]\t9.9950653314590454e-1\t-9.9998629093170166e-1\t1.9994928240776062e+0\t1.9995202356370805e+0\t9.0347999999999998e-2\n\tMax RelError of 4.9225755461259340e+0 at index of 381.\n\t[381\]\t2.7899110317230225e-1\t4.7106381505727768e-2\t2.3188472166657448e-1\t4.9225755461259340e+0\t9.0347999999999998e-2\n]
|
||||
expected: FAIL
|
||||
|
||||
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X SNR (-0.5698 dB) is not greater than or equal to 37.17. Got -0.5697716379745515.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,22 +1,11 @@
|
|||
[note-grain-on-play.html]
|
||||
[X Number of grains that started at the correct time is not equal to 100. Got 1.]
|
||||
expected: FAIL
|
||||
|
||||
[X Pulse 0 boundary expected to be equal to the array [0,441\] but differs in 1 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t4.8520000000000000e+3\t4.4100000000000000e+2]
|
||||
expected: FAIL
|
||||
|
||||
expected: TIMEOUT
|
||||
[X Number of start frames is not equal to 100. Got 1.]
|
||||
expected: FAIL
|
||||
|
||||
[X Number of grains out of 100 that ended at the wrong time is not equal to 0. Got 1.]
|
||||
[X Found all grain starts and ends is not true. Got false.]
|
||||
expected: FAIL
|
||||
|
||||
[< [note-grain-on-play\] 5 out of 8 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X Number of end frames is not equal to 100. Got 1.]
|
||||
expected: FAIL
|
||||
|
||||
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||
[X Number of end frames is not equal to 100. Got 0.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,22 +1,11 @@
|
|||
[note-grain-on-timing.html]
|
||||
[X Number of grains that started at the correct time is not equal to 100. Got 1.]
|
||||
expected: FAIL
|
||||
|
||||
[X Pulse 0 boundary expected to be equal to the array [0,441\] but differs in 1 places:\n\tIndex\tActual\t\t\tExpected\n\t[1\]\t4.8520000000000000e+3\t4.4100000000000000e+2]
|
||||
expected: FAIL
|
||||
|
||||
expected: TIMEOUT
|
||||
[X Number of start frames is not equal to 100. Got 1.]
|
||||
expected: FAIL
|
||||
|
||||
[X Number of grains out of 100 that ended at the wrong time is not equal to 0. Got 1.]
|
||||
[X Number of end frames is not equal to 100. Got 0.]
|
||||
expected: FAIL
|
||||
|
||||
[X Number of end frames is not equal to 100. Got 1.]
|
||||
expected: FAIL
|
||||
|
||||
[< [Test timing of noteGrainOn\] 5 out of 6 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||
[X Found all grain starts and ends is not true. Got false.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
[sample-accurate-scheduling.html]
|
||||
[< [test\] 1 out of 3 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X Number of impulses found is not equal to 9. Got 1.]
|
||||
expected: FAIL
|
||||
|
|
@ -1,2 +1,19 @@
|
|||
[audionode-channel-rules.html]
|
||||
expected: CRASH
|
||||
[X connections: 6, explicit(1), speakers is not equal to 0.7071067690849304. Got 1.4142135381698608.]
|
||||
expected: FAIL
|
||||
|
||||
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X connections: 6, explicit(4), speakers is not equal to 0.7071067690849304. Got 1.4142135381698608.]
|
||||
expected: FAIL
|
||||
|
||||
[X connections: 6, clamped-max(4), speakers is not equal to 0.7071067690849304. Got 1.4142135381698608.]
|
||||
expected: FAIL
|
||||
|
||||
[< [test\] 4 out of 172 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X connections: 6, explicit(2), speakers is not equal to 0.7071067690849304. Got 1.4142135381698608.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
[biquad-allpass.html]
|
||||
[< [test\] 1 out of 3 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X Max error in Allpass filter response is not less than or equal to 3.9337e-8. Got 1.]
|
||||
expected: FAIL
|
||||
|
||||
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||
expected: FAIL
|
||||
|
|
@ -1,2 +1,40 @@
|
|||
[biquad-automation.html]
|
||||
expected: CRASH
|
||||
[X Output of bandpass filter with frequency automation does not equal [0,0.27222275733947754,0.1703483760356903,-0.4806261956691742,-0.2788437604904175,0.3957056999206543,0.10840324312448502,-0.39677220582962036,0.06871235370635986,0.41004475951194763,-0.1897629052400589,-0.3590146601200104,0.29248547554016113,0.2614542245864868,-0.376722127199173,-0.14195005595684052...\] with an element-wise tolerance of {"absoluteThreshold":0.0000046455,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[1\]\t2.7207741141319275e-1\t2.7222275733947754e-1\t1.4534592628479004e-4\t5.3392276129043557e-4\t4.6454999999999998e-6\n\t[2\]\t1.7056821286678314e-1\t1.7034837603569031e-1\t2.1983683109283447e-4\t1.2905132189036874e-3\t4.6454999999999998e-6\n\t[3\]\t-4.7996443510055542e-1\t-4.8062619566917419e-1\t6.6176056861877441e-4\t1.3768716199444922e-3\t4.6454999999999998e-6\n\t[4\]\t-2.7905157208442688e-1\t-2.7884376049041748e-1\t2.0781159400939941e-4\t7.4526176825298162e-4\t4.6454999999999998e-6\n\t[5\]\t3.9480346441268921e-1\t3.9570569992065430e-1\t9.0223550796508789e-4\t2.2800669996565666e-3\t4.6454999999999998e-6\n\t...and 1943 more errors.\n\tMax AbsError of 9.3662738800048828e-4 at index of 824.\n\t[824\]\t-3.0821254849433899e-1\t-3.0914917588233948e-1\t9.3662738800048828e-4\t3.0296939505896131e-3\t4.6454999999999998e-6\n\tMax RelError of 5.7019372521002287e-1 at index of 911.\n\t[911\]\t-6.8760506110265851e-4\t-1.5998022863641381e-3\t9.1219722526147962e-4\t5.7019372521002287e-1\t4.6454999999999998e-6\n]
|
||||
expected: FAIL
|
||||
|
||||
[X Output of lowshelf filter with gain automation does not equal [0,0.4781356751918793,1.5511385202407837,3.0428154468536377,4.649440288543701,6.148099899291992,7.424892902374268,8.436473846435547,9.169538497924805,9.61856460571289,9.779438972473145,9.650873184204102,9.237476348876953,8.551753997802734,7.614615440368652,6.454819679260254...\] with an element-wise tolerance of {"absoluteThreshold":0.000027657,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[1\]\t4.7863015532493591e-1\t4.7813567519187927e-1\t4.9448013305664063e-4\t1.0341837238106155e-3\t2.7657000000000000e-5\n\t[2\]\t1.5533078908920288e+0\t1.5511385202407837e+0\t2.1693706512451172e-3\t1.3985666804976033e-3\t2.7657000000000000e-5\n\t[3\]\t3.0478479862213135e+0\t3.0428154468536377e+0\t5.0325393676757813e-3\t1.6539088405376598e-3\t2.7657000000000000e-5\n\t[4\]\t4.6580262184143066e+0\t4.6494402885437012e+0\t8.5859298706054688e-3\t1.8466588100424354e-3\t2.7657000000000000e-5\n\t[5\]\t6.1603422164916992e+0\t6.1480998992919922e+0\t1.2242317199707031e-2\t1.9912358940551442e-3\t2.7657000000000000e-5\n\t...and 1711 more errors.\n\tMax AbsError of 2.2458076477050781e-2 at index of 11.\n\t[11\]\t9.6733312606811523e+0\t9.6508731842041016e+0\t2.2458076477050781e-2\t2.3270512469077561e-3\t2.7657000000000000e-5\n\tMax RelError of 3.9739702594466075e-1 at index of 1000.\n\t[1000\]\t-1.3141207455191761e-4\t-2.1807405573781580e-4\t8.6661981185898185e-5\t3.9739702594466075e-1\t2.7657000000000000e-5\n]
|
||||
expected: FAIL
|
||||
|
||||
[< [automate-gain\] 1 out of 1 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X Output of bandpass filter with Q automation does not equal [0,0.013114781118929386,0.047823384404182434,0.09765293449163437,0.15657125413417816,0.21899054944515228,0.27981746196746826,0.3345244824886322,0.379226952791214,0.4107542335987091,0.4267079830169678,0.42550167441368103,0.40637844800949097,0.3694050908088684,0.31544122099876404,0.24608469009399414...\] with an element-wise tolerance of {"absoluteThreshold":9.8348e-7,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[1\]\t1.4311081729829311e-2\t1.3114781118929386e-2\t1.1963006108999252e-3\t9.1217733643547391e-2\t9.8348000000000007e-7\n\t[2\]\t5.1837284117937088e-2\t4.7823384404182434e-2\t4.0138997137546539e-3\t8.3931736822114481e-2\t9.8348000000000007e-7\n\t[3\]\t1.0525146871805191e-1\t9.7652934491634369e-2\t7.5985342264175415e-3\t7.7811632246120421e-2\t9.8348000000000007e-7\n\t[4\]\t1.6793183982372284e-1\t1.5657125413417816e-1\t1.1360585689544678e-2\t7.2558566081414297e-2\t9.8348000000000007e-7\n\t[5\]\t2.3388034105300903e-1\t2.1899054944515228e-1\t1.4889791607856750e-2\t6.7992850127927565e-2\t9.8348000000000007e-7\n\t...and 3982 more errors.\n\tMax AbsError of 2.2362112998962402e-2 at index of 9.\n\t[9\]\t4.3311634659767151e-1\t4.1075423359870911e-1\t2.2362112998962402e-2\t5.4441588594335261e-2\t9.8348000000000007e-7\n\tMax RelError of 1.3802673474130319e+2 at index of 106.\n\t[106\]\t4.0730912587605417e-4\t-2.9724792511842679e-6\t4.1028160512723844e-4\t1.3802673474130319e+2\t9.8348000000000007e-7\n]
|
||||
expected: FAIL
|
||||
|
||||
[< [modulation\] 1 out of 1 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[< [automate-detune\] 1 out of 1 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X Output of bandpass filter with sinusoidal modulation of bandpass center frequency does not equal [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...\] with an element-wise tolerance of {"absoluteThreshold":0.000039787,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[1\]\t1.8003740115091205e-3\t0.0000000000000000e+0\t1.8003740115091205e-3\tInfinity\t3.9786999999999997e-5\n\t[2\]\t7.1658124215900898e-3\t0.0000000000000000e+0\t7.1658124215900898e-3\tInfinity\t3.9786999999999997e-5\n\t[3\]\t1.5862563624978065e-2\t0.0000000000000000e+0\t1.5862563624978065e-2\tInfinity\t3.9786999999999997e-5\n\t[4\]\t2.7496546506881714e-2\t0.0000000000000000e+0\t2.7496546506881714e-2\tInfinity\t3.9786999999999997e-5\n\t[5\]\t4.1519120335578918e-2\t0.0000000000000000e+0\t4.1519120335578918e-2\tInfinity\t3.9786999999999997e-5\n\t...and 3994 more errors.\n\tMax AbsError of 8.2110029458999634e-1 at index of 284.\n\t[284\]\t-8.2110029458999634e-1\t0.0000000000000000e+0\t8.2110029458999634e-1\tInfinity\t3.9786999999999997e-5\n\tMax RelError of Infinity at index of 1.\n]
|
||||
expected: FAIL
|
||||
|
||||
[< [automate-freq\] 1 out of 1 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X Output of bandpass filter with detune automation does not equal [0,0.0008383856620639563,0.00141120795160532,0.00036609364906325936,0.0001000093761831522,0.0012290297308936715,0.001128630479797721,0.0000010075401633002912,0.0004436193557921797,0.0014331036945804954,0.00065815937705338,-0.00011537729005794972,0.0008997227996587753,0.0013498960761353374,0.00016446926747448742,0.00006718232179991901...\] with an element-wise tolerance of {"absoluteThreshold":0.000031471,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[291\]\t-5.7049528695642948e-3\t-5.7371933944523335e-3\t3.2240524888038635e-5\t5.6195639002188952e-3\t3.1470999999999997e-5\n\t[298\]\t-5.7857087813317776e-3\t-5.8182245120406151e-3\t3.2515730708837509e-5\t5.5886002063941197e-3\t3.1470999999999997e-5\n\t[300\]\t5.4189329966902733e-3\t5.4527590982615948e-3\t3.3826101571321487e-5\t6.2034835872550572e-3\t3.1470999999999997e-5\n\t[302\]\t-5.8911093510687351e-3\t-5.9239612892270088e-3\t3.2851938158273697e-5\t5.5456031115558484e-3\t3.1470999999999997e-5\n\t[307\]\t5.0887665711343288e-3\t5.1207793876528740e-3\t3.2012816518545151e-5\t6.2515515891455598e-3\t3.1470999999999997e-5\n\t...and 3599 more errors.\n\tMax AbsError of 8.0760860443115234e+0 at index of 3999.\n\t[3999\]\t8.0760860443115234e+0\t0.0000000000000000e+0\t8.0760860443115234e+0\tInfinity\t3.1470999999999997e-5\n\tMax RelError of Infinity at index of 1087.\n\t[1087\]\t-1.2053268030285835e-2\t0.0000000000000000e+0\t1.2053268030285835e-2\tInfinity\t3.1470999999999997e-5\n]
|
||||
expected: FAIL
|
||||
|
||||
[< [automate-q\] 1 out of 1 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X Output of peaking filter with automation of all parameters does not equal [0,0.9876883625984192,-0.30901700258255005,-0.8910065293312073,0.5877852439880371,0.7071067690849304,-0.80901700258255,-0.45399048924446106,0.9510565400123596,0.15643446147441864,-1,0.15643446147441864,0.9510565400123596,-0.45399048924446106,-0.80901700258255,0.7071067690849304...\] with an element-wise tolerance of {"absoluteThreshold":0.00062907,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[697\]\t-8.9218574762344360e-1\t-8.9659482240676880e-1\t4.4090747833251953e-3\t4.9175777878013201e-3\t6.2907000000000002e-4\n\t[698\]\t-3.1112471222877502e-1\t-3.0482962727546692e-1\t6.2950849533081055e-3\t2.0651158516227147e-2\t6.2907000000000002e-4\n\t[699\]\t1.0102863311767578e+0\t1.0072603225708008e+0\t3.0260086059570313e-3\t3.0041971654694377e-3\t6.2907000000000002e-4\n\t[700\]\t-3.8500450551509857e-2\t-3.7726949900388718e-2\t7.7350065112113953e-4\t2.0502602335026553e-2\t6.2907000000000002e-4\n\t[701\]\t-9.6844774484634399e-1\t-9.7246229648590088e-1\t4.0145516395568848e-3\t4.1282337156555143e-3\t6.2907000000000002e-4\n\t...and 1387 more errors.\n\tMax AbsError of 1.0665789246559143e-2 at index of 711.\n\t[711\]\t-1.8974724411964417e-1\t-2.0041303336620331e-1\t1.0665789246559143e-2\t5.3219040036533723e-2\t6.2907000000000002e-4\n\tMax RelError of 1.8183326468856040e+0 at index of 898.\n\t[898\]\t2.3241327144205570e-3\t-2.8400830924510956e-3\t5.1642158068716526e-3\t1.8183326468856040e+0\t6.2907000000000002e-4\n]
|
||||
expected: FAIL
|
||||
|
||||
[< [automate-all\] 1 out of 1 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[# AUDIT TASK RUNNER FINISHED: 6 out of 6 tasks were failed.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
[biquad-highpass.html]
|
||||
[< [test\] 1 out of 3 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X Max error in Highpass filter response is not less than or equal to 1.5487e-8. Got 0.6490383096498159.]
|
||||
expected: FAIL
|
||||
|
||||
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||
expected: FAIL
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
[biquad-highshelf.html]
|
||||
[< [test\] 1 out of 3 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X Max error in Highshelf filter response is not less than or equal to 6.2577e-8. Got 2.3278465244357536.]
|
||||
expected: FAIL
|
||||
|
||||
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||
expected: FAIL
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
[biquad-lowpass.html]
|
||||
[< [test\] 1 out of 3 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X Max error in Lowpass filter response is not less than or equal to 9.7869e-8. Got 1.]
|
||||
expected: FAIL
|
||||
|
||||
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||
expected: FAIL
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
[biquad-lowshelf.html]
|
||||
[< [test\] 1 out of 3 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X Max error in Lowshelf filter response is not less than or equal to 3.8349e-8. Got 3.162277660168379.]
|
||||
expected: FAIL
|
||||
|
||||
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||
expected: FAIL
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
[biquad-notch.html]
|
||||
[< [test\] 1 out of 3 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X Max error in Notch filter response is not less than or equal to 1.9669e-8. Got 1.]
|
||||
expected: FAIL
|
||||
|
||||
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||
expected: FAIL
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
[biquad-peaking.html]
|
||||
[< [test\] 1 out of 3 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X Max error in Peaking filter response is not less than or equal to 5.8234e-8. Got 3.162277660168379.]
|
||||
expected: FAIL
|
||||
|
||||
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>AudioBuffer can be reused between AudioBufferSourceNodes</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
function render_audio_context() {
|
||||
let sampleRate = 44100;
|
||||
let context = new OfflineAudioContext(
|
||||
2, sampleRate * 0.1, sampleRate);
|
||||
let buf = context.createBuffer(1, 0.1 * sampleRate, context.sampleRate);
|
||||
let data = buf.getChannelData(0);
|
||||
data[0] = 0.5;
|
||||
data[1] = 0.25;
|
||||
let b1 = context.createBufferSource();
|
||||
b1.buffer = buf;
|
||||
b1.start();
|
||||
let b2 = context.createBufferSource();
|
||||
b2.buffer = buf;
|
||||
b2.start();
|
||||
let merger = context.createChannelMerger(2);
|
||||
b1.connect(merger, 0, 0);
|
||||
b2.connect(merger, 0, 1);
|
||||
merger.connect(context.destination);
|
||||
return context.startRendering();
|
||||
}
|
||||
promise_test(function() {
|
||||
return render_audio_context()
|
||||
.then(function(buffer) {
|
||||
assert_equals(buffer.getChannelData(0)[0], 0.5);
|
||||
assert_equals(buffer.getChannelData(1)[0], 0.5);
|
||||
assert_equals(buffer.getChannelData(0)[1], 0.25);
|
||||
assert_equals(buffer.getChannelData(1)[1], 0.25);
|
||||
});
|
||||
}, "AudioBuffer can be reused between AudioBufferSourceNodes");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue