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

Method PlaySound

engine/Poseidon/UI/Map/UIMapDialogs.cpp:490–505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

488const ParamEntry* FindSound(RString name, SoundPars& pars);
489
490void DisplayGetReady::PlaySound(RString name)
491{
492 if (name.GetLength() == 0)
493 {
494 return;
495 }
496
497 SoundPars pars;
498 if (!FindSound(name, pars))
499 {
500 return;
501 }
502 _sound = GSoundScene->OpenAndPlayOnce2D(pars.name, pars.vol, pars.freq, false);
503 _sound->SetKind(WaveMusic);
504 _sound->SetSticky(true);
505}
506
507void DisplayGetReady::OnButtonClicked(int idc)
508{

Callers

nothing calls this directly

Calls 5

FindSoundFunction · 0.85
OpenAndPlayOnce2DMethod · 0.80
SetStickyMethod · 0.80
GetLengthMethod · 0.45
SetKindMethod · 0.45

Tested by

no test coverage detected