1
2
3 from SCA_IActuator import *
4
6 """
7 Sound Actuator.
8
9 The L{startSound()}, L{pauseSound()} and L{stopSound()} do not require
10 the actuator to be activated - they act instantly.
11
12 @group Play Methods: startSound, pauseSound, stopSound
13 """
15 """
16 Sets the filename of the sound this actuator plays.
17
18 @type filename: string
19 """
21 """
22 Returns the filename of the sound this actuator plays.
23
24 @rtype: string
25 """
27 """
28 Starts the sound.
29 """
31 """
32 Pauses the sound.
33 """
35 """
36 Stops the sound.
37 """
39 """
40 Sets the gain (volume) of the sound
41
42 @type gain: float
43 @param gain: 0.0 (quiet) <= gain <= 1.0 (loud)
44 """
46 """
47 Gets the gain (volume) of the sound.
48
49 @rtype: float
50 """
52 """
53 Sets the pitch of the sound.
54
55 @type pitch: float
56 """
58 """
59 Returns the pitch of the sound.
60
61 @rtype: float
62 """
64 """
65 Sets the rolloff factor for the sounds.
66
67 Rolloff defines the rate of attenuation as the sound gets further away.
68 Higher rolloff factors shorten the distance at which the sound can be heard.
69
70 @type rolloff: float
71 """
73 """
74 Returns the rolloff factor for the sound.
75
76 @rtype: float
77 """
79 """
80 Sets the loop mode of the actuator.
81
82 @bug: There are no constants defined for this method!
83 @param loop: - Play Stop 1
84 - Play End 2
85 - Loop Stop 3
86 - Loop End 4
87 - Bidirection Stop 5
88 - Bidirection End 6
89 @type loop: integer
90 """
92 """
93 Returns the current loop mode of the actuator.
94
95 @rtype: integer
96 """
98 """
99 Sets the position this sound will come from.
100
101 @type x: float
102 @param x: The x coordinate of the sound.
103 @type y: float
104 @param y: The y coordinate of the sound.
105 @type z: float
106 @param z: The z coordinate of the sound.
107 """
109 """
110 Sets the velocity this sound is moving at.
111
112 The sound's pitch is determined from the velocity.
113
114 @type vx: float
115 @param vx: The vx coordinate of the sound.
116 @type vy: float
117 @param vy: The vy coordinate of the sound.
118 @type vz: float
119 @param vz: The vz coordinate of the sound.
120 """
122 """
123 Sets the orientation of the sound.
124
125 The nine parameters specify a rotation matrix::
126 | o11, o12, o13 |
127 | o21, o22, o23 |
128 | o31, o32, o33 |
129 """
130
132 """
133 Sets the operation mode of the actuator.
134
135 @param mode: KX_SOUNDACT_PLAYSTOP, KX_SOUNDACT_PLAYEND, KX_SOUNDACT_LOOPSTOP, KX_SOUNDACT_LOOPEND, KX_SOUNDACT_LOOPBIDIRECTIONAL, KX_SOUNDACT_LOOPBIDIRECTIONAL_STOP
136 @type mode: integer
137 """
138
140 """
141 Returns the operation mode of the actuator.
142
143 @rtype: integer
144 @return: KX_SOUNDACT_PLAYSTOP, KX_SOUNDACT_PLAYEND, KX_SOUNDACT_LOOPSTOP, KX_SOUNDACT_LOOPEND, KX_SOUNDACT_LOOPBIDIRECTIONAL, KX_SOUNDACT_LOOPBIDIRECTIONAL_STOP
145 """
146