summaryrefslogtreecommitdiffstats
path: root/src/audio/sampman_miles.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio/sampman_miles.cpp')
-rw-r--r--src/audio/sampman_miles.cpp292
1 files changed, 199 insertions, 93 deletions
diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp
index 9f8e8a9c..2f4cb227 100644
--- a/src/audio/sampman_miles.cpp
+++ b/src/audio/sampman_miles.cpp
@@ -39,10 +39,11 @@ int32 nPedSlotSfx [MAX_PEDSFX];
int32 nPedSlotSfxAddr[MAX_PEDSFX];
uint8 nCurrentPedSlot;
-#ifdef FIX_BUGS
+uint32 nMissionSlotSfx[MISSION_AUDIO_SLOTS] = { UINT32_MAX, UINT32_MAX };
+uintptr nMissionSlotSfxStartAddress;
+
uint32 gPlayerTalkSfx = UINT32_MAX;
void *gPlayerTalkData = 0;
-#endif
uint8 nChannelVolume[MAXCHANNELS+MAX2DCHANNELS];
@@ -332,6 +333,80 @@ cSampleManager::~cSampleManager(void)
}
+int gBankStartOffset[67];
+
+void
+SetUpDebugBanksInfo()
+{
+ gBankStartOffset[3] = SFX_FE_BACK;
+ gBankStartOffset[4] = SFX_CAR_ACCEL_1;
+ gBankStartOffset[5] = SFX_CAR_ACCEL_2;
+ gBankStartOffset[9] = SFX_CAR_ACCEL_6;
+ gBankStartOffset[10] = SFX_CAR_ACCEL_7;
+ gBankStartOffset[1] = SFX_EMPTY;
+ gBankStartOffset[11] = SFX_CAR_ACCEL_8;
+ gBankStartOffset[7] = SFX_CAR_ACCEL_4;
+ gBankStartOffset[15] = SFX_CAR_ACCEL_12;
+ gBankStartOffset[13] = SFX_CAR_ACCEL_10;
+ gBankStartOffset[16] = SFX_CAR_CHAINSAW_IDLE;
+ gBankStartOffset[0] = SFX_AIR_BRAKES;
+ gBankStartOffset[17] = SFX_RC_IDLE;
+ gBankStartOffset[6] = SFX_CAR_ACCEL_3;
+ gBankStartOffset[19] = SFX_CAR_ACCEL_16;
+ gBankStartOffset[12] = SFX_CAR_ACCEL_9;
+ gBankStartOffset[2] = SFX_AMBULAN_VOICE_1_VAN_1;
+ gBankStartOffset[21] = SFX_CAR_ACCEL_18;
+ gBankStartOffset[22] = SFX_CAR_ACCEL_19;
+ gBankStartOffset[8] = SFX_CAR_ACCEL_5;
+ gBankStartOffset[23] = SFX_CAR_ACCEL_20;
+ gBankStartOffset[14] = SFX_CAR_ACCEL_11;
+ gBankStartOffset[20] = SFX_CAR_ACCEL_17;
+ gBankStartOffset[18] = SFX_CAR_RC_HELI;
+ gBankStartOffset[25] = SFX_CAR_AFTER_ACCEL_21;
+ gBankStartOffset[26] = SFX_CAR_FINGER_OFF_ACCEL_21;
+ gBankStartOffset[27] = SFX_CAR_ACCEL_22;
+ gBankStartOffset[28] = SFX_CAR_AFTER_ACCEL_22;
+ gBankStartOffset[29] = SFX_CAR_FINGER_OFF_ACCEL_22;
+ gBankStartOffset[24] = SFX_CAR_ACCEL_21;
+ gBankStartOffset[30] = SFX_HELI_APACHE_1;
+ gBankStartOffset[31] = SFX_HELI_UNUSED_1;
+ gBankStartOffset[32] = SFX_HELI_UNUSED_2;
+ gBankStartOffset[33] = SFX_HELI_UNUSED_3;
+ gBankStartOffset[34] = SFX_HELI_UNUSED_4;
+ gBankStartOffset[35] = SFX_SEAPLANE_LOW;
+ gBankStartOffset[37] = SFX_PLANE_UNUSED_2;
+ gBankStartOffset[38] = SFX_PLANE_UNUSED_3;
+ gBankStartOffset[39] = SFX_PLANE_UNUSED_4;
+ gBankStartOffset[40] = SFX_BUILDINGS_BANK_ALARM;
+ gBankStartOffset[41] = SFX_BUILDING_SNORE;
+ gBankStartOffset[36] = SFX_PLANE_UNUSED_1;
+ gBankStartOffset[43] = SFX_BUILDING_BAR_2;
+ gBankStartOffset[44] = SFX_BUILDING_BAR_3;
+ gBankStartOffset[45] = SFX_BUILDING_BAR_4;
+ gBankStartOffset[46] = SFX_BUILDING_MALIBU_1;
+ gBankStartOffset[47] = SFX_BUILDING_MALIBU_2;
+ gBankStartOffset[42] = SFX_BUILDING_BAR_1;
+ gBankStartOffset[49] = SFX_BUILDING_STRIP_1;
+ gBankStartOffset[50] = SFX_BUILDING_STRIP_2;
+ gBankStartOffset[51] = SFX_BUILDING_STRIP_3;
+ gBankStartOffset[52] = SFX_BUILDING_CHURCH;
+ gBankStartOffset[53] = SFX_BUILDING_FAN_1;
+ gBankStartOffset[48] = SFX_BUILDING_MALIBU_3;
+ gBankStartOffset[55] = SFX_BUILDING_INSECTS_1;
+ gBankStartOffset[56] = SFX_BUILDING_INSECTS_2;
+ gBankStartOffset[54] = SFX_BUILDING_FAN_2;
+ gBankStartOffset[57] = SFX_CLUB_1;
+ gBankStartOffset[58] = SFX_CLUB_2;
+ gBankStartOffset[59] = SFX_CLUB_3;
+ gBankStartOffset[60] = SFX_CLUB_4;
+ gBankStartOffset[61] = SFX_FOOTSTEP_GRASS_1;
+ gBankStartOffset[62] = SFX_FOOTSTEP_GRAVEL_1;
+ gBankStartOffset[63] = SFX_FOOTSTEP_WOOD_1;
+ gBankStartOffset[64] = SFX_FOOTSTEP_METAL_1;
+ gBankStartOffset[65] = SFX_FOOTSTEP_WATER_1;
+ gBankStartOffset[66] = SFX_FOOTSTEP_SAND_1;
+}
+
#ifdef EXTERNAL_3D_SOUND
void
cSampleManager::SetSpeakerConfig(int32 which)
@@ -1041,20 +1116,20 @@ cSampleManager::Initialise(void)
if ( GetDriveType(m_szCDRomRootPath) == DRIVE_CDROM )
{
- FILE *f;
-#ifdef PS2_AUDIO_PATHS
strcpy(filepath, m_szCDRomRootPath);
- strcat(filepath, PS2StreamedNameTable[0]);
- f = fopen(filepath, "rb");
-
+ strcat(filepath, StreamedNameTable[0]);
+ strcat(filepath, ".VB");
+
+ FILE *f = fopen(filepath, "rb");
+
if ( !f )
-#endif
{
strcpy(filepath, m_szCDRomRootPath);
strcat(filepath, StreamedNameTable[0]);
-
+ strcat(filepath, ".MP3");
f = fopen(filepath, "rb");
}
+
if ( f )
{
fclose(f);
@@ -1082,26 +1157,16 @@ cSampleManager::Initialise(void)
m_szCDRomRootPath[0] = '\0';
strcpy(m_WavFilesPath, m_szCDRomRootPath);
-
+ /*
#ifdef AUDIO_CACHE
if ( CreateCache )
#endif
for ( int32 i = STREAMED_SOUND_MISSION_MOBR1; i < TOTAL_STREAMED_SOUNDS; i++ )
{
-#ifdef PS2_AUDIO_PATHS
strcpy(filepath, m_szCDRomRootPath);
- strcat(filepath, PS2StreamedNameTable[i]);
-
+ strcat(filepath, StreamedNameTable[i]);
+
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
-
- if ( !mp3Stream[0] )
-#endif
- {
- strcpy(filepath, m_szCDRomRootPath);
- strcat(filepath, StreamedNameTable[i]);
-
- mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
- }
if ( mp3Stream[0] )
{
@@ -1119,7 +1184,7 @@ cSampleManager::Initialise(void)
return FALSE;
}
}
-
+ */
// Find path of MP3s (originally in CD-Rom)
// if NO_CDCHECK is NOT defined but AUDIO_CACHE is defined, we still need to find MP3s' path, but will exit after the first file
#ifndef NO_CDCHECK
@@ -1137,20 +1202,18 @@ cSampleManager::Initialise(void)
{
#endif
- for (int32 i = 0; i < STREAMED_SOUND_MISSION_MOBR1; i++)
+ for (int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++)
{
-#ifdef PS2_AUDIO_PATHS
strcpy(filepath, m_MP3FilesPath);
- strcat(filepath, PS2StreamedNameTable[i]);
+ strcat(filepath, StreamedNameTable[i]);
+ strcat(filepath, ".VB");
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
-
- if ( !mp3Stream[0] )
-#endif
+ if (!mp3Stream[0])
{
strcpy(filepath, m_MP3FilesPath);
strcat(filepath, StreamedNameTable[i]);
-
+ strcat(filepath, ".MP3");
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
}
@@ -1188,26 +1251,16 @@ cSampleManager::Initialise(void)
#endif
if ( !bFileNotFound ) {
-
+/*
#ifdef AUDIO_CACHE
if ( CreateCache )
#endif
for ( int32 i = STREAMED_SOUND_MISSION_COMPLETED4; i < STREAMED_SOUND_MISSION_PAGER; i++ )
{
-#ifdef PS2_AUDIO_PATHS
strcpy(filepath, m_MiscomPath);
- strcat(filepath, PS2StreamedNameTable[i]);
-
- mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
-
- if ( !mp3Stream[0] )
-#endif
- {
- strcpy(filepath, m_MiscomPath);
- strcat(filepath, StreamedNameTable[i]);
+ strcat(filepath, StreamedNameTable[i]);
- mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
- }
+ mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
if ( mp3Stream[0] )
{
@@ -1224,7 +1277,7 @@ cSampleManager::Initialise(void)
bFileNotFound = TRUE;
break;
}
- }
+ }*/
}
m_bInitialised = !bFileNotFound;
@@ -1271,7 +1324,13 @@ cSampleManager::Initialise(void)
nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] = (int32)AIL_mem_alloc_lock(PED_BLOCKSIZE*MAX_PEDSFX);
-#ifdef FIX_BUGS
+ nMissionSlotSfxStartAddress = (uintptr)AIL_mem_alloc_lock(PED_BLOCKSIZE*MAX_PEDSFX);
+ if ( !nMissionSlotSfxStartAddress )
+ {
+ Terminate();
+ return FALSE;
+ }
+
// Find biggest player comment
uint32 nMaxPedSize = 0;
for (uint32 i = PLAYER_COMMENTS_START; i <= PLAYER_COMMENTS_END; i++)
@@ -1283,7 +1342,6 @@ cSampleManager::Initialise(void)
Terminate();
return FALSE;
}
-#endif
LoadSampleBank(SFX_BANK_0);
@@ -1439,13 +1497,20 @@ cSampleManager::Terminate(void)
nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] = 0;
}
-#ifdef FIX_BUGS
+ if ( nMissionSlotSfxStartAddress != 0 )
+ {
+ AIL_mem_free_lock((void *)nMissionSlotSfxStartAddress);
+ nMissionSlotSfxStartAddress = 0;
+
+ for ( uint32 i = 0; i < MISSION_AUDIO_SLOTS; i++ )
+ nMissionSlotSfx[i] = UINT32_MAX;
+ }
+
if ( gPlayerTalkData != 0)
{
AIL_mem_free_lock(gPlayerTalkData);
gPlayerTalkData = 0;
}
-#endif
if ( DIG )
{
@@ -1463,7 +1528,6 @@ cSampleManager::CheckForAnAudioFileOnCD(void)
{
#if !defined(NO_CDCHECK) // TODO: check steam, probably GTAVC_STEAM_PATCH needs to be added
char filepath[MAX_PATH];
- FILE *f;
strcpy(filepath, m_MiscomPath);
strcat(filepath, StreamedNameTable[STREAMED_SOUND_MISSION_COMPLETED4]);
@@ -1612,32 +1676,50 @@ cSampleManager::IsSampleBankLoaded(uint8 nBank)
return gBankLoaded[nBank];
}
-#ifdef FIX_BUGS
uint8
cSampleManager::IsMissionAudioLoaded(uint8 nSlot, uint32 nSample)
{
- ASSERT(nSlot == MISSION_AUDIO_PLAYER_COMMENT); // only MISSION_AUDIO_PLAYER_COMMENT is supported on PC
+ ASSERT(nSlot != MISSION_AUDIO_POLRADIO_CRIME_OR_COLOR && nSlot != MISSION_AUDIO_POLRADIO_AREA_OR_CAR); // these are not used in LCS
- return nSample == gPlayerTalkSfx ? LOADING_STATUS_LOADED : LOADING_STATUS_NOT_LOADED;
+ switch (nSlot)
+ {
+ case MISSION_AUDIO_SLOT_1:
+ case MISSION_AUDIO_SLOT_2:
+ return nMissionSlotSfx[nSlot] == nSample ? LOADING_STATUS_LOADED : LOADING_STATUS_NOT_LOADED;
+ case MISSION_AUDIO_PLAYER_COMMENT:
+ return nSample == gPlayerTalkSfx ? LOADING_STATUS_LOADED : LOADING_STATUS_NOT_LOADED;
+ }
+ return FALSE;
}
bool8
cSampleManager::LoadMissionAudio(uint8 nSlot, uint32 nSample)
{
- ASSERT(nSlot == MISSION_AUDIO_PLAYER_COMMENT); // only MISSION_AUDIO_PLAYER_COMMENT is supported on PC
+ ASSERT(nSlot != MISSION_AUDIO_POLRADIO_CRIME_OR_COLOR && nSlot != MISSION_AUDIO_POLRADIO_AREA_OR_CAR); // these are not used in LCS
ASSERT(nSample < TOTAL_AUDIO_SAMPLES);
if (fseek(fpSampleDataHandle, m_aSamples[nSample].nOffset, SEEK_SET) != 0)
return FALSE;
- if (fread(gPlayerTalkData, 1, m_aSamples[nSample].nSize, fpSampleDataHandle) != m_aSamples[nSample].nSize)
- return FALSE;
+ switch (nSlot)
+ {
+ case MISSION_AUDIO_SLOT_1:
+ case MISSION_AUDIO_SLOT_2:
+ if (fread((void*)(nMissionSlotSfxStartAddress + nSlot*MISSION_AUDIO_BLOCKSIZE), 1, m_aSamples[nSample].nSize, fpSampleDataHandle) != m_aSamples[nSample].nSize)
+ return FALSE;
- gPlayerTalkSfx = nSample;
+ nMissionSlotSfx[nSlot] = nSample;
+ break;
+ case MISSION_AUDIO_PLAYER_COMMENT:
+ if (fread(gPlayerTalkData, 1, m_aSamples[nSample].nSize, fpSampleDataHandle) != m_aSamples[nSample].nSize)
+ return FALSE;
+
+ gPlayerTalkSfx = nSample;
+ break;
+ }
return TRUE;
}
-#endif
uint8
cSampleManager::IsPedCommentLoaded(uint32 nComment)
@@ -1815,6 +1897,8 @@ cSampleManager::SetChannelReverbFlag(uint32 nChannel, bool8 nReverbFlag)
switch ( nChannel )
{
case CHANNEL_POLICE_RADIO:
+ case CHANNEL_MISSION_AUDIO_1:
+ case CHANNEL_MISSION_AUDIO_2:
{
b2d = TRUE;
break;
@@ -1846,6 +1930,8 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
switch ( nChannel )
{
case CHANNEL_POLICE_RADIO:
+ case CHANNEL_MISSION_AUDIO_1:
+ case CHANNEL_MISSION_AUDIO_2:
{
b2d = TRUE;
break;
@@ -1862,7 +1948,6 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
addr = nSampleBankMemoryStartAddress[nBank] + m_aSamples[nSfx].nOffset - m_aSamples[BankStartOffset[nBank]].nOffset;
}
-#ifdef FIX_BUGS
else if ( nSfx >= PLAYER_COMMENTS_START && nSfx <= PLAYER_COMMENTS_END )
{
if ( !IsMissionAudioLoaded(MISSION_AUDIO_PLAYER_COMMENT, nSfx) )
@@ -1870,9 +1955,15 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
addr = (uintptr)gPlayerTalkData;
}
-#endif
else
- {
+ {
+ for ( uint32 i = 0; i < MISSION_AUDIO_SLOTS; i++ ) {
+ if ( IsMissionAudioLoaded(i, nSfx) ) {
+ addr = nMissionSlotSfxStartAddress + i * MISSION_AUDIO_BLOCKSIZE;
+ goto MissionAudioFound;
+ }
+ }
+
int32 i;
for ( i = 0; i < _TODOCONST(3); i++ )
{
@@ -1892,6 +1983,7 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
return FALSE;
}
+MissionAudioFound:
#ifdef EXTERNAL_3D_SOUND
if ( b2d )
{
@@ -1974,6 +2066,8 @@ cSampleManager::SetChannelVolume(uint32 nChannel, uint32 nVolume)
switch ( nChannel )
{
case CHANNEL_POLICE_RADIO:
+ case CHANNEL_MISSION_AUDIO_1:
+ case CHANNEL_MISSION_AUDIO_2:
{
#endif
nChannelVolume[nChannel] = vol;
@@ -2005,6 +2099,8 @@ cSampleManager::SetChannelPan(uint32 nChannel, uint32 nPan)
switch ( nChannel )
{
case CHANNEL_POLICE_RADIO:
+ case CHANNEL_MISSION_AUDIO_1:
+ case CHANNEL_MISSION_AUDIO_2:
{
#endif
#if !defined(FIX_BUGS) && defined(EXTERNAL_3D_SOUND)
@@ -2030,6 +2126,8 @@ cSampleManager::SetChannelFrequency(uint32 nChannel, uint32 nFreq)
switch ( nChannel )
{
case CHANNEL_POLICE_RADIO:
+ case CHANNEL_MISSION_AUDIO_1:
+ case CHANNEL_MISSION_AUDIO_2:
{
b2d = TRUE;
break;
@@ -2060,6 +2158,8 @@ cSampleManager::SetChannelLoopPoints(uint32 nChannel, uint32 nLoopStart, int32 n
switch ( nChannel )
{
case CHANNEL_POLICE_RADIO:
+ case CHANNEL_MISSION_AUDIO_1:
+ case CHANNEL_MISSION_AUDIO_2:
{
b2d = TRUE;
break;
@@ -2090,6 +2190,8 @@ cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount)
switch ( nChannel )
{
case CHANNEL_POLICE_RADIO:
+ case CHANNEL_MISSION_AUDIO_1:
+ case CHANNEL_MISSION_AUDIO_2:
{
b2d = TRUE;
break;
@@ -2120,6 +2222,8 @@ cSampleManager::GetChannelUsedFlag(uint32 nChannel)
switch ( nChannel )
{
case CHANNEL_POLICE_RADIO:
+ case CHANNEL_MISSION_AUDIO_1:
+ case CHANNEL_MISSION_AUDIO_2:
{
b2d = TRUE;
break;
@@ -2155,6 +2259,8 @@ cSampleManager::StartChannel(uint32 nChannel)
switch ( nChannel )
{
case CHANNEL_POLICE_RADIO:
+ case CHANNEL_MISSION_AUDIO_1:
+ case CHANNEL_MISSION_AUDIO_2:
{
b2d = TRUE;
break;
@@ -2185,6 +2291,8 @@ cSampleManager::StopChannel(uint32 nChannel)
switch ( nChannel )
{
case CHANNEL_POLICE_RADIO:
+ case CHANNEL_MISSION_AUDIO_1:
+ case CHANNEL_MISSION_AUDIO_2:
{
b2d = TRUE;
break;
@@ -2223,18 +2331,18 @@ cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream)
}
char filepath[MAX_PATH];
-#ifdef PS2_AUDIO_PATHS
- strcpy(filepath, nFile < STREAMED_SOUND_MISSION_COMPLETED4 ? m_MP3FilesPath : (nFile < STREAMED_SOUND_MISSION_MOBR1 ? m_MiscomPath : m_WavFilesPath));
- strcat(filepath, PS2StreamedNameTable[nFile]);
-
+
+ strcpy(filepath, m_MP3FilesPath);
+ strcat(filepath, StreamedNameTable[nFile]);
+ strcat(filepath, ".VB");
+
mp3Stream[nStream] = AIL_open_stream(DIG, filepath, 0);
- if ( !mp3Stream[nStream] )
-#endif
+ if(!mp3Stream[nStream])
{
- strcpy(filepath, nFile < STREAMED_SOUND_MISSION_COMPLETED4 ? m_MP3FilesPath : (nFile < STREAMED_SOUND_MISSION_MOBR1 ? m_MiscomPath : m_WavFilesPath));
+ strcpy(filepath, m_MP3FilesPath);
strcat(filepath, StreamedNameTable[nFile]);
-
+ strcat(filepath, ".MP3");
mp3Stream[nStream] = AIL_open_stream(DIG, filepath, 0);
}
@@ -2298,19 +2406,18 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
// Try to continue from previous song, if already started
if(!_GetMP3PosFromStreamPos(&position, &e) && !e) {
nFile = 0;
-#ifdef PS2_AUDIO_PATHS
strcpy(filename, m_MiscomPath);
- strcat(filename, PS2StreamedNameTable[nFile]);
-
- mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
+ strcat(filename, StreamedNameTable[nFile]);
+ strcat(filename, ".VB");
+ mp3Stream[nStream] =
+ AIL_open_stream(DIG, filename, 0);
- if ( !mp3Stream[nStream] )
-#endif
+ if(!mp3Stream[nStream])
{
- strcpy(filename, m_MiscomPath);
+ strcpy(filename, m_MP3FilesPath);
strcat(filename, StreamedNameTable[nFile]);
- mp3Stream[nStream] =
- AIL_open_stream(DIG, filename, 0);
+ 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);
@@ -2355,19 +2462,18 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
{
nFile = 0;
_bIsMp3Active = FALSE;
-#ifdef PS2_AUDIO_PATHS
strcpy(filename, m_MiscomPath);
- strcat(filename, PS2StreamedNameTable[nFile]);
-
- mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
+ strcat(filename, StreamedNameTable[nFile]);
+ strcat(filename, ".VB");
- if ( !mp3Stream[nStream] )
-#endif
+ mp3Stream[nStream] =
+ AIL_open_stream(DIG, filename, 0);
+ if(!mp3Stream[nStream])
{
strcpy(filename, m_MiscomPath);
strcat(filename, StreamedNameTable[nFile]);
- mp3Stream[nStream] =
- AIL_open_stream(DIG, filename, 0);
+ strcat(filename, ".MP3");
+ mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
}
if(mp3Stream[nStream]) {
AIL_set_stream_loop_count(
@@ -2409,20 +2515,18 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
position = 0;
nFile = 0;
}
-#ifdef PS2_AUDIO_PATHS
strcpy(filename, m_MiscomPath);
- strcat(filename, PS2StreamedNameTable[nFile]);
-
+ strcat(filename, StreamedNameTable[nFile]);
+ strcat(filename, ".VB");
+
mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
-
- if ( !mp3Stream[nStream] )
-#endif
+ 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);
@@ -2546,6 +2650,8 @@ cSampleManager::IsStreamPlaying(uint8 nStream)
bool8
cSampleManager::InitialiseSampleBanks(void)
{
+ SetUpDebugBanksInfo();
+
int32 nBank = SFX_BANK_0;
fpSampleDescHandle = fopen(SampleBankDescFilename, "rb");
@@ -2569,7 +2675,7 @@ cSampleManager::InitialiseSampleBanks(void)
fclose(fpSampleDescHandle);
fpSampleDescHandle = NULL;
-
+
for ( uint32 i = 0; i < TOTAL_AUDIO_SAMPLES; i++ )
{
#ifdef FIX_BUGS