MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Update

Method Update

Source/Engine/Audio/Audio.cpp:222–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220}
221
222void AudioService::Update()
223{
224 PROFILE_CPU_NAMED("Audio.Update");
225 PROFILE_MEM(Audio);
226
227 // Update the master volume
228 float masterVolume = MasterVolume;
229 if (MuteOnFocusLoss && !Engine::HasFocus)
230 {
231 // Mute audio if app has no user focus
232 masterVolume = 0.0f;
233 }
234 if (Math::NotNearEqual(Volume, masterVolume))
235 {
236 Volume = masterVolume;
237 AudioBackend::SetVolume(masterVolume);
238 }
239
240 AudioBackend::Update();
241}
242
243void AudioService::Dispose()
244{

Callers

nothing calls this directly

Calls 2

NotNearEqualFunction · 0.50
UpdateFunction · 0.50

Tested by

no test coverage detected