Mercurial > hg > webaudioevaluationtool
changeset 1579:4ffbccf448c2
audioObject returned on node creation for ease of modification by interface.
author | Nicholas Jillings <nickjillings@users.noreply.github.com> |
---|---|
date | Thu, 04 Jun 2015 11:21:47 +0100 |
parents | e7546cabe1f3 |
children | b6c808cac38c |
files | ape.js core.js |
diffstat | 2 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/ape.js Thu Jun 04 11:18:21 2015 +0100 +++ b/ape.js Thu Jun 04 11:21:47 2015 +0100 @@ -333,8 +333,8 @@ // Now load each audio sample. First create the new track by passing the full URL var trackURL = hostURL + this.attributes['url'].value; - audioEngineContext.newTrack(trackURL); - audioEngineContext.audioObjects[index].id = this.attributes['id'].value; + var audioObject = audioEngineContext.newTrack(trackURL); + audioObject.id = this.attributes['id'].value; if (commentShow) { // Create document objects to hold the comment boxes @@ -356,7 +356,7 @@ trackComment.appendChild(br); trackComment.appendChild(trackCommentBox); feedbackHolder.appendChild(trackComment); - audioEngineContext.audioObjects[index].commentDOM = trackComment; + audioObject.commentDOM = trackComment; } // Create a slider per track @@ -404,10 +404,10 @@ }; // Attach binding - audioEngineContext.audioObjects[index].sliderDOM = trackSliderObj; + audioObject.sliderDOM = trackSliderObj; canvas.appendChild(trackSliderObj); - audioEngineContext.audioObjects[index].metric.initialised(convSliderPosToRate(index)); + audioObject.metric.initialised(convSliderPosToRate(index)); });