summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/audio/sampman.h279
-rw-r--r--src/audio/sampman_miles.cpp53
-rw-r--r--src/audio/sampman_oal.cpp100
3 files changed, 212 insertions, 220 deletions
diff --git a/src/audio/sampman.h b/src/audio/sampman.h
index b256e489..6385fe52 100644
--- a/src/audio/sampman.h
+++ b/src/audio/sampman.h
@@ -239,216 +239,71 @@ public:
extern cSampleManager SampleManager;
extern uint32 BankStartOffset[MAX_SFX_BANKS];
-#if defined(OPUS_AUDIO_PATHS)
-static char StreamedNameTable[][25] = {
- "AUDIO\\HEAD.OPUS", "AUDIO\\CLASS.OPUS", "AUDIO\\KJAH.OPUS", "AUDIO\\RISE.OPUS", "AUDIO\\LIPS.OPUS", "AUDIO\\GAME.OPUS",
- "AUDIO\\MSX.OPUS", "AUDIO\\FLASH.OPUS", "AUDIO\\CHAT.OPUS", "AUDIO\\HEAD.OPUS", "AUDIO\\POLICE.OPUS", "AUDIO\\CITY.OPUS",
- "AUDIO\\WATER.OPUS", "AUDIO\\COMOPEN.OPUS", "AUDIO\\SUBOPEN.OPUS", "AUDIO\\JB.OPUS", "AUDIO\\BET.OPUS", "AUDIO\\L1_LG.OPUS",
- "AUDIO\\L2_DSB.OPUS", "AUDIO\\L3_DM.OPUS", "AUDIO\\L4_PAP.OPUS", "AUDIO\\L5_TFB.OPUS", "AUDIO\\J0_DM2.OPUS", "AUDIO\\J1_LFL.OPUS",
- "AUDIO\\J2_KCL.OPUS", "AUDIO\\J3_VH.OPUS", "AUDIO\\J4_ETH.OPUS", "AUDIO\\J5_DST.OPUS", "AUDIO\\J6_TBJ.OPUS", "AUDIO\\T1_TOL.OPUS",
- "AUDIO\\T2_TPU.OPUS", "AUDIO\\T3_MAS.OPUS", "AUDIO\\T4_TAT.OPUS", "AUDIO\\T5_BF.OPUS", "AUDIO\\S0_MAS.OPUS", "AUDIO\\S1_PF.OPUS",
- "AUDIO\\S2_CTG.OPUS", "AUDIO\\S3_RTC.OPUS", "AUDIO\\S5_LRQ.OPUS", "AUDIO\\S4_BDBA.OPUS", "AUDIO\\S4_BDBB.OPUS", "AUDIO\\S2_CTG2.OPUS",
- "AUDIO\\S4_BDBD.OPUS", "AUDIO\\S5_LRQB.OPUS", "AUDIO\\S5_LRQC.OPUS", "AUDIO\\A1_SSO.OPUS", "AUDIO\\A2_PP.OPUS", "AUDIO\\A3_SS.OPUS",
- "AUDIO\\A4_PDR.OPUS", "AUDIO\\A5_K2FT.OPUS", "AUDIO\\K1_KBO.OPUS", "AUDIO\\K2_GIS.OPUS", "AUDIO\\K3_DS.OPUS", "AUDIO\\K4_SHI.OPUS",
- "AUDIO\\K5_SD.OPUS", "AUDIO\\R0_PDR2.OPUS", "AUDIO\\R1_SW.OPUS", "AUDIO\\R2_AP.OPUS", "AUDIO\\R3_ED.OPUS", "AUDIO\\R4_GF.OPUS",
- "AUDIO\\R5_PB.OPUS", "AUDIO\\R6_MM.OPUS", "AUDIO\\D1_STOG.OPUS", "AUDIO\\D2_KK.OPUS", "AUDIO\\D3_ADO.OPUS", "AUDIO\\D5_ES.OPUS",
- "AUDIO\\D7_MLD.OPUS", "AUDIO\\D4_GTA.OPUS", "AUDIO\\D4_GTA2.OPUS", "AUDIO\\D6_STS.OPUS", "AUDIO\\A6_BAIT.OPUS", "AUDIO\\A7_ETG.OPUS",
- "AUDIO\\A8_PS.OPUS", "AUDIO\\A9_ASD.OPUS", "AUDIO\\K4_SHI2.OPUS", "AUDIO\\C1_TEX.OPUS", "AUDIO\\EL_PH1.OPUS", "AUDIO\\EL_PH2.OPUS",
- "AUDIO\\EL_PH3.OPUS", "AUDIO\\EL_PH4.OPUS", "AUDIO\\YD_PH1.OPUS", "AUDIO\\YD_PH2.OPUS", "AUDIO\\YD_PH3.OPUS", "AUDIO\\YD_PH4.OPUS",
- "AUDIO\\HD_PH1.OPUS", "AUDIO\\HD_PH2.OPUS", "AUDIO\\HD_PH3.OPUS", "AUDIO\\HD_PH4.OPUS", "AUDIO\\HD_PH5.OPUS", "AUDIO\\MT_PH1.OPUS",
- "AUDIO\\MT_PH2.OPUS", "AUDIO\\MT_PH3.OPUS", "AUDIO\\MT_PH4.OPUS", "AUDIO\\MISCOM.OPUS", "AUDIO\\END.OPUS", "AUDIO\\lib_a1.OPUS",
- "AUDIO\\lib_a2.OPUS", "AUDIO\\lib_a.OPUS", "AUDIO\\lib_b.OPUS", "AUDIO\\lib_c.OPUS", "AUDIO\\lib_d.OPUS", "AUDIO\\l2_a.OPUS",
- "AUDIO\\j4t_1.OPUS", "AUDIO\\j4t_2.OPUS", "AUDIO\\j4t_3.OPUS", "AUDIO\\j4t_4.OPUS", "AUDIO\\j4_a.OPUS", "AUDIO\\j4_b.OPUS",
- "AUDIO\\j4_c.OPUS", "AUDIO\\j4_d.OPUS", "AUDIO\\j4_e.OPUS", "AUDIO\\j4_f.OPUS", "AUDIO\\j6_1.OPUS", "AUDIO\\j6_a.OPUS",
- "AUDIO\\j6_b.OPUS", "AUDIO\\j6_c.OPUS", "AUDIO\\j6_d.OPUS", "AUDIO\\t4_a.OPUS", "AUDIO\\s1_a.OPUS", "AUDIO\\s1_a1.OPUS",
- "AUDIO\\s1_b.OPUS", "AUDIO\\s1_c.OPUS", "AUDIO\\s1_c1.OPUS", "AUDIO\\s1_d.OPUS", "AUDIO\\s1_e.OPUS", "AUDIO\\s1_f.OPUS",
- "AUDIO\\s1_g.OPUS", "AUDIO\\s1_h.OPUS", "AUDIO\\s1_i.OPUS", "AUDIO\\s1_j.OPUS", "AUDIO\\s1_k.OPUS", "AUDIO\\s1_l.OPUS",
- "AUDIO\\s3_a.OPUS", "AUDIO\\s3_b.OPUS", "AUDIO\\el3_a.OPUS", "AUDIO\\mf1_a.OPUS", "AUDIO\\mf2_a.OPUS", "AUDIO\\mf3_a.OPUS",
- "AUDIO\\mf3_b.OPUS", "AUDIO\\mf3_b1.OPUS", "AUDIO\\mf3_c.OPUS", "AUDIO\\mf4_a.OPUS", "AUDIO\\mf4_b.OPUS", "AUDIO\\mf4_c.OPUS",
- "AUDIO\\a1_a.OPUS", "AUDIO\\a3_a.OPUS", "AUDIO\\a5_a.OPUS", "AUDIO\\a4_a.OPUS", "AUDIO\\a4_b.OPUS", "AUDIO\\a4_c.OPUS",
- "AUDIO\\a4_d.OPUS", "AUDIO\\k1_a.OPUS", "AUDIO\\k3_a.OPUS", "AUDIO\\r1_a.OPUS", "AUDIO\\r2_a.OPUS", "AUDIO\\r2_b.OPUS",
- "AUDIO\\r2_c.OPUS", "AUDIO\\r2_d.OPUS", "AUDIO\\r2_e.OPUS", "AUDIO\\r2_f.OPUS", "AUDIO\\r2_g.OPUS", "AUDIO\\r2_h.OPUS",
- "AUDIO\\r5_a.OPUS", "AUDIO\\r6_a.OPUS", "AUDIO\\r6_a1.OPUS", "AUDIO\\r6_b.OPUS", "AUDIO\\lo2_a.OPUS", "AUDIO\\lo6_a.OPUS",
- "AUDIO\\yd2_a.OPUS", "AUDIO\\yd2_b.OPUS", "AUDIO\\yd2_c.OPUS", "AUDIO\\yd2_c1.OPUS", "AUDIO\\yd2_d.OPUS", "AUDIO\\yd2_e.OPUS",
- "AUDIO\\yd2_f.OPUS", "AUDIO\\yd2_g.OPUS", "AUDIO\\yd2_h.OPUS", "AUDIO\\yd2_ass.OPUS", "AUDIO\\yd2_ok.OPUS", "AUDIO\\h5_a.OPUS",
- "AUDIO\\h5_b.OPUS", "AUDIO\\h5_c.OPUS", "AUDIO\\ammu_a.OPUS", "AUDIO\\ammu_b.OPUS", "AUDIO\\ammu_c.OPUS", "AUDIO\\door_1.OPUS",
- "AUDIO\\door_2.OPUS", "AUDIO\\door_3.OPUS", "AUDIO\\door_4.OPUS", "AUDIO\\door_5.OPUS", "AUDIO\\door_6.OPUS", "AUDIO\\t3_a.OPUS",
- "AUDIO\\t3_b.OPUS", "AUDIO\\t3_c.OPUS", "AUDIO\\k1_b.OPUS", "AUDIO\\cat1.OPUS"};
-#elif defined(PS2_AUDIO_PATHS)
-static char StreamedNameTable[][40] =
-{
- "AUDIO\\MUSIC\\HEAD.VB",
- "AUDIO\\MUSIC\\DOUBLE.VB",
- "AUDIO\\MUSIC\\KJAH.VB",
- "AUDIO\\MUSIC\\RISE.VB",
- "AUDIO\\MUSIC\\LIPS.VB",
- "AUDIO\\MUSIC\\MUNDO.VB",
- "AUDIO\\MUSIC\\MSX.VB",
- "AUDIO\\MUSIC\\FLASH.VB",
- "AUDIO\\MUSIC\\LCJ.VB",
- "AUDIO\\MUSIC\\LCFR.VB",
- "AUDIO\\MUSIC\\MISCOM2.VB",
- "AUDIO\\MUSIC\\CITY.VB",
- "AUDIO\\MUSIC\\WATER.VB",
- "AUDIO\\MUSIC\\SAWMILL.VB",
- "AUDIO\\MUSIC\\CITY.VB",
- "AUDIO\\MUSIC\\WATER.VB",
- "AUDIO\\MUSIC\\WATER.VB",
- "AUDIO\\MUSIC\\CITY.VB",
- "AUDIO\\MUSIC\\CITY.VB",
- "AUDIO\\MUSIC\\CITY.VB",
- "AUDIO\\MUSIC\\CITY.VB",
- "AUDIO\\MUSIC\\CITY.VB",
- "AUDIO\\MUSIC\\CITY.VB",
- "AUDIO\\MUSIC\\CITY.VB",
- "AUDIO\\MUSIC\\POLICE.VB",
- "AUDIO\\MUSIC\\TAXI.VB",
- "AUDIO\\NEWS\\NEWS_A.VB",
- "AUDIO\\NEWS\\NEWS_B.VB",
- "AUDIO\\NEWS\\NEWS_C.VB",
- "AUDIO\\NEWS\\NEWS_D.VB",
- "AUDIO\\NEWS\\NEWS_E.VB",
- "AUDIO\\NEWS\\NEWS_F.VB",
- "AUDIO\\NEWS\\NEWS_G.VB",
- "AUDIO\\NEWS\\NEWS_H.VB",
- "AUDIO\\NEWS\\NEWS_I.VB",
- "AUDIO\\NEWS\\NEWS_J.VB",
- "AUDIO\\NEWS\\NEWS_K.VB",
- "AUDIO\\NEWS\\NEWS_L.VB",
- "AUDIO\\NEWS\\NEWS_M.VB",
- "AUDIO\\NEWS\\NEWS_N.VB",
- "AUDIO\\CUTSCENE\\BIKER.VB",
- "AUDIO\\CUTSCENE\\BONEVOY.VB",
- "AUDIO\\CUTSCENE\\CAMPAIN.VB",
- "AUDIO\\CUTSCENE\\CASHCHP.VB",
- "AUDIO\\CUTSCENE\\CONTBAN.VB",
- "AUDIO\\CUTSCENE\\CRAZY69.VB",
- "AUDIO\\CUTSCENE\\CRAZY69.VB",
- "AUDIO\\CUTSCENE\\DEADLY.VB",
- "AUDIO\\CUTSCENE\\DONPROB.VB",
- "AUDIO\\CUTSCENE\\DRIVNMR.VB",
- "AUDIO\\CUTSCENE\\ELECTON.VB",
- "AUDIO\\CUTSCENE\\FINAL.VB",
- "AUDIO\\CUTSCENE\\FINAL_2.VB",
- "AUDIO\\CUTSCENE\\HOMSWET.VB",
- "AUDIO\\CUTSCENE\\HOTWHEL.VB",
- "AUDIO\\CUTSCENE\\KIDNAPP.VB",
- "AUDIO\\CUTSCENE\\LANDGRB.VB",
- "AUDIO\\CUTSCENE\\MORGUE.VB",
- "AUDIO\\CUTSCENE\\OVERDOS.VB",
- "AUDIO\\CUTSCENE\\RUFJUST.VB",
- "AUDIO\\CUTSCENE\\SAYONAR.VB",
- "AUDIO\\CUTSCENE\\SICILAN.VB",
- "AUDIO\\CUTSCENE\\THEOFER.VB",
- "AUDIO\\CUTSCENE\\INTRO.VB",
- "AUDIO\\MUSIC\\FINALE.VB",
- "AUDIO\\MUSIC\\MISCOM2.VB"
-#else
-static char StreamedNameTable[][25] =
-{
- "AUDIO\\WILD.ADF",
- "AUDIO\\FLASH.ADF",
- "AUDIO\\KCHAT.ADF",
- "AUDIO\\FEVER.ADF",
- "AUDIO\\VROCK.ADF",
- "AUDIO\\VCPR.ADF",
- "AUDIO\\ESPANT.ADF",
- "AUDIO\\EMOTION.ADF",
- "AUDIO\\WAVE.ADF",
- "AUDIO\\MISCOM.MP3",
- "AUDIO\\CITY.MP3",
- "AUDIO\\WATER.MP3",
- "AUDIO\\BEACHAMB.MP3",
- "AUDIO\\HCITY.MP3",
- "AUDIO\\HWATER.MP3",
- "AUDIO\\HBEACH.MP3",
- "AUDIO\\MALLAMB.MP3",
- "AUDIO\\STRIP.MP3",
- "AUDIO\\MALIBU.MP3",
- "AUDIO\\HOTEL.MP3",
- "AUDIO\\DIRTRING.MP3",
- "AUDIO\\LAW4RIOT.MP3",
- "AUDIO\\AMBSIL.MP3",
- "AUDIO\\POLICE.MP3",
- "AUDIO\\TAXI.MP3",
- "AUDIO\\BCLOSED.MP3",
- "AUDIO\\BOPEN.MP3",
- "AUDIO\\ASS_1.MP3",
- "AUDIO\\ASS_2.MP3",
- "AUDIO\\BANK_1.MP3",
- "AUDIO\\BANK_2A.MP3",
- "AUDIO\\BANK_2B.MP3",
- "AUDIO\\BANK_3A.MP3",
- "AUDIO\\BANK_3B.MP3",
- "AUDIO\\BANK_4.MP3",
- "AUDIO\\BIKE_1.MP3",
- "AUDIO\\BIKE_2.MP3",
- "AUDIO\\BIKE_3.MP3",
- "AUDIO\\BUD_1.MP3",
- "AUDIO\\BUD_2.MP3",
- "AUDIO\\BUD_3.MP3",
- "AUDIO\\CAP_1.MP3",
- "AUDIO\\CAR_1.MP3",
- "AUDIO\\CNT_1A.MP3",
- "AUDIO\\CNT_1B.MP3",
- "AUDIO\\CNT_2.MP3",
- "AUDIO\\COK_1.MP3",
- "AUDIO\\COK_2A.MP3",
- "AUDIO\\COK_2B.MP3",
- "AUDIO\\COK_3.MP3",
- "AUDIO\\COK_4A.MP3",
- "AUDIO\\COK_4A2.MP3",
- "AUDIO\\COK_4B.MP3",
- "AUDIO\\COL_1.MP3",
- "AUDIO\\COL_2.MP3",
- "AUDIO\\COL_3A.MP3",
- "AUDIO\\COL_4A.MP3",
- "AUDIO\\COL_5A.MP3",
- "AUDIO\\COL_5B.MP3",
- "AUDIO\\CUB_1.MP3",
- "AUDIO\\CUB_2.MP3",
- "AUDIO\\CUB_3.MP3",
- "AUDIO\\CUB_4.MP3",
- "AUDIO\\DRUG_1.MP3",
- "AUDIO\\FIN.MP3",
- "AUDIO\\FIN2.MP3",
- "AUDIO\\FINALE.MP3",
- "AUDIO\\HAT_1.MP3",
- "AUDIO\\HAT_2.MP3",
- "AUDIO\\HAT_3.MP3",
- "AUDIO\\ICE_1.MP3",
- "AUDIO\\INT_A.MP3",
- "AUDIO\\INT_B.MP3",
- "AUDIO\\INT_D.MP3",
- "AUDIO\\INT_M.MP3",
- "AUDIO\\LAW_1A.MP3",
- "AUDIO\\LAW_1B.MP3",
- "AUDIO\\LAW_2A.MP3",
- "AUDIO\\LAW_2B.MP3",
- "AUDIO\\LAW_2C.MP3",
- "AUDIO\\LAW_3.MP3",
- "AUDIO\\LAW_4.MP3",
- "AUDIO\\PHIL_1.MP3",
- "AUDIO\\PHIL_2.MP3",
- "AUDIO\\PORN_1.MP3",
- "AUDIO\\PORN_2.MP3",
- "AUDIO\\PORN_3.MP3",
- "AUDIO\\PORN_4.MP3",
- "AUDIO\\RESC_1A.MP3",
- "AUDIO\\ROK_1.MP3",
- "AUDIO\\ROK_2.MP3",
- "AUDIO\\ROK_3A.MP3",
- "AUDIO\\STRIPA.MP3",
- "AUDIO\\TAX_1.MP3",
- "AUDIO\\TEX_1.MP3",
- "AUDIO\\TEX_2.MP3",
- "AUDIO\\TEX_3.MP3",
- "AUDIO\\GLIGHT.MP3",
- "AUDIO\\FIST.MP3",
- "AUDIO\\MISCOM.MP3",
- "AUDIO\\MISCOM.MP3",
- "AUDIO\\MISCOM.MP3",
- "AUDIO\\MISCOM.MP3",
-#endif
-
+static char StreamedNameTable[][40] = {
+ "AUDIO\\MUSIC\\HEAD",
+ "AUDIO\\MUSIC\\DOUBLE",
+ "AUDIO\\MUSIC\\KJAH",
+ "AUDIO\\MUSIC\\RISE",
+ "AUDIO\\MUSIC\\LIPS",
+ "AUDIO\\MUSIC\\MUNDO",
+ "AUDIO\\MUSIC\\MSX",
+ "AUDIO\\MUSIC\\FLASH",
+ "AUDIO\\MUSIC\\LCJ",
+ "AUDIO\\MUSIC\\LCFR",
+ "AUDIO\\MUSIC\\MISCOM2",
+ "AUDIO\\MUSIC\\CITY",
+ "AUDIO\\MUSIC\\WATER",
+ "AUDIO\\MUSIC\\SAWMILL",
+ "AUDIO\\MUSIC\\CITY",
+ "AUDIO\\MUSIC\\WATER",
+ "AUDIO\\MUSIC\\WATER",
+ "AUDIO\\MUSIC\\CITY",
+ "AUDIO\\MUSIC\\CITY",
+ "AUDIO\\MUSIC\\CITY",
+ "AUDIO\\MUSIC\\CITY",
+ "AUDIO\\MUSIC\\CITY",
+ "AUDIO\\MUSIC\\CITY",
+ "AUDIO\\MUSIC\\CITY",
+ "AUDIO\\MUSIC\\POLICE",
+ "AUDIO\\MUSIC\\TAXI",
+ "AUDIO\\NEWS\\NEWS_A",
+ "AUDIO\\NEWS\\NEWS_B",
+ "AUDIO\\NEWS\\NEWS_C",
+ "AUDIO\\NEWS\\NEWS_D",
+ "AUDIO\\NEWS\\NEWS_E",
+ "AUDIO\\NEWS\\NEWS_F",
+ "AUDIO\\NEWS\\NEWS_G",
+ "AUDIO\\NEWS\\NEWS_H",
+ "AUDIO\\NEWS\\NEWS_I",
+ "AUDIO\\NEWS\\NEWS_J",
+ "AUDIO\\NEWS\\NEWS_K",
+ "AUDIO\\NEWS\\NEWS_L",
+ "AUDIO\\NEWS\\NEWS_M",
+ "AUDIO\\NEWS\\NEWS_N",
+ "AUDIO\\CUTSCENE\\BIKER",
+ "AUDIO\\CUTSCENE\\BONEVOY",
+ "AUDIO\\CUTSCENE\\CAMPAIN",
+ "AUDIO\\CUTSCENE\\CASHCHP",
+ "AUDIO\\CUTSCENE\\CONTBAN",
+ "AUDIO\\CUTSCENE\\CRAZY69",
+ "AUDIO\\CUTSCENE\\CRAZY69",
+ "AUDIO\\CUTSCENE\\DEADLY",
+ "AUDIO\\CUTSCENE\\DONPROB",
+ "AUDIO\\CUTSCENE\\DRIVNMR",
+ "AUDIO\\CUTSCENE\\ELECTON",
+ "AUDIO\\CUTSCENE\\FINAL",
+ "AUDIO\\CUTSCENE\\FINAL_2",
+ "AUDIO\\CUTSCENE\\HOMSWET",
+ "AUDIO\\CUTSCENE\\HOTWHEL",
+ "AUDIO\\CUTSCENE\\KIDNAPP",
+ "AUDIO\\CUTSCENE\\LANDGRB",
+ "AUDIO\\CUTSCENE\\MORGUE",
+ "AUDIO\\CUTSCENE\\OVERDOS",
+ "AUDIO\\CUTSCENE\\RUFJUST",
+ "AUDIO\\CUTSCENE\\SAYONAR",
+ "AUDIO\\CUTSCENE\\SICILAN",
+ "AUDIO\\CUTSCENE\\THEOFER",
+ "AUDIO\\CUTSCENE\\INTRO",
+ "AUDIO\\MUSIC\\FINALE",
+ "AUDIO\\MUSIC\\MISCOM2"
}; \ No newline at end of file
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
diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp
index 23bd859a..f11ac350 100644
--- a/src/audio/sampman_oal.cpp
+++ b/src/audio/sampman_oal.cpp
@@ -1002,7 +1002,25 @@ cSampleManager::Initialise(void)
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
{
- aStream[0] = new CStream(StreamedNameTable[i], ALStreamSources[0], ALStreamBuffers[0], IsThisTrackAt16KHz(i) ? 16000 : 32000);
+ char filename[MAX_PATH];
+ sprintf(filename, "%s.VB", StreamedNameTable[i]);
+ aStream[0] = new CStream(filename, ALStreamSources[0], ALStreamBuffers[0], IsThisTrackAt16KHz(i) ? 16000 : 32000);
+ if ( aStream[0] && !aStream[0]->IsOpened() )
+ {
+ delete aStream[0];
+ aStream[0] = NULL;
+ }
+
+ if ( !aStream[0] )
+ {
+ sprintf(filename, "%s.MP3", StreamedNameTable[i]);
+ aStream[0] = new CStream(filename, ALStreamSources[0], ALStreamBuffers[0], IsThisTrackAt16KHz(i) ? 16000 : 32000);
+ if ( aStream[0] && !aStream[0]->IsOpened() )
+ {
+ delete aStream[0];
+ aStream[0] = NULL;
+ }
+ }
if ( aStream[0] && aStream[0]->IsOpened() )
{
@@ -1687,10 +1705,28 @@ cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream)
delete aStream[nStream];
aStream[nStream] = NULL;
}
-
- strcpy(filename, StreamedNameTable[nFile]);
-
+
+ sprintf(filename, "%s.VB", StreamedNameTable[nFile]);
CStream *stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
+
+ if ( stream && !stream->IsOpened() )
+ {
+ delete stream;
+ stream = NULL;
+ }
+
+ if (!stream)
+ {
+ sprintf(filename, "%s.MP3", StreamedNameTable[nFile]);
+ stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
+ if ( stream && !stream->IsOpened() )
+ {
+ delete stream;
+ stream = NULL;
+ }
+ }
+
+
ASSERT(stream != NULL);
aStream[nStream] = stream;
@@ -1761,9 +1797,25 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
if(!_GetMP3PosFromStreamPos(&position, &e) && !e) {
nFile = 0;
- strcpy(filename, StreamedNameTable[nFile]);
+ sprintf(filename, "%s.VB", StreamedNameTable[nFile]);
CStream* stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
+
+ if ( stream && !stream->IsOpened() )
+ {
+ delete stream;
+ stream = NULL;
+ }
+ if (!stream)
+ {
+ sprintf(filename, "%s.MP3", StreamedNameTable[nFile]);
+ stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
+ if ( stream && !stream->IsOpened() )
+ {
+ delete stream;
+ stream = NULL;
+ }
+ }
aStream[nStream] = stream;
if (stream->Setup()) {
@@ -1819,9 +1871,26 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
{
nFile = 0;
_bIsMp3Active = 0;
- strcpy(filename, StreamedNameTable[nFile]);
+ sprintf(filename, "%s.VB", StreamedNameTable[nFile]);
CStream* stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
+
+ if ( stream && !stream->IsOpened() )
+ {
+ delete stream;
+ stream = NULL;
+ }
+
+ if (!stream)
+ {
+ sprintf(filename, "%s.MP3", StreamedNameTable[nFile]);
+ stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
+ if ( stream && !stream->IsOpened() )
+ {
+ delete stream;
+ stream = NULL;
+ }
+ }
aStream[nStream] = stream;
@@ -1868,10 +1937,27 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
position = 0;
nFile = 0;
}
- strcpy(filename, StreamedNameTable[nFile]);
+ sprintf(filename, "%s.VB", StreamedNameTable[nFile]);
CStream *stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
+ if ( stream && !stream->IsOpened() )
+ {
+ delete stream;
+ stream = NULL;
+ }
+
+ if (!stream)
+ {
+ sprintf(filename, "%s.MP3", StreamedNameTable[nFile]);
+ stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
+ if ( stream && !stream->IsOpened() )
+ {
+ delete stream;
+ stream = NULL;
+ }
+ }
+
aStream[nStream] = stream;
if ( stream->Setup() ) {