Volume setting

This commit is contained in:
Mark Suckerberg
2025-12-30 13:15:50 -06:00
parent b5568d5493
commit c30a9e3520
6 changed files with 22 additions and 1 deletions

View File

@@ -12,6 +12,12 @@ namespace game::resource
return mixer;
}
void Audio::set_gain(float gain)
{
auto mixer = mixer_get();
MIX_SetMasterGain(mixer, gain);
}
void Audio::retain()
{
if (refCount) ++(*refCount);