MCPcopy Create free account
hub / github.com/OneLoneCoder/olcPixelGameEngine / StopSample

Method StopSample

extensions/olcPGEX_Sound.h:361–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359 }
360
361 void SOUND::StopSample(int id)
362 {
363 // Find first occurence of sample id
364 auto s = std::find_if(listActiveSamples.begin(), listActiveSamples.end(), [&](const olc::SOUND::sCurrentlyPlayingSample &s) { return s.nAudioSampleID == id; });
365 if (s != listActiveSamples.end())
366 s->bFlagForStop = true;
367 }
368
369 void SOUND::StopAll()
370 {

Callers

nothing calls this directly

Calls 2

beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected