natiny_audio_set_master_volume

C
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

C
natiny_audio_set_master_volume(0.5f);

Notes

  • The initial master volume is 1.0f. Negative values are clamped to 0.0f; values above 1.0f are allowed.
  • The final output is clipped to -1.0f .. 1.0f, so high gain can distort.