Mercurial > hg > webaudioevaluationtool
comparison ape.js @ 804:0f7b9ac48364
Fix Bug #1500: Error caused by buffer not being loaded into the pool and then not linking once downloaded.
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Fri, 18 Dec 2015 17:50:14 +0000 |
parents | 43801b3d6131 |
children | 08a3b497d6c4 |
comparison
equal
deleted
inserted
replaced
803:947ef5412d22 | 804:0f7b9ac48364 |
---|---|
327 | 327 |
328 // Find all the audioElements from the audioHolder | 328 // Find all the audioElements from the audioHolder |
329 $(audioHolderObject.audioElements).each(function(index,element){ | 329 $(audioHolderObject.audioElements).each(function(index,element){ |
330 // Find URL of track | 330 // Find URL of track |
331 // In this jQuery loop, variable 'this' holds the current audioElement. | 331 // In this jQuery loop, variable 'this' holds the current audioElement. |
332 | |
333 // Check if an outside reference | |
334 if (index == audioHolderObject.outsideReference) | |
335 { | |
336 return; | |
337 } | |
332 | 338 |
333 // Now load each audio sample. First create the new track by passing the full URL | 339 // Now load each audio sample. First create the new track by passing the full URL |
334 var trackURL = audioHolderObject.hostURL + element.url; | 340 var trackURL = audioHolderObject.hostURL + element.url; |
335 var audioObject = audioEngineContext.newTrack(element); | 341 var audioObject = audioEngineContext.newTrack(element); |
336 | 342 |
412 outsideReferenceHolder.className = 'outside-reference'; | 418 outsideReferenceHolder.className = 'outside-reference'; |
413 outsideReferenceHolderspan = document.createElement('span'); | 419 outsideReferenceHolderspan = document.createElement('span'); |
414 outsideReferenceHolderspan.textContent = 'Reference'; | 420 outsideReferenceHolderspan.textContent = 'Reference'; |
415 outsideReferenceHolder.appendChild(outsideReferenceHolderspan); | 421 outsideReferenceHolder.appendChild(outsideReferenceHolderspan); |
416 | 422 |
417 var audioObject = audioEngineContext.newTrack(audioHolderObject.outsideReference); | 423 var audioObject = audioEngineContext.newTrack(audioHolderObject.audioElements[audioHolderObject.outsideReference]); |
418 | 424 |
419 outsideReferenceHolder.onclick = function(event) | 425 outsideReferenceHolder.onclick = function(event) |
420 { | 426 { |
421 audioEngineContext.play(audioEngineContext.audioObjects.length-1); | 427 audioEngineContext.play(audioEngineContext.audioObjects.length-1); |
422 $('.track-slider').removeClass('track-slider-playing'); | 428 $('.track-slider').removeClass('track-slider-playing'); |