summaryrefslogtreecommitdiffstats
path: root/src/audio
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2020-10-26 10:35:24 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2020-10-26 10:35:24 +0100
commit19cc6fafe04b3a0b80c76f857eb68f2390525ea0 (patch)
treeaa36c57832487f8cf9e3ed6a366508780d2e0056 /src/audio
parentFont: Fix text dimensions (diff)
downloadre3-19cc6fafe04b3a0b80c76f857eb68f2390525ea0.tar
re3-19cc6fafe04b3a0b80c76f857eb68f2390525ea0.tar.gz
re3-19cc6fafe04b3a0b80c76f857eb68f2390525ea0.tar.bz2
re3-19cc6fafe04b3a0b80c76f857eb68f2390525ea0.tar.lz
re3-19cc6fafe04b3a0b80c76f857eb68f2390525ea0.tar.xz
re3-19cc6fafe04b3a0b80c76f857eb68f2390525ea0.tar.zst
re3-19cc6fafe04b3a0b80c76f857eb68f2390525ea0.zip
Diffstat (limited to 'src/audio')
-rw-r--r--src/audio/oal/stream.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/audio/oal/stream.cpp b/src/audio/oal/stream.cpp
index 3adb702a..6c6abf1a 100644
--- a/src/audio/oal/stream.cpp
+++ b/src/audio/oal/stream.cpp
@@ -67,13 +67,13 @@ public:
void Seek(uint32 milliseconds)
{
if ( !IsOpened() ) return;
- sf_seek(m_pfSound, ms2samples(milliseconds), SF_SEEK_SET);
+ sf_seek(m_pfSound, ms2samples(milliseconds) * (float)GetChannels(), SF_SEEK_SET);
}
uint32 Tell()
{
if ( !IsOpened() ) return 0;
- return samples2ms(sf_seek(m_pfSound, 0, SF_SEEK_CUR));
+ return samples2ms(sf_seek(m_pfSound, 0, SF_SEEK_CUR)) / (float)GetChannels();
}
uint32 Decode(void *buffer)