mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-26 09:43:45 +00:00
Merge fixes
This commit is contained in:
parent
c7243aa2e9
commit
879761af2c
1 changed files with 8 additions and 19 deletions
|
@ -1046,14 +1046,14 @@ cSampleManager::Initialise(void)
|
||||||
char filename[MAX_PATH];
|
char filename[MAX_PATH];
|
||||||
sprintf(filename, "%s.VB", StreamedNameTable[i]);
|
sprintf(filename, "%s.VB", StreamedNameTable[i]);
|
||||||
if ( aStream[0] )
|
if ( aStream[0] )
|
||||||
opened = aStream[0]->Open(filename, IsThisTrackAt16KHz(i) ? 16000 : 32000) )
|
opened = aStream[0]->Open(filename, IsThisTrackAt16KHz(i) ? 16000 : 32000);
|
||||||
|
|
||||||
if ( !opened )
|
if ( !opened )
|
||||||
{
|
{
|
||||||
sprintf(filename, "%s.MP3", StreamedNameTable[i]);
|
sprintf(filename, "%s.MP3", StreamedNameTable[i]);
|
||||||
if ( aStream[0] )
|
if ( aStream[0] )
|
||||||
{
|
{
|
||||||
opened = aStream[0]->Open(filename, IsThisTrackAt16KHz(i) ? 16000 : 32000)
|
opened = aStream[0]->Open(filename, IsThisTrackAt16KHz(i) ? 16000 : 32000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( opened )
|
if ( opened )
|
||||||
|
@ -1959,26 +1959,15 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
|
||||||
|
|
||||||
CStream *stream = aStream[nStream];
|
CStream *stream = aStream[nStream];
|
||||||
|
|
||||||
if ( stream && !stream->IsOpened() )
|
bool opened = stream->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
|
||||||
{
|
|
||||||
delete stream;
|
|
||||||
stream = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!stream)
|
if ( !opened )
|
||||||
{
|
{
|
||||||
sprintf(filename, "%s.MP3", StreamedNameTable[nFile]);
|
sprintf(filename, "%s.MP3", StreamedNameTable[nFile]);
|
||||||
stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
|
opened = stream->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
|
||||||
if ( stream && !stream->IsOpened() )
|
|
||||||
{
|
|
||||||
delete stream;
|
|
||||||
stream = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
aStream[nStream]->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
|
if ( opened && stream->Setup() ) {
|
||||||
|
|
||||||
if ( stream->Setup() ) {
|
|
||||||
stream->SetLoopCount(nStreamLoopedFlag[nStream] ? 0 : 1);
|
stream->SetLoopCount(nStreamLoopedFlag[nStream] ? 0 : 1);
|
||||||
nStreamLoopedFlag[nStream] = TRUE;
|
nStreamLoopedFlag[nStream] = TRUE;
|
||||||
if (position != 0)
|
if (position != 0)
|
||||||
|
|
Loading…
Reference in a new issue