comparison core.js @ 1399:5f17d2a88e27

MUSHRA: Checks enabled. MUSHRA & APE: Warning if check not supported. Core: checkMoved and checkPlayed now in interface and available to all interfaces.
author Nicholas Jillings <nickjillings@users.noreply.github.com>
date Thu, 17 Dec 2015 17:09:40 +0000
parents cfbe1252ff4c
children 43801b3d6131
comparison
equal deleted inserted replaced
1398:eacd258d0ecd 1399:5f17d2a88e27
2817 str_start += ". Please keep listening"; 2817 str_start += ". Please keep listening";
2818 console.log("[ALERT]: "+str_start); 2818 console.log("[ALERT]: "+str_start);
2819 alert(str_start); 2819 alert(str_start);
2820 } 2820 }
2821 }; 2821 };
2822 this.checkAllMoved = function()
2823 {
2824 var str = "You have not moved ";
2825 var failed = [];
2826 for (var i in audioEngineContext.audioObjects)
2827 {
2828 if(audioEngineContext.audioObjects[i].metric.wasMoved == false)
2829 {
2830 failed.push(audioEngineContext.audioObjects[i].id);
2831 }
2832 }
2833 if (failed.length == 0)
2834 {
2835 return true;
2836 } else if (failed.length == 1)
2837 {
2838 str += 'track '+failed[0];
2839 } else {
2840 str += 'tracks ';
2841 for (var i=0; i<failed.length-1; i++)
2842 {
2843 str += failed[i]+', ';
2844 }
2845 str += 'and '+failed[i];
2846 }
2847 str +='.';
2848 alert(str);
2849 console.log(str);
2850 return false;
2851 };
2852 this.checkAllPlayed = function()
2853 {
2854 var str = "You have not played ";
2855 var failed = [];
2856 for (var i in audioEngineContext.audioObjects)
2857 {
2858 if(audioEngineContext.audioObjects[i].metric.wasListenedTo == false)
2859 {
2860 failed.push(audioEngineContext.audioObjects[i].id);
2861 }
2862 }
2863 if (failed.length == 0)
2864 {
2865 return true;
2866 } else if (failed.length == 1)
2867 {
2868 str += 'track '+failed[0];
2869 } else {
2870 str += 'tracks ';
2871 for (var i=0; i<failed.length-1; i++)
2872 {
2873 str += failed[i]+', ';
2874 }
2875 str += 'and '+failed[i];
2876 }
2877 str +='.';
2878 alert(str);
2879 console.log(str);
2880 return false;
2881 };
2822 } 2882 }