| 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 | { |