File: audiotest.ssc

package info (click to toggle)
stellarium 24.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 911,396 kB
  • sloc: ansic: 317,377; cpp: 204,602; xml: 48,590; javascript: 26,348; python: 1,254; perl: 1,108; sh: 207; makefile: 190; pascal: 169
file content (35 lines) | stat: -rw-r--r-- 1,083 bytes parent folder | download | duplicates (8)
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
// Name: Audio Test
// Author: Matthew Gates
// License: Public Domain
// Description: This script plays several formats of audio file.
//              Note that audio support is a build-time option and
//              may not be supported for the version of Stellarium
//              which you have.  Also, different playforms may
//              support different audio formats.
//

core.loadSound("tests/audiotest.wav", "wav");
core.loadSound("tests/audiotest.ogg", "ogg");
core.loadSound("tests/audiotest.mp3", "mp3");

lab = LabelMgr.labelScreen("Playing WAV file...", 100, 200, true, 20, "#ff0000");
core.playSound("wav");
core.wait(4);
LabelMgr.deleteLabel(lab);
core.wait(0.4);

lab = LabelMgr.labelScreen("Playing OGG file...", 100, 200, true, 20, "#ff0000");
core.playSound("ogg");
core.wait(4);
LabelMgr.deleteLabel(lab);
core.wait(0.4);

lab = LabelMgr.labelScreen("Playing MP3 file...", 100, 200, true, 20, "#ff0000");
core.playSound("mp3");
core.wait(4);
LabelMgr.deleteLabel(lab);
core.wait(0.4);

core.dropSound("wav");
core.dropSound("ogg");
core.dropSound("mp3");