summaryrefslogtreecommitdiffstats
path: root/src/audio/sampman_miles.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-05-17 10:29:44 +0200
committerSergeanur <s.anureev@yandex.ua>2021-06-24 20:42:10 +0200
commit0682cdedbd9f18643c16e64b091e4983c545ab23 (patch)
treecdc90b2add9d06b802161ea9f3738da00a1cf9a2 /src/audio/sampman_miles.cpp
parentLCS sfx + mission audio (diff)
downloadre3-0682cdedbd9f18643c16e64b091e4983c545ab23.tar
re3-0682cdedbd9f18643c16e64b091e4983c545ab23.tar.gz
re3-0682cdedbd9f18643c16e64b091e4983c545ab23.tar.bz2
re3-0682cdedbd9f18643c16e64b091e4983c545ab23.tar.lz
re3-0682cdedbd9f18643c16e64b091e4983c545ab23.tar.xz
re3-0682cdedbd9f18643c16e64b091e4983c545ab23.tar.zst
re3-0682cdedbd9f18643c16e64b091e4983c545ab23.zip
Diffstat (limited to 'src/audio/sampman_miles.cpp')
-rw-r--r--src/audio/sampman_miles.cpp53
1 files changed, 52 insertions, 1 deletions
diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp
index 606b6cf4..a3db0307 100644
--- a/src/audio/sampman_miles.cpp
+++ b/src/audio/sampman_miles.cpp
@@ -1026,9 +1026,18 @@ cSampleManager::Initialise(void)
{
strcpy(filepath, m_szCDRomRootPath);
strcat(filepath, StreamedNameTable[0]);
+ strcat(filepath, ".VB");
FILE *f = fopen(filepath, "rb");
+ if ( !f )
+ {
+ strcpy(filepath, m_szCDRomRootPath);
+ strcat(filepath, StreamedNameTable[0]);
+ strcat(filepath, ".MP3");
+ f = fopen(filepath, "rb");
+ }
+
if ( f )
{
fclose(f);
@@ -1103,8 +1112,16 @@ cSampleManager::Initialise(void)
{
strcpy(filepath, m_MP3FilesPath);
strcat(filepath, StreamedNameTable[i]);
+ strcat(filepath, ".VB");
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
+ if (!mp3Stream[0])
+ {
+ strcpy(filepath, m_MP3FilesPath);
+ strcat(filepath, StreamedNameTable[i]);
+ strcat(filepath, ".MP3");
+ mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
+ }
if (mp3Stream[0])
{
@@ -2065,8 +2082,17 @@ cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream)
strcpy(filepath, m_MP3FilesPath);
strcat(filepath, StreamedNameTable[nFile]);
+ strcat(filepath, ".VB");
mp3Stream[nStream] = AIL_open_stream(DIG, filepath, 0);
+
+ if(!mp3Stream[nStream])
+ {
+ strcpy(filepath, m_MP3FilesPath);
+ strcat(filepath, StreamedNameTable[nFile]);
+ strcat(filepath, ".MP3");
+ mp3Stream[nStream] = AIL_open_stream(DIG, filepath, 0);
+ }
if ( mp3Stream[nStream] )
{
@@ -2130,8 +2156,17 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
nFile = 0;
strcpy(filename, m_MiscomPath);
strcat(filename, StreamedNameTable[nFile]);
+ strcat(filename, ".VB");
mp3Stream[nStream] =
AIL_open_stream(DIG, filename, 0);
+
+ if(!mp3Stream[nStream])
+ {
+ strcpy(filename, m_MP3FilesPath);
+ strcat(filename, StreamedNameTable[nFile]);
+ strcat(filename, ".MP3");
+ mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
+ }
if(mp3Stream[nStream]) {
AIL_set_stream_loop_count(mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1);
nStreamLoopedFlag[nStream] = true;
@@ -2177,9 +2212,17 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
_bIsMp3Active = 0;
strcpy(filename, m_MiscomPath);
strcat(filename, StreamedNameTable[nFile]);
+ strcat(filename, ".VB");
mp3Stream[nStream] =
AIL_open_stream(DIG, filename, 0);
+ if(!mp3Stream[nStream])
+ {
+ strcpy(filename, m_MiscomPath);
+ strcat(filename, StreamedNameTable[nFile]);
+ strcat(filename, ".MP3");
+ mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
+ }
if(mp3Stream[nStream]) {
AIL_set_stream_loop_count(
mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1);
@@ -2222,8 +2265,16 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
}
strcpy(filename, m_MiscomPath);
strcat(filename, StreamedNameTable[nFile]);
+ strcat(filename, ".VB");
mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
+ if( !mp3Stream[nStream] )
+ {
+ strcpy(filename, m_MiscomPath);
+ strcat(filename, StreamedNameTable[nFile]);
+ strcat(filename, ".MP3");
+ mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
+ }
if ( mp3Stream[nStream] )
{
AIL_set_stream_loop_count(mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1);
@@ -2370,7 +2421,7 @@ cSampleManager::InitialiseSampleBanks(void)
fclose(fpSampleDescHandle);
fpSampleDescHandle = NULL;
-
+
for ( int32 i = 0; i < TOTAL_AUDIO_SAMPLES; i++ )
{
#ifdef FIX_BUGS