MCPcopy Create free account
hub / github.com/SFML/SFML / setVolume

Method setVolume

src/SFML/Audio/SoundSource.cpp:55–59  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

53
54////////////////////////////////////////////////////////////
55void SoundSource::setVolume(float volume)
56{
57 if (auto* sound = static_cast<ma_sound*>(getSound()))
58 ma_sound_set_volume(sound, volume * 0.01f);
59}
60
61
62////////////////////////////////////////////////////////////

Callers 4

PitchVolumeMethod · 0.80
onUpdateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected