changeset 2219:d87b8419df28

Completed cross fading of tracks selectable by user attribute crossFade in <setup> node. Default is 0 seconds (no cross fade).
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Wed, 13 Apr 2016 15:14:42 +0100
parents 30bffc455b4d
children 7f44ba6533b4
files core.js example_eval/radio_example.xml
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/core.js	Wed Apr 13 14:21:04 2016 +0100
+++ b/core.js	Wed Apr 13 15:14:42 2016 +0100
@@ -1287,7 +1287,7 @@
                 var setTime = audioContext.currentTime+specification.crossFade;
 				for (var i=0; i<this.audioObjects.length; i++)
 				{
-					this.audioObjects[i].play(setTime);
+					this.audioObjects[i].play(audioContext.currentTime);
 					if (id == i) {
 						this.audioObjects[i].loopStart(setTime);
 					} else {
--- a/example_eval/radio_example.xml	Wed Apr 13 14:21:04 2016 +0100
+++ b/example_eval/radio_example.xml	Wed Apr 13 15:14:42 2016 +0100
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <waet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="test-schema.xsd">
-	<setup interface="likert" projectReturn="save.php">
+	<setup interface="likert" projectReturn="save.php" crossFade="3.0">
 		<metric>
 			<metricenable>testTimer</metricenable>
 			<metricenable>elementTimer</metricenable>