Skip to content

Commit 8ed58b2

Browse files
committed
add setMasterGain and getMasterGain
1 parent feede14 commit 8ed58b2

File tree

7 files changed

+149
-1
lines changed

7 files changed

+149
-1
lines changed

source/scripting/api/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,10 @@ Functions related to audio.
370370
- Sets the pitch of a sound source.
371371
* - :doc:`/types/Script/getSoundSourcePitch/index`
372372
- Returns the pitch of a sound source.
373+
* - :doc:`/types/Script/setMasterGain/index`
374+
- Sets the master gain.
375+
* - :doc:`/types/Script/getMasterGain/index`
376+
- Returns the master gain.
373377

374378
Animation
375379
---------
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
getMasterGain
2+
=============
3+
4+
:doc:`/types/AudioModuleInterface/index`::getMasterGain
5+
6+
Returns the master gain.
7+
8+
Declaration
9+
-----------
10+
11+
.. code-block:: cpp
12+
13+
virtual float getMasterGain() = 0;
14+
15+
Parameters
16+
----------
17+
18+
None.
19+
20+
Returns
21+
-------
22+
23+
The master gain.
24+
25+
Notes
26+
-----
27+
28+
The master gain is the overall volume of all sounds.

source/types/AudioModuleInterface/index.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ Functions
4646
- Enables or disables looping on a sound source.
4747
* - :doc:`/types/AudioModuleInterface/isSoundSourceLooping/index`
4848
- Checks if a sound source is looping.
49+
* - :doc:`/types/AudioModuleInterface/setMasterGain/index`
50+
- Sets the master gain.
51+
* - :doc:`/types/AudioModuleInterface/getMasterGain/index`
52+
- Returns the master gain.
4953

5054
.. toctree::
5155
:hidden:
@@ -65,4 +69,6 @@ Functions
6569
./setSoundSourcePitch/index.rst
6670
./getSoundSourcePitch/index.rst
6771
./setSoundSourceLooping/index.rst
68-
./isSoundSourceLooping/index.rst
72+
./isSoundSourceLooping/index.rst
73+
./setMasterGain/index.rst
74+
./getMasterGain/index.rst
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
setMasterGain
2+
=============
3+
4+
:doc:`/types/AudioModuleInterface/index`::setMasterGain
5+
6+
Sets the master gain.
7+
8+
Declaration
9+
-----------
10+
11+
.. code-block:: cpp
12+
13+
virtual void setMasterGain(float newGain) = 0;
14+
15+
Parameters
16+
----------
17+
18+
.. list-table::
19+
:width: 100%
20+
:header-rows: 1
21+
:class: code-table
22+
23+
* - Name
24+
- Type
25+
- Description
26+
* - newGain
27+
- float
28+
- The new master gain.
29+
30+
Returns
31+
-------
32+
33+
None.
34+
35+
Notes
36+
-----
37+
38+
The master gain is the overall volume of all sounds.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
getMasterGain
2+
=============
3+
4+
:doc:`/types/Script/index`::getMasterGain
5+
6+
Returns the master gain.
7+
8+
Declaration
9+
-----------
10+
11+
.. code-block:: cpp
12+
13+
float getMasterGain();
14+
15+
Parameters
16+
----------
17+
18+
None.
19+
20+
Returns
21+
-------
22+
23+
The master gain.
24+
25+
Notes
26+
-----
27+
28+
The master gain is the overall volume of all sounds.

source/types/Script/index.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,10 @@ Functions
316316
- Enables or disables looping on a sound source.
317317
* - :doc:`/types/Script/isSoundSourceLooping/index`
318318
- Checks if a sound source is looping.
319+
* - :doc:`/types/Script/setMasterGain/index`
320+
- Sets the master gain.
321+
* - :doc:`/types/Script/getMasterGain/index`
322+
- Returns the master gain.
319323
* - :doc:`/types/Script/playAnimation/index`
320324
- Plays an :doc:`/types/Animation/index` on an :doc:`/entity_component_system/entity/index`.
321325
* - :doc:`/types/Script/pauseAnimation/index`
@@ -515,6 +519,8 @@ Functions
515519
./getSoundSourcePitch/index.rst
516520
./setSoundSourceLooping/index.rst
517521
./isSoundSourceLooping/index.rst
522+
./setMasterGain/index.rst
523+
./getMasterGain/index.rst
518524

519525
./intersect/index.rst
520526
./raycast/index.rst
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
setMasterGain
2+
=============
3+
4+
:doc:`/types/Script/index`::setMasterGain
5+
6+
Sets the master gain.
7+
8+
Declaration
9+
-----------
10+
11+
.. code-block:: cpp
12+
13+
void setMasterGain(float newGain);
14+
15+
Parameters
16+
----------
17+
18+
.. list-table::
19+
:width: 100%
20+
:header-rows: 1
21+
:class: code-table
22+
23+
* - Name
24+
- Type
25+
- Description
26+
* - newGain
27+
- float
28+
- The new master gain.
29+
30+
Returns
31+
-------
32+
33+
None.
34+
35+
Notes
36+
-----
37+
38+
The master gain is the overall volume of all sounds.

0 commit comments

Comments
 (0)