summaryrefslogtreecommitdiffstats
path: root/src/sound/oalsound/channel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sound/oalsound/channel.cpp')
-rw-r--r--src/sound/oalsound/channel.cpp15
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)
{