changeset 708:8fd1f946f84e

Updated results XML generator to match documentation syntax.
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Thu, 09 Apr 2015 10:59:53 +0100
parents f5de8699e2b6
children d7f85b8bb851
files ape.js core.js
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ape.js	Thu Apr 09 10:44:13 2015 +0100
+++ b/ape.js	Thu Apr 09 10:59:53 2015 +0100
@@ -316,8 +316,9 @@
 	var rateMax = window.innerWidth-50;
 	for (var i=0; i<trackSliderObjects.length; i++)
 	{
-		var trackObj = document.createElement("Track");
+		var trackObj = document.createElement("audioElement");
 		trackObj.id = i;
+		trackObj.url = audioEngineContext.audioObjects[i].url;
 		var slider = document.createElement("Rating");
 		var rate = Number(trackSliderObjects[i].style.left.substr(0,trackSliderObjects[i].style.left.length-2));
 		rate = (rate-rateMin)/rateMax;
--- a/core.js	Thu Apr 09 10:44:13 2015 +0100
+++ b/core.js	Thu Apr 09 10:59:53 2015 +0100
@@ -156,6 +156,7 @@
 	
 	this.id = id;
 	this.state = 0; // 0 - no data, 1 - ready
+	this.url = null; // Hold the URL given for the output back to the results.
 	
 	// Create a buffer and external gain control to allow internal patching of effects and volume leveling.
 	this.bufferNode = audioContext.createBufferSource();
@@ -186,6 +187,7 @@
 
 	this.constructTrack = function(url) {
 		var request = new XMLHttpRequest();
+		this.url = url;
 		request.open('GET',url,true);
 		request.responseType = 'arraybuffer';