Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
(TEST) Try to fix OAL audio problems
- Loading branch information
Showing
with
2 additions
and
2 deletions.
-
+2
−2
src/audio/oal/stream.cpp
There are no files selected for viewing
|
|
@@ -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)
|
|
|
|