summaryrefslogtreecommitdiffstats
path: root/test/uscxml/test-openal.scxml
blob: b17e34b45dc54e9e36c41237755d46a18ac8e9f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<scxml datamodel="ecmascript" name="spatial.audio.test">
	<script src="http://uscxml.tk.informatik.tu-darmstadt.de/scripts/dump.js" />
	<script>
		var audioPos = 0;
		var audioURL = "http://uscxml.tk.informatik.tu-darmstadt.de/audio";
	</script>
	<state id="audiotests">
		<invoke type="openal" id="audio" />
		<state id="ready">
			<onentry>
				<send event="start" delay="10ms" />
				<log expr="'Ready'" />
			</onentry>
			<transition target="wav" event="spatial-audio.play" />
			<parallel id="start">
				<state id="move.audio">
					<send target="#_audio" event="move.source">
					</send>
				</state>
				<state id="play.audio">
					<state id="wav">
						<state id="11025-8bit-wav">
							<onentry>
								<log expr="'11025-8bit-wav'" />
								<send target="#_audio" event="play" delay="10ms"><param name="src" expr="audioURL + '/wav/11025-8bit-mono.wav'" /></send>
							</onentry>
							<transition event="audio.end" target="22050-8bit-wav" />
						</state>
						<state id="22050-8bit-wav">
							<onentry>
								<log expr="'22050-8bit-wav'" />
								<send target="#_audio" event="play"><param name="src" expr="audioURL + '/wav/22050-8bit-mono.wav'" /></send>
							</onentry>
							<transition event="audio.end" target="44100-8bit-wav" />
						</state>
						<state id="44100-8bit-wav">
							<onentry>
								<log expr="'44100-8bit-wav'" />
								<send target="#_audio" event="play"><param name="src" expr="audioURL + '/wav/44100-8bit-mono.wav'" /></send>
							</onentry>
							<transition event="audio.end" target="11025-16bit-wav" />
						</state>
						<state id="11025-16bit-wav">
							<onentry>
								<log expr="'11025-16bit-wav'" />
								<send target="#_audio" event="play"><param name="src" expr="audioURL + '/wav/11025-16bit-mono.wav'" /></send>
							</onentry>
							<transition event="audio.end" target="22050-16bit-wav" />
						</state>
						<state id="22050-16bit-wav">
							<onentry>
								<log expr="'22050-16bit-wav'" />
								<send target="#_audio" event="play"><param name="src" expr="audioURL + '/wav/22050-16bit-mono.wav'" /></send>
							</onentry>
							<transition event="audio.end" target="44100-16bit-wav" />
						</state>
						<state id="44100-16bit-wav">
							<onentry>
								<log expr="'44100-16bit-wav'" />
								<send target="#_audio" event="play"><param name="src" expr="audioURL + '/wav/44100-16bit-mono.wav'" /></send>
							</onentry>
							<transition event="audio.end" target="11025-24bit-wav" />
						</state>
						<state id="11025-24bit-wav">
							<onentry>
								<log expr="'11025-24bit-wav'" />
								<send target="#_audio" event="play"><param name="src" expr="audioURL + '/wav/11025-24bit-mono.wav'" /></send>
							</onentry>
							<transition event="audio.end" target="22050-24bit-wav" />
						</state>
						<state id="22050-24bit-wav">
							<onentry>
								<log expr="'22050-24bit-wav'" />
								<send target="#_audio" event="play"><param name="src" expr="audioURL + '/wav/22050-24bit-mono.wav'" /></send>
							</onentry>
							<transition event="audio.end" target="44100-24bit-wav" />
						</state>
						<state id="44100-24bit-wav">
							<onentry>
								<log expr="'44100-24bit-wav'" />
								<send target="#_audio" event="play"><param name="src" expr="audioURL + '/wav/44100-24bit-mono.wav'" /></send>
							</onentry>
							<transition event="audio.end" target="11025-32bit-wav" />
						</state>
						<state id="11025-32bit-wav">
							<onentry>
								<log expr="'11025-32bit-wav'" />
								<send target="#_audio" event="play"><param name="src" expr="audioURL + '/wav/11025-32bit-mono.wav'" /></send>
							</onentry>
							<transition event="audio.end" target="22050-32bit-wav" />
						</state>
						<state id="22050-32bit-wav">
							<onentry>
								<log expr="'22050-32bit-wav'" />
								<send target="#_audio" event="play"><param name="src" expr="audioURL + '/wav/22050-32bit-mono.wav'" /></send>
							</onentry>
							<transition event="audio.end" target="44100-32bit-wav" />
						</state>
						<state id="44100-32bit-wav">
							<onentry>
								<log expr="'44100-32bit-wav'" />
								<send target="#_audio" event="play"><param name="src" expr="audioURL + '/wav/44100-32bit-mono.wav'" /></send>
							</onentry>
							<transition event="audio.end" target="final" />
						</state>
					</state>
					<state id="caf">
					</state>
					<state id="flac">
					</state>
					<state id="mp3">
					</state>
					<state id="ogg">
					</state>
					<state id="aiff">
					</state>
				</state>
			</parallel>
		</state>
		<transition event="error.*" target="final">
			<log expr="dump(_event);" />
		</transition>
	</state>
	<final id="final" />
</scxml>