From 999490e88bc699b671b94b88c9a4327d963db378 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Tue, 31 Dec 2013 16:58:21 +0100 Subject: Code for changing music in pause mode As requested by @Emxx52. Only code for now, we don't have the music yet. Temporairly in developements builds music will change to Prototype (in CBot editor) and Constructive Destruction (in SatCom) --- src/sound/oalsound/channel.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/sound/oalsound/channel.cpp') diff --git a/src/sound/oalsound/channel.cpp b/src/sound/oalsound/channel.cpp index b053316..e58ab54 100644 --- a/src/sound/oalsound/channel.cpp +++ b/src/sound/oalsound/channel.cpp @@ -74,6 +74,21 @@ bool Channel::Play() return true; } +bool Channel::Pause() +{ + if(!m_ready || !IsPlaying()) + { + return false; + } + + alSourcePause(m_source); + if (alCheck()) + { + GetLogger()->Warn("Could not pause audio sound source. Code: %d\n", alGetCode()); + } + return true; +} + bool Channel::SetPosition(const Math::Vector &pos) { -- cgit v1.2.3-1-g7c22