File: audiotest.ssc

package info (click to toggle)
stellarium 25.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,307,224 kB
  • sloc: ansic: 317,377; cpp: 214,435; xml: 48,592; javascript: 26,073; python: 2,113; perl: 734; sh: 247; makefile: 192; pascal: 169
file content (35 lines) | stat: -rw-r--r-- 1,083 bytes parent folder | download | duplicates (9)
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");