From 79e22d29f4500bf8d2310702cc5aa493944581e0 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 13 Dec 2007 23:27:36 +0000 Subject: Adding a method to check whether a note currently playing svn-id: r29856 --- sound/softsynth/pcspk.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sound/softsynth/pcspk.cpp') diff --git a/sound/softsynth/pcspk.cpp b/sound/softsynth/pcspk.cpp index dea3eac549..396d9328f1 100644 --- a/sound/softsynth/pcspk.cpp +++ b/sound/softsynth/pcspk.cpp @@ -74,6 +74,10 @@ void PCSpeaker::setVolume(byte volume) { _volume = volume; } +bool PCSpeaker::isPlaying() const { + return _remainingSamples != 0; +} + int PCSpeaker::readBuffer(int16 *buffer, const int numSamples) { Common::StackLock lock(_mutex); -- cgit v1.2.3