summaryrefslogtreecommitdiffstats
path: root/src/audio/sampman.cpp
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2019-08-16 20:17:15 +0200
committerFilip Gawin <filip.gawin@zoho.com>2019-08-27 21:18:47 +0200
commit2fabbc3b4cab40220986f402569af64673cb4cd9 (patch)
tree3278631a5e3dd19a0af92204e6bfb48702dd04f0 /src/audio/sampman.cpp
parentCleanup (diff)
downloadre3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar.gz
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar.bz2
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar.lz
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar.xz
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar.zst
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.zip
Diffstat (limited to '')
-rw-r--r--src/audio/sampman.cpp35
1 files changed, 13 insertions, 22 deletions
diff --git a/src/audio/sampman.cpp b/src/audio/sampman.cpp
index de222493..58da6f64 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] = NULL;
+ opened_samples[i] = 0;
}
}
if ( opened_provider )
{
AIL_close_3D_provider(opened_provider);
- opened_provider = NULL;
+ opened_provider = 0;
}
_fPrevEaxRatioDestination = 0.0f;
@@ -879,7 +879,7 @@ cSampleManager::Initialise(void)
_maxSamples = 0;
- opened_provider = NULL;
+ opened_provider = 0;
DIG = NULL;
for ( int32 i = 0; i < MAXCHANNELS; i++ )
@@ -2020,10 +2020,9 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
{
uint32 i = 0;
- if ( !_bIsMp3Active ) goto FIND_MP3TRACK;
-
do
{
+ if(_bIsMp3Active){
if ( ++_CurMP3Index >= nNumMP3s )
_CurMP3Index = 0;
@@ -2059,21 +2058,15 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
AIL_pause_stream(mp3Stream[nStream], 0);
return true;
}
-
- 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(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 )
@@ -2097,14 +2090,12 @@ FIND_MP3TRACK:
return true;
}
-NEXT_MP3TRACK:
_bIsMp3Active = false;
} while ( ++i < nNumMP3s );
position = 0;
nFile = 0;
- goto PLAY_STREAMEDTRACK;
}
PLAY_STREAMEDTRACK: