Welcome to mirror list, hosted at ThFree Co, Russian Federation.

bge.types.KX_SoundActuator.rst « bge_types « rst « python_api « doc - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d6d258b40d50ae52bf7de373ad8b566228171ccf (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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
KX_SoundActuator(SCA_IActuator)
===============================

base class --- :class:`SCA_IActuator`

.. class:: KX_SoundActuator(SCA_IActuator)

   Sound Actuator.

   The :data:`startSound`, :data:`pauseSound` and :data:`stopSound` do not require the actuator to be activated - they act instantly provided that the actuator has been activated once at least.

   .. attribute:: volume

      The volume (gain) of the sound.

      :type: float

   .. attribute:: time

      The current position in the audio stream (in seconds).

      :type: float

   .. attribute:: pitch

      The pitch of the sound.

      :type: float

   .. attribute:: mode

      The operation mode of the actuator. Can be one of :ref:`these constants<logic-sound-actuator>`

      :type: integer

   .. attribute:: sound

      The sound the actuator should play.

      :type: Audaspace factory

   .. attribute:: is3D

      Whether or not the actuator should be using 3D sound. (read-only)

      :type: boolean

   .. attribute:: volume_maximum

      The maximum gain of the sound, no matter how near it is.

      :type: float

   .. attribute:: volume_minimum

      The minimum gain of the sound, no matter how far it is away.

      :type: float

   .. attribute:: distance_reference

      The distance where the sound has a gain of 1.0.

      :type: float

   .. attribute:: distance_maximum

      The maximum distance at which you can hear the sound.

      :type: float

   .. attribute:: attenuation

      The influence factor on volume depending on distance.

      :type: float

   .. attribute:: cone_angle_inner

      The angle of the inner cone.

      :type: float

   .. attribute:: cone_angle_outer

      The angle of the outer cone.

      :type: float

   .. attribute:: cone_volume_outer

      The gain outside the outer cone (the gain in the outer cone will be interpolated between this value and the normal gain in the inner cone).

      :type: float

   .. method:: startSound()

      Starts the sound.

      :return: None

   .. method:: pauseSound()

      Pauses the sound.

      :return: None

   .. method:: stopSound()

      Stops the sound.

      :return: None