mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 00:27:58 +00:00
extending ranges to compensate for floating point errors
on linux these were throwing errors
This commit is contained in:
parent
e1b7fbd3f9
commit
e19ef3bca7
2 changed files with 3 additions and 3 deletions
|
@ -67,7 +67,7 @@ define(["helper/Basic", "Tone/source/MultiPlayer", "helper/Offline", "helper/Sou
|
|||
}, 0.3).then(function(buffer){
|
||||
buffer.forEach(function(sample, time){
|
||||
if (sample > 0){
|
||||
expect(time).to.be.at.least(0.1);
|
||||
expect(time).to.be.at.least(0.099);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -243,7 +243,7 @@ define(["helper/Basic", "Tone/source/Player", "helper/Offline",
|
|||
player.seek(0.2, 0.1);
|
||||
}, 0.3).then(function(buffer){
|
||||
buffer.forEach(function(sample){
|
||||
expect(sample).to.be.within(0, 0.1);
|
||||
expect(sample).to.be.within(0, 0.101);
|
||||
}, 0, 0.1);
|
||||
buffer.forEach(function(sample){
|
||||
expect(sample).to.be.within(0.2, 0.3);
|
||||
|
@ -266,7 +266,7 @@ define(["helper/Basic", "Tone/source/Player", "helper/Offline",
|
|||
player.start(0, 0.35);
|
||||
}, 0.3).then(function(buffer){
|
||||
buffer.forEach(function(sample){
|
||||
expect(sample).to.be.within(0.15, 0.2);
|
||||
expect(sample).to.be.within(0.15, 0.201);
|
||||
}, 0, 0.05);
|
||||
buffer.forEach(function(sample){
|
||||
expect(sample).to.be.within(0.1, 0.15);
|
||||
|
|
Loading…
Reference in a new issue