summaryrefslogtreecommitdiff
path: root/doc/audio.texi
blob: 7f31f29c10301abd6d210573c2ea2af825714919 (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
@node Audio
@chapter Audio

Guile-2D provides a simple wrapper over SDL's mixer API for working
with music and sound effects.

@menu
* Music
* Samples
@end menu

@node Music
@section Music

Music objects are used for a game's background music. Only one music
object is playing at any given time.

@anchor{2d audio make-music}@defspec make-music
@end defspec

@anchor{2d audio load-music}@defun load-music filename
Load music from FILENAME.  Return #f on failure.

@end defun

@anchor{2d audio music?}@defspec music?
@end defspec

@anchor{2d audio music-audio}@defspec music-audio
@end defspec

@anchor{2d audio music-pause}@defun music-pause
@end defun

@anchor{2d audio music-paused?}@defun music-paused?
@end defun

@anchor{2d audio music-play}@defun music-play music
Play MUSIC.

@end defun

@anchor{2d audio music-playing?}@defun music-playing?
@end defun

@anchor{2d audio music-resume}@defun music-resume
@end defun

@anchor{2d audio music-rewind}@defun music-rewind
@end defun

@anchor{2d audio music-stop}@defun music-stop
@end defun

@anchor{2d audio music-volume}@defun music-volume
Return the volume that music is played at.

@end defun

@node Samples
@section Samples

Samples are short audio clips, typically sound effects. Many samples
can be played at the same time.

@anchor{2d audio make-sample}@defspec make-sample
@end defspec

@anchor{2d audio load-sample}@defun load-sample filename
Load audio sample from FILENAME.  Return #f on failure.

@end defun

@anchor{2d audio sample?}@defspec sample?
@end defspec

@anchor{2d audio sample-audio}@defspec sample-audio
@end defspec

@anchor{2d audio sample-play}@defun sample-play sample
Play audio SAMPLE.

@end defun

@anchor{2d audio sample-volume}@defun sample-volume
Return volume that samples are played at.

@end defun

@anchor{2d audio set-music-volume}@defun set-music-volume volume
Set the volume that music is played at.

@end defun

@anchor{2d audio set-sample-volume}@defun set-sample-volume volume
Set the volume that samples are played at to VOLUME.

@end defun