Downsampler
Inherits: RefCounted
Description
Streams stereo audio frames down to mono 16 bit PCM at a lower sample rate.
Each output sample is the average of the input frames it covers (a box filter), which suppresses most of the aliasing that plain sample dropping causes. State is kept between calls so no frames are lost at chunk borders.
Properties
| Name | Type | Default |
|---|---|---|
| _acc | float | 0.0 |
| _count | int | 0 |
| _phase | float | 0.0 |
| ratio | float |
Methods
| Returns | Name |
|---|---|
| void | _init ( source_rate: float, target_rate: float ) |
| Dictionary | process ( frames: PackedVector2Array ) |
Property Descriptions
_acc: float
No description provided yet.
_count: int
No description provided yet.
_phase: float
No description provided yet.
ratio: float
No description provided yet.
Method Descriptions
_init (source_rate: float , target_rate: float ) -> void
No description provided yet.
process (frames: PackedVector2Array ) -> Dictionary
Converts the given stereo frames. Returns little-endian signed 16 bit PCM and the peak absolute amplitude of the converted samples.

