diff options
author | krzys-h <krzys_h@interia.pl> | 2013-12-31 16:58:21 +0100 |
---|---|---|
committer | krzys-h <krzys_h@interia.pl> | 2013-12-31 16:58:21 +0100 |
commit | 999490e88bc699b671b94b88c9a4327d963db378 (patch) | |
tree | d2f27e5c80fe00358e5759e9ee40b2fd11d1ccff /src/sound/oalsound/channel.cpp | |
parent | 4a237f5925eb0d371e097416b17dd5e919cd2258 (diff) | |
download | colobot-999490e88bc699b671b94b88c9a4327d963db378.tar.gz colobot-999490e88bc699b671b94b88c9a4327d963db378.tar.bz2 colobot-999490e88bc699b671b94b88c9a4327d963db378.zip |
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)
Diffstat (limited to 'src/sound/oalsound/channel.cpp')
-rw-r--r-- | src/sound/oalsound/channel.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
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) { |