MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / PreviewAdvance

Function PreviewAdvance

engine/PoseidonOpenAL/SoundSystemOAL.cpp:950–968  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

948
949 LOG_DEBUG(Audio, "UpdateMixer: wave={} speech={} music={} gain={} (vols {}/{}/{})", _volumeAdjustEffect,
950 _volumeAdjustSpeech, _volumeAdjustMusic, DX8::listenerGain(maxRawVol), _waveVolume, _speechVolume,
951 _cdVolume);
952
953 for (auto* wave : _waves)
954 {
955 if (wave)
956 wave->SetVolumeAdjust(_volumeAdjustEffect, _volumeAdjustSpeech, _volumeAdjustMusic);
957 }
958}
959
960static bool PreviewAdvance(IWave* wave, float deltaT)
961{
962 if (!wave)
963 return false;
964 if (!wave->IsMuted())
965 {
966 wave->Play();
967 }
968 else
969 {
970 wave->Stop();
971 wave->Advance(deltaT);

Callers 1

ProcessPreviewMethod · 0.85

Calls 5

IsMutedMethod · 0.45
PlayMethod · 0.45
StopMethod · 0.45
AdvanceMethod · 0.45
IsTerminatedMethod · 0.45

Tested by

no test coverage detected