From 4bf349fe81b507c4d3468a233ae5a8e2d6a3dad7 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 25 Feb 2013 13:59:26 +0000 Subject: [PATCH] audio: add Sampler::StopSample() method. --- src/sampler.cpp | 6 ++++++ src/sampler.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/sampler.cpp b/src/sampler.cpp index f093e944..e10a51a8 100644 --- a/src/sampler.cpp +++ b/src/sampler.cpp @@ -60,5 +60,11 @@ void Sampler::PlaySample(int id) sample->Play(); } +void Sampler::StopSample(int id) +{ + Sample *sample = (Sample *)data->samples.GetEntity(id - 1); + sample->Stop(); +} + } /* namespace lol */ diff --git a/src/sampler.h b/src/sampler.h index 47a2ee1d..6c760889 100644 --- a/src/sampler.h +++ b/src/sampler.h @@ -29,6 +29,7 @@ public: static void Deregister(int id); static void PlaySample(int id); + static void StopSample(int id); private: Sampler() {}