diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-02-03 21:03:00 +0100 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-02-03 21:03:00 +0100 |
commit | ca48ebcb6e22b17e217afc8661c572f83827b83d (patch) | |
tree | 201b104426824576d8b176d1d5d3fa0929c0c23c | |
parent | fix (diff) | |
download | re3-ca48ebcb6e22b17e217afc8661c572f83827b83d.tar re3-ca48ebcb6e22b17e217afc8661c572f83827b83d.tar.gz re3-ca48ebcb6e22b17e217afc8661c572f83827b83d.tar.bz2 re3-ca48ebcb6e22b17e217afc8661c572f83827b83d.tar.lz re3-ca48ebcb6e22b17e217afc8661c572f83827b83d.tar.xz re3-ca48ebcb6e22b17e217afc8661c572f83827b83d.tar.zst re3-ca48ebcb6e22b17e217afc8661c572f83827b83d.zip |
-rw-r--r-- | src/audio/sampman_oal.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp index 2091fb05..ae4b1cbb 100644 --- a/src/audio/sampman_oal.cpp +++ b/src/audio/sampman_oal.cpp @@ -1908,6 +1908,9 @@ cSampleManager::StopStreamedFile(uint8 nStream) { delete stream; aStream[nStream] = NULL; + + if ( nStream == 0 ) + _bIsMp3Active = false; } } @@ -1920,7 +1923,21 @@ cSampleManager::GetStreamedFilePosition(uint8 nStream) if ( stream ) { - return stream->GetPosMS(); + if ( _bIsMp3Active ) + { + tMP3Entry *mp3 = _GetMP3EntryByIndex(_CurMP3Index); + + if ( mp3 != NULL ) + { + return stream->GetPosMS() + mp3->nTrackStreamPos; + } + else + return 0; + } + else + { + return stream->GetPosMS(); + } } return 0; |