Skip to content

Commit 727e582

Browse files
rbxphogenIgnisRBX
andauthored
Update AudioAnalyzer docs to mention server limitations (#987)
## Changes Updates AudioAnalyzer docs to note that audio processing is disabled on the server ## Checks By submitting your pull request for review, you agree to the following: - [x] This contribution was created in whole or in part by me, and I have the right to submit it under the terms of this repository's open source licenses. - [x] I understand and agree that this contribution and a record of it are public, maintained indefinitely, and may be redistributed under the terms of this repository's open source licenses. - [x] To the best of my knowledge, all proposed changes are accurate. --------- Co-authored-by: IgnisRBX <[email protected]>
1 parent 5421108 commit 727e582

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

content/en-us/reference/engine/classes/AudioAnalyzer.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ description: |
99
`Class.AudioAnalyzer` takes measurements from audio streams that are wired to
1010
it through `Class.Wire`. It provides a single **Input** pin but does not
1111
produce any output streams.
12+
Note that all audio processing is disabled on the server in order to conserve resources;
13+
Properties and methods of `Class.AudioAnalyzer` return empty or zero results when used from server scripts.
1214
code_samples: []
1315
inherits:
1416
- Instance
@@ -20,7 +22,8 @@ properties:
2022
The loudest volume observed during the last audio buffer.
2123
description: |
2224
The loudest volume observed during the last audio buffer. This property
23-
changes often and thus does not fire changed events.
25+
changes more often than the framerate and does not fire changed events.
26+
On the server, this property is always `0`.
2427
code_samples: []
2528
type: float
2629
tags:
@@ -46,6 +49,8 @@ properties:
4649
This property is generally more stable than
4750
`Class.AudioAnalyzer.PeakLevel|PeakLevel` but it may not capture momentary
4851
volume spikes.
52+
This property changes more often than the framerate and does not fire changed events.
53+
On the server, this property is always `0`.
4954
code_samples: []
5055
type: float
5156
tags:
@@ -116,8 +121,9 @@ methods:
116121
description: |
117122
Returns the frequency spectrum of the last audio buffer, as an array of
118123
numbers. The elements of the array are root-mean-square volume levels,
119-
evenly spaced from 0 hertz to 24,000 hertz. If any of the analyzer's
120-
inputs come from an `Class.AudioDeviceInput`, this method returns an empty
124+
evenly spaced from 0 hertz to 24,000 hertz.
125+
If any of the analyzer's
126+
inputs come from an `Class.AudioDeviceInput`, or this method is used from a server script, it returns an empty
121127
array.
122128
code_samples: []
123129
parameters: []

0 commit comments

Comments
 (0)