input:
{
- raw: { type = "file"; path = "in.raw"; format = "bin16"; }
- #raw: { type = "soundcard"; card = 3; device = 0; format = "bin16"; }
+# raw: { type = "file"; path = "in.raw"; format = "bin16"; }
+ raw: { type = "soundcard"; card = 1; device = 0; format = "bin16"; }
};
ssl:
(
- { type = "file"; path = "potential.bin"; format = "float"; }
+ { type = "socket"; ip = "127.0.0.1"; port = 9001; format = "json"; }
);
sst:
(
- { type = "file"; path = "tracked.bin"; format = "float"; }
+ { type = "socket"; ip = "127.0.0.1"; port = 9000; format = "json"; }
);
sss:
(
- { type = "file"; path = "separated_stft.bin"; format = "float"; }
+# { type = "file"; path = "separated_stft.bin"; format = "float"; }
);
sspf:
(
- { type = "file"; path = "postfiltered_stft.bin"; format = "float"; }
+# { type = "file"; path = "postfiltered_stft.bin"; format = "float"; }
);
-}
\ No newline at end of file
+}
framCnt = 0;
dataMax = currentFrame.timestamp;
+
+ if(currentFrame.ptimestamp) {
+ if(currentFrame.ptimestamp > currentFrame.timestamp) {
+ dataMax = currentFrame.ptimestamp;
+ }
+ }
+
charts.forEach(function(bundle) {
bundle.chart.config.options.scales.xAxes[0].ticks.max = dataMax;
document.dispatchEvent(new Event('request-chart'));
- dataMax = currentFrame.timestamp;
+ dataMax = currentFrame.ptimestamp;
+
+ if(currentFrame.timestamp) {
+ if(currentFrame.timestamp > currentFrame.ptimestamp) {
+ dataMax = currentFrame.timestamp;
+ }
+ }
+
charts.forEach(function(bundle) {
bundle.chart.config.options.scales.xAxes[0].ticks.max = dataMax;
return;
}
- if(Math.abs(data.frame.timestamp - currentFrame.timestamp) > 1)
- console.warn('Frame skipped ' + data.frame.timestamp.toString());
+ console.log(data);
+
+ if(Math.abs(data.timeStamp - currentFrame.timestamp) > 1)
+ console.warn('Frame skipped ' + data.timeStamp.toString());
- currentFrame.timestamp = data.frame.timestamp;
+ currentFrame.timestamp = data.timeStamp;
var newMap = {};
var indexPool = [];
});
var hasNewSource = false;
- if(data.frame.src) { // If frame contains sources
-
- data.frame.src.forEach(function(src) { // Remove still used index from the pool
+ data.src = data.src.filter(function(s) {
+ return s.id !== 0;
+ });
+
+ if(data.src) { // If frame contains sources
+
+ data.src.forEach(function(src) { // Remove still used index from the pool
if(typeof(indexMap[src.id])!='undefined') { // If source is not new
indexPool.splice(indexPool.indexOf(indexMap[src.id]),1);
}
});
- data.frame.src.forEach(function(src) { // Update sources
+ data.src.forEach(function(src) { // Update sources
if(typeof(indexMap[src.id])!='undefined') { // Source is already registered
return;
}
- if(Math.abs(data.frame.timestamp - currentFrame.ptimestamp) > 1)
- console.warn('Frame skipped ' + data.frame.timestamp.toString());
+ if(Math.abs(data.timeStamp - currentFrame.ptimestamp) > 1)
+ console.warn('Frame skipped ' + data.timeStamp.toString());
- currentFrame.ptimestamp = data.frame.timestamp;
+ currentFrame.ptimestamp = data.timeStamp;
currentFrame.potentialSources = [];
- if(data.frame.src) { // If frame contains sources
+ if(data.src) { // If frame contains sources
- data.frame.src.forEach(function(source) {
+ data.src.forEach(function(source) {
var newSource = new PotentialSource();
- newSource.e = source.e;
+ newSource.e = source.E;
newSource.x = source.x;
newSource.y = source.y;
newSource.z = source.z;