diff options
author | Filip Gawin <filip.gawin@zoho.com> | 2019-08-27 22:46:41 +0200 |
---|---|---|
committer | Filip Gawin <filip.gawin@zoho.com> | 2019-08-27 23:45:27 +0200 |
commit | 5a36d466929ac9ba5612d577904773e3bd58bfe5 (patch) | |
tree | f775059bd6cd968b096f989243e496bea776ae4f /src/audio/sampman.cpp | |
parent | Cleanup (diff) | |
download | re3-5a36d466929ac9ba5612d577904773e3bd58bfe5.tar re3-5a36d466929ac9ba5612d577904773e3bd58bfe5.tar.gz re3-5a36d466929ac9ba5612d577904773e3bd58bfe5.tar.bz2 re3-5a36d466929ac9ba5612d577904773e3bd58bfe5.tar.lz re3-5a36d466929ac9ba5612d577904773e3bd58bfe5.tar.xz re3-5a36d466929ac9ba5612d577904773e3bd58bfe5.tar.zst re3-5a36d466929ac9ba5612d577904773e3bd58bfe5.zip |
Diffstat (limited to '')
-rw-r--r-- | src/audio/sampman.cpp | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/src/audio/sampman.cpp b/src/audio/sampman.cpp index 58da6f64..de222493 100644 --- a/src/audio/sampman.cpp +++ b/src/audio/sampman.cpp @@ -158,14 +158,14 @@ release_existing() if ( opened_samples[i] ) { AIL_release_3D_sample_handle(opened_samples[i]); - opened_samples[i] = 0; + opened_samples[i] = NULL; } } if ( opened_provider ) { AIL_close_3D_provider(opened_provider); - opened_provider = 0; + opened_provider = NULL; } _fPrevEaxRatioDestination = 0.0f; @@ -879,7 +879,7 @@ cSampleManager::Initialise(void) _maxSamples = 0; - opened_provider = 0; + opened_provider = NULL; DIG = NULL; for ( int32 i = 0; i < MAXCHANNELS; i++ ) @@ -2020,9 +2020,10 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream) { uint32 i = 0; + if ( !_bIsMp3Active ) goto FIND_MP3TRACK; + do { - if(_bIsMp3Active){ if ( ++_CurMP3Index >= nNumMP3s ) _CurMP3Index = 0; @@ -2058,15 +2059,21 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream) AIL_pause_stream(mp3Stream[nStream], 0); return true; } - } - if(nPos > nStreamLength[STREAMED_SOUND_RADIO_MP3_PLAYER]) position = 0; - - tMP3Entry *e; - if(!_GetMP3PosFromStreamPos(&position, &e)) { - if(e == NULL) { - nFile = 0; - goto PLAY_STREAMEDTRACK; - } + + goto NEXT_MP3TRACK; + +FIND_MP3TRACK: + if ( nPos > nStreamLength[STREAMED_SOUND_RADIO_MP3_PLAYER] ) + position = 0; + + tMP3Entry *e; + if ( !_GetMP3PosFromStreamPos(&position, &e) ) + { + if ( e == NULL ) + { + nFile = 0; + goto PLAY_STREAMEDTRACK; + } } if ( e->pLinkPath != NULL ) @@ -2090,12 +2097,14 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream) return true; } +NEXT_MP3TRACK: _bIsMp3Active = false; } while ( ++i < nNumMP3s ); position = 0; nFile = 0; + goto PLAY_STREAMEDTRACK; } PLAY_STREAMEDTRACK: |