Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
(TEST) Try to fix OAL audio problems
  • Loading branch information
erorcun committed Oct 26, 2020
1 parent 6729de4 commit 19cc6fafe04b3a0b80c76f857eb68f2390525ea0
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/audio/oal/stream.cpp
@@ -67,13 +67,13 @@ class CSndFile : public IDecoder
void Seek(uint32 milliseconds) void Seek(uint32 milliseconds)
{ {
if ( !IsOpened() ) return; 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() uint32 Tell()
{ {
if ( !IsOpened() ) return 0; 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) uint32 Decode(void *buffer)

0 comments on commit 19cc6fa

Please sign in to comment.