Make PS2 VB files work together with PC audio files

This commit is contained in:
Sergeanur 2021-07-14 23:07:47 +03:00
parent 4f78733836
commit 2ce36a48b9
4 changed files with 238 additions and 45 deletions

View file

@ -259,8 +259,8 @@ static char StreamedNameTable[][25] = {
"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"};
#else
#if defined(PS2_AUDIO_PATHS)
static char StreamedNameTable[][25]=
#ifdef PS2_AUDIO_PATHS
static char PS2StreamedNameTable[][25]=
{
"AUDIO\\MUSIC\\HEAD.VB",
"AUDIO\\MUSIC\\CLASS.VB",
@ -357,105 +357,207 @@ static char StreamedNameTable[][25]=
"AUDIO\\PHONE\\MT_PH4.VB",
"AUDIO\\MUSIC\\MISCOM.VB",
"AUDIO\\MUSIC\\END.VB",
#else
static char StreamedNameTable[][25] =
{
"AUDIO\\HEAD.WAV",
"AUDIO\\CLASS.WAV",
"AUDIO\\KJAH.WAV",
"AUDIO\\RISE.WAV",
"AUDIO\\LIPS.WAV",
"AUDIO\\GAME.WAV",
"AUDIO\\MSX.WAV",
"AUDIO\\FLASH.WAV",
"AUDIO\\CHAT.WAV",
"AUDIO\\HEAD.WAV",
"AUDIO\\POLICE.WAV",
"AUDIO\\CITY.WAV",
"AUDIO\\WATER.WAV",
"AUDIO\\COMOPEN.WAV",
"AUDIO\\SUBOPEN.WAV",
"AUDIO\\JB.MP3",
"AUDIO\\BET.MP3",
"AUDIO\\L1_LG.MP3",
"AUDIO\\L2_DSB.MP3",
"AUDIO\\L3_DM.MP3",
"AUDIO\\L4_PAP.MP3",
"AUDIO\\L5_TFB.MP3",
"AUDIO\\J0_DM2.MP3",
"AUDIO\\J1_LFL.MP3",
"AUDIO\\J2_KCL.MP3",
"AUDIO\\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.WAV",
"AUDIO\\lib_a2.WAV",
"AUDIO\\lib_a.WAV",

View file

@ -991,12 +991,21 @@ cSampleManager::Initialise(void)
strcat(m_szCDRomRootPath, ":\\");
if ( GetDriveType(m_szCDRomRootPath) == DRIVE_CDROM )
{
FILE *f;
#ifdef PS2_AUDIO_PATHS
strcpy(filepath, m_szCDRomRootPath);
strcat(filepath, PS2StreamedNameTable[0]);
f = fopen(filepath, "rb");
if ( !f )
#endif
{
strcpy(filepath, m_szCDRomRootPath);
strcat(filepath, StreamedNameTable[0]);
FILE *f = fopen(filepath, "rb");
f = fopen(filepath, "rb");
}
if ( f )
{
fclose(f);
@ -1005,10 +1014,19 @@ cSampleManager::Initialise(void)
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
{
#ifdef PS2_AUDIO_PATHS
strcpy(filepath, m_szCDRomRootPath);
strcat(filepath, PS2StreamedNameTable[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] )
{
@ -1078,7 +1096,14 @@ cSampleManager::Initialise(void)
strcpy(_aHDDPath, m_szCDRomRootPath);
rootpath[0] = '\0';
FILE *f = fopen(StreamedNameTable[0], "rb");
FILE *f;
#ifdef PS2_AUDIO_PATHS
f = fopen(PS2StreamedNameTable[0], "rb");
if (!f)
#endif
f = fopen(StreamedNameTable[0], "rb");
if ( f )
{
@ -1086,10 +1111,19 @@ cSampleManager::Initialise(void)
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
{
#ifdef PS2_AUDIO_PATHS
strcpy(filepath, rootpath);
strcat(filepath, PS2StreamedNameTable[i]);
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
if ( !mp3Stream[0] )
#endif
{
strcpy(filepath, rootpath);
strcat(filepath, StreamedNameTable[i]);
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
}
if ( mp3Stream[0] )
{
@ -1299,7 +1333,24 @@ cSampleManager::CheckForAnAudioFileOnCD(void)
{
#if GTA_VERSION < GTA3_PC_STEAM && !defined(NO_CDCHECK)
char filepath[MAX_PATH];
FILE *f;
#ifdef PS2_AUDIO_PATHS
#if GTA_VERSION >= GTA3_PC_11
if(_bUseHDDAudio)
strcpy(filepath, _aHDDPath);
else
strcpy(filepath, m_szCDRomRootPath);
#else
strcpy(filepath, m_szCDRomRootPath);
#endif // #if GTA_VERSION >= GTA3_PC_11
strcat(filepath, PS2StreamedNameTable[AudioManager.GetRandomNumber(1) % TOTAL_STREAMED_SOUNDS]);
f = fopen(filepath, "rb");
if ( !f )
#endif // PS2_AUDIO_PATHS
{
#if GTA_VERSION >= GTA3_PC_11
if (_bUseHDDAudio)
strcpy(filepath, _aHDDPath);
@ -1311,8 +1362,8 @@ cSampleManager::CheckForAnAudioFileOnCD(void)
strcat(filepath, StreamedNameTable[AudioManager.GetRandomNumber(1) % TOTAL_STREAMED_SOUNDS]);
FILE *f = fopen(filepath, "rb");
f = fopen(filepath, "rb");
}
if ( f )
{
fclose(f);
@ -2007,11 +2058,19 @@ cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
}
char filepath[MAX_PATH];
#ifdef PS2_AUDIO_PATHS
strcpy(filepath, m_szCDRomRootPath);
strcat(filepath, PS2StreamedNameTable[nFile]);
mp3Stream[nStream] = AIL_open_stream(DIG, filepath, 0);
if ( !mp3Stream[nStream] )
#endif
{
strcpy(filepath, m_szCDRomRootPath);
strcat(filepath, StreamedNameTable[nFile]);
mp3Stream[nStream] = AIL_open_stream(DIG, filepath, 0);
}
if ( mp3Stream[nStream] )
{
@ -2073,10 +2132,19 @@ cSampleManager::StartStreamedFile(uint8 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_szCDRomRootPath);
strcat(filename, PS2StreamedNameTable[nFile]);
mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
if ( !mp3Stream[nStream] )
#endif
{
strcpy(filename, m_szCDRomRootPath);
strcat(filename, StreamedNameTable[nFile]);
mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
}
if ( mp3Stream[nStream] )
{
AIL_set_stream_loop_count(mp3Stream[nStream], 1);
@ -2120,10 +2188,19 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
{
nFile = 0;
_bIsMp3Active = 0;
#ifdef PS2_AUDIO_PATHS
strcpy(filename, m_szCDRomRootPath);
strcat(filename, PS2StreamedNameTable[nFile]);
mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
if ( !mp3Stream[nStream] )
#endif
{
strcpy(filename, m_szCDRomRootPath);
strcat(filename, StreamedNameTable[nFile]);
mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
}
if ( mp3Stream[nStream] )
{
AIL_set_stream_loop_count(mp3Stream[nStream], 1);
@ -2161,10 +2238,19 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
position = 0;
nFile = 0;
}
#ifdef PS2_AUDIO_PATHS
strcpy(filename, m_szCDRomRootPath);
strcat(filename, PS2StreamedNameTable[nFile]);
mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
if ( !mp3Stream[nStream] )
#endif
{
strcpy(filename, m_szCDRomRootPath);
strcat(filename, StreamedNameTable[nFile]);
mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
}
if ( mp3Stream[nStream] )
{
AIL_set_stream_loop_count(mp3Stream[nStream], 1);

View file

@ -894,7 +894,11 @@ cSampleManager::Initialise(void)
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
{
if ( aStream[0] && aStream[0]->Open(StreamedNameTable[i], IsThisTrackAt16KHz(i) ? 16000 : 32000) )
if(aStream[0] && (
#ifdef PS2_AUDIO_PATHS
aStream[0]->Open(PS2StreamedNameTable[i], IsThisTrackAt16KHz(i) ? 16000 : 32000) ||
#endif
aStream[0]->Open(StreamedNameTable[i], IsThisTrackAt16KHz(i) ? 16000 : 32000)))
{
uint32 tatalms = aStream[0]->GetLengthMS();
aStream[0]->Close();
@ -1601,8 +1605,6 @@ cSampleManager::StopChannel(uint32 nChannel)
void
cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
{
char filename[MAX_PATH];
ASSERT( nStream < MAX_STREAMS );
if ( nFile < TOTAL_STREAMED_SOUNDS )
@ -1611,9 +1613,10 @@ cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
stream->Close();
strcpy(filename, StreamedNameTable[nFile]);
stream->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
#ifdef PS2_AUDIO_PATHS
if(!stream->Open(PS2StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000))
#endif
stream->Open(StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
if ( !stream->Setup() )
{
stream->Close();
@ -1673,10 +1676,11 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
// Try to continue from previous song, if already started
if(!_GetMP3PosFromStreamPos(&position, &e) && !e) {
nFile = 0;
strcpy(filename, StreamedNameTable[nFile]);
CStream *stream = aStream[nStream];
stream->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
#ifdef PS2_AUDIO_PATHS
if(!stream->Open(PS2StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000))
#endif
stream->Open(StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
if ( stream->Setup() ) {
if (position != 0)
stream->SetPosMS(position);
@ -1725,10 +1729,11 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
{
nFile = 0;
_bIsMp3Active = 0;
strcpy(filename, StreamedNameTable[nFile]);
CStream *stream = aStream[nStream];
stream->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
#ifdef PS2_AUDIO_PATHS
if(!stream->Open(PS2StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000))
#endif
stream->Open(StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
if (stream->Setup()) {
if (position != 0)
@ -1768,11 +1773,11 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
position = 0;
nFile = 0;
}
strcpy(filename, StreamedNameTable[nFile]);
CStream *stream = aStream[nStream];
aStream[nStream]->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
#ifdef PS2_AUDIO_PATHS
if(!stream->Open(PS2StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000))
#endif
stream->Open(StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
if ( stream->Setup() ) {
if (position != 0)

View file

@ -420,7 +420,7 @@ enum Config {
#define RADIO_SCROLL_TO_PREV_STATION
#define AUDIO_CACHE
#define PS2_AUDIO_CHANNELS // increases the maximum number of audio channels to PS2 value of 44 (PC has 28 originally)
//#define PS2_AUDIO_PATHS // changes audio paths for cutscenes and radio to PS2 paths (needs vbdec on MSS builds)
#define PS2_AUDIO_PATHS // changes audio paths for cutscenes and radio to PS2 paths (needs vbdec on MSS builds)
//#define AUDIO_OAL_USE_SNDFILE // use libsndfile to decode WAVs instead of our internal decoder
#define AUDIO_OAL_USE_MPG123 // use mpg123 to support mp3 files
#define PAUSE_RADIO_IN_FRONTEND // pause radio when game is paused