Debian Codegraph @

terps/tads/tads3/test/data/sound-fade.t

raw
1 #include <tads.h>
2
3 main(args)
4 {
5 "Test 1: single-track repeat with fade. This will play a brief
6 tone three times in a row; the first iteration should fade in,
7 and the third iteration should fade out at the end, but there should
8 be no fading between iterations.
9 \b
10 Press a key to start...";
11
12 inputKey();
13 "\b
14 <sound cancel>
15 <sound layer=background src='250hz.wav' fadein=1
16 fadeout=1 repeat=3>
17 Playing - press a key to continue...";
18
19 inputKey();
20
21 "\bTest 2: three-track loop with fade. This will play three brief
22 tones (250 Hz, 500 Hz, 1000 Hz) in a row, then repeat the same
23 three tones, then repeat them again, for a total of three times
24 through the three-tone sequence. The first of the nine chunks
25 should fade in, the last should fade out, and there should be
26 no fading between segments.
27 \b
28 Press a key to start...";
29
30 inputKey();
31
32 "\b
33 <sound cancel>
34 <sound layer=background src='250hz.wav' fadein=1
35 fadeout=1 repeat=3 sequence=loop>
36 <sound layer=background src='500hzL.wav'
37 fadeout=1 repeat=3 sequence=loop>
38 <sound layer=background src='1000hz.wav'
39 fadeout=1 repeat=3 sequence=loop>
40 Playing - press a key to continue...";
41
42 inputKey();
43
44 "\bTest completed.\n";
45 }