Skip to content

Commit

Permalink
Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stephband committed Sep 17, 2023
1 parent f2584bb commit ea805d9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
2 changes: 1 addition & 1 deletion modules/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Returns a time just ahead of context.currentTime that compensates
for block jitter caused by cueing everything to currentTime.
*/

const safetyTime = 0.2;
const safetyTime = 0;
let discrepancy = 0;
export function getDejitterTime(context) {
// FOR SOME REASON THERE IS a 200ms discrepancy betweeen this currentTime
Expand Down
2 changes: 1 addition & 1 deletion modules/sequencer/sequence.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ Sequence.prototype = assign(create(Stream.prototype), {

/**
.stop(time)
Stops the sequencer and all child sequencers at `time`.
Stops the sequencer and all child sequences at `time`.
**/
stop: function(time) {
// Set .stopTime
Expand Down
17 changes: 4 additions & 13 deletions test/soundstage-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import run from '../../fn/modules/test.js';
import context from '../modules/context.js';
import Soundstage from '../modules/soundstage.js';

// Event types
Expand Down Expand Up @@ -45,29 +46,19 @@ const data = {
]
};

run('Start context', [], function(test, done) {
context.resume().then(done);
});

run('Soundstage()',
[JSON.stringify({"id":"1","type":"input","data":{"channels":[0,1],"name":"In 1/2"}})],
function(test, done) {
const stage = new Soundstage(data);

window.stage = stage;

stage.start(0);

document.body.addEventListener('click', function() {
stage.start();
});

/*stage.ready(function() {
//console.log(stage);
test(JSON.stringify(stage.get('1')));
setTimeout(function() {
stage.start();
done();
}, 1000);
});*/
});

0 comments on commit ea805d9

Please sign in to comment.