natiny_audio_set_master_volume
void natiny_audio_set_master_volume(float volume);
Sets the final gain applied to the complete audio mix.
Parameters
| Name | Type | Description |
|---|---|---|
volume |
float |
Linear gain; 1.0f is unchanged and 0.0f is silent |
Example
natiny_audio_set_master_volume(0.5f);
Notes
- The initial master volume is
1.0f. Negative values are clamped to0.0f; values above1.0fare allowed. - The final output is clipped to
-1.0f .. 1.0f, so high gain can distort.