mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-26 02:54:14 +01:00
Make PS2 VB files work together with PC audio files
This commit is contained in:
parent
4f78733836
commit
2ce36a48b9
@ -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\\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"};
|
"AUDIO\\t3_b.OPUS", "AUDIO\\t3_c.OPUS", "AUDIO\\k1_b.OPUS", "AUDIO\\cat1.OPUS"};
|
||||||
#else
|
#else
|
||||||
#if defined(PS2_AUDIO_PATHS)
|
#ifdef PS2_AUDIO_PATHS
|
||||||
static char StreamedNameTable[][25]=
|
static char PS2StreamedNameTable[][25]=
|
||||||
{
|
{
|
||||||
"AUDIO\\MUSIC\\HEAD.VB",
|
"AUDIO\\MUSIC\\HEAD.VB",
|
||||||
"AUDIO\\MUSIC\\CLASS.VB",
|
"AUDIO\\MUSIC\\CLASS.VB",
|
||||||
@ -357,105 +357,207 @@ static char StreamedNameTable[][25]=
|
|||||||
"AUDIO\\PHONE\\MT_PH4.VB",
|
"AUDIO\\PHONE\\MT_PH4.VB",
|
||||||
"AUDIO\\MUSIC\\MISCOM.VB",
|
"AUDIO\\MUSIC\\MISCOM.VB",
|
||||||
"AUDIO\\MUSIC\\END.VB",
|
"AUDIO\\MUSIC\\END.VB",
|
||||||
#else
|
"AUDIO\\lib_a1.WAV",
|
||||||
static char StreamedNameTable[][25] =
|
"AUDIO\\lib_a2.WAV",
|
||||||
{
|
"AUDIO\\lib_a.WAV",
|
||||||
"AUDIO\\HEAD.WAV",
|
"AUDIO\\lib_b.WAV",
|
||||||
"AUDIO\\CLASS.WAV",
|
"AUDIO\\lib_c.WAV",
|
||||||
"AUDIO\\KJAH.WAV",
|
"AUDIO\\lib_d.WAV",
|
||||||
"AUDIO\\RISE.WAV",
|
"AUDIO\\l2_a.WAV",
|
||||||
"AUDIO\\LIPS.WAV",
|
"AUDIO\\j4t_1.WAV",
|
||||||
"AUDIO\\GAME.WAV",
|
"AUDIO\\j4t_2.WAV",
|
||||||
"AUDIO\\MSX.WAV",
|
"AUDIO\\j4t_3.WAV",
|
||||||
"AUDIO\\FLASH.WAV",
|
"AUDIO\\j4t_4.WAV",
|
||||||
"AUDIO\\CHAT.WAV",
|
"AUDIO\\j4_a.WAV",
|
||||||
"AUDIO\\HEAD.WAV",
|
"AUDIO\\j4_b.WAV",
|
||||||
"AUDIO\\POLICE.WAV",
|
"AUDIO\\j4_c.WAV",
|
||||||
"AUDIO\\CITY.WAV",
|
"AUDIO\\j4_d.WAV",
|
||||||
"AUDIO\\WATER.WAV",
|
"AUDIO\\j4_e.WAV",
|
||||||
"AUDIO\\COMOPEN.WAV",
|
"AUDIO\\j4_f.WAV",
|
||||||
"AUDIO\\SUBOPEN.WAV",
|
"AUDIO\\j6_1.WAV",
|
||||||
"AUDIO\\JB.MP3",
|
"AUDIO\\j6_a.WAV",
|
||||||
"AUDIO\\BET.MP3",
|
"AUDIO\\j6_b.WAV",
|
||||||
"AUDIO\\L1_LG.MP3",
|
"AUDIO\\j6_c.WAV",
|
||||||
"AUDIO\\L2_DSB.MP3",
|
"AUDIO\\j6_d.WAV",
|
||||||
"AUDIO\\L3_DM.MP3",
|
"AUDIO\\t4_a.WAV",
|
||||||
"AUDIO\\L4_PAP.MP3",
|
"AUDIO\\s1_a.WAV",
|
||||||
"AUDIO\\L5_TFB.MP3",
|
"AUDIO\\s1_a1.WAV",
|
||||||
"AUDIO\\J0_DM2.MP3",
|
"AUDIO\\s1_b.WAV",
|
||||||
"AUDIO\\J1_LFL.MP3",
|
"AUDIO\\s1_c.WAV",
|
||||||
"AUDIO\\J2_KCL.MP3",
|
"AUDIO\\s1_c1.WAV",
|
||||||
"AUDIO\\J3_VH.MP3",
|
"AUDIO\\s1_d.WAV",
|
||||||
"AUDIO\\J4_ETH.MP3",
|
"AUDIO\\s1_e.WAV",
|
||||||
"AUDIO\\J5_DST.MP3",
|
"AUDIO\\s1_f.WAV",
|
||||||
"AUDIO\\J6_TBJ.MP3",
|
"AUDIO\\s1_g.WAV",
|
||||||
"AUDIO\\T1_TOL.MP3",
|
"AUDIO\\s1_h.WAV",
|
||||||
"AUDIO\\T2_TPU.MP3",
|
"AUDIO\\s1_i.WAV",
|
||||||
"AUDIO\\T3_MAS.MP3",
|
"AUDIO\\s1_j.WAV",
|
||||||
"AUDIO\\T4_TAT.MP3",
|
"AUDIO\\s1_k.WAV",
|
||||||
"AUDIO\\T5_BF.MP3",
|
"AUDIO\\s1_l.WAV",
|
||||||
"AUDIO\\S0_MAS.MP3",
|
"AUDIO\\s3_a.WAV",
|
||||||
"AUDIO\\S1_PF.MP3",
|
"AUDIO\\s3_b.WAV",
|
||||||
"AUDIO\\S2_CTG.MP3",
|
"AUDIO\\el3_a.WAV",
|
||||||
"AUDIO\\S3_RTC.MP3",
|
"AUDIO\\mf1_a.WAV",
|
||||||
"AUDIO\\S5_LRQ.MP3",
|
"AUDIO\\mf2_a.WAV",
|
||||||
"AUDIO\\S4_BDBA.MP3",
|
"AUDIO\\mf3_a.WAV",
|
||||||
"AUDIO\\S4_BDBB.MP3",
|
"AUDIO\\mf3_b.WAV",
|
||||||
"AUDIO\\S2_CTG2.MP3",
|
"AUDIO\\mf3_b1.WAV",
|
||||||
"AUDIO\\S4_BDBD.MP3",
|
"AUDIO\\mf3_c.WAV",
|
||||||
"AUDIO\\S5_LRQB.MP3",
|
"AUDIO\\mf4_a.WAV",
|
||||||
"AUDIO\\S5_LRQC.MP3",
|
"AUDIO\\mf4_b.WAV",
|
||||||
"AUDIO\\A1_SSO.WAV",
|
"AUDIO\\mf4_c.WAV",
|
||||||
"AUDIO\\A2_PP.WAV",
|
"AUDIO\\a1_a.WAV",
|
||||||
"AUDIO\\A3_SS.WAV",
|
"AUDIO\\a3_a.WAV",
|
||||||
"AUDIO\\A4_PDR.WAV",
|
"AUDIO\\a5_a.WAV",
|
||||||
"AUDIO\\A5_K2FT.WAV",
|
"AUDIO\\a4_a.WAV",
|
||||||
"AUDIO\\K1_KBO.MP3",
|
"AUDIO\\a4_b.WAV",
|
||||||
"AUDIO\\K2_GIS.MP3",
|
"AUDIO\\a4_c.WAV",
|
||||||
"AUDIO\\K3_DS.MP3",
|
"AUDIO\\a4_d.WAV",
|
||||||
"AUDIO\\K4_SHI.MP3",
|
"AUDIO\\k1_a.WAV",
|
||||||
"AUDIO\\K5_SD.MP3",
|
"AUDIO\\k3_a.WAV",
|
||||||
"AUDIO\\R0_PDR2.MP3",
|
"AUDIO\\r1_a.WAV",
|
||||||
"AUDIO\\R1_SW.MP3",
|
"AUDIO\\r2_a.WAV",
|
||||||
"AUDIO\\R2_AP.MP3",
|
"AUDIO\\r2_b.WAV",
|
||||||
"AUDIO\\R3_ED.MP3",
|
"AUDIO\\r2_c.WAV",
|
||||||
"AUDIO\\R4_GF.MP3",
|
"AUDIO\\r2_d.WAV",
|
||||||
"AUDIO\\R5_PB.MP3",
|
"AUDIO\\r2_e.WAV",
|
||||||
"AUDIO\\R6_MM.MP3",
|
"AUDIO\\r2_f.WAV",
|
||||||
"AUDIO\\D1_STOG.MP3",
|
"AUDIO\\r2_g.WAV",
|
||||||
"AUDIO\\D2_KK.MP3",
|
"AUDIO\\r2_h.WAV",
|
||||||
"AUDIO\\D3_ADO.MP3",
|
"AUDIO\\r5_a.WAV",
|
||||||
"AUDIO\\D5_ES.MP3",
|
"AUDIO\\r6_a.WAV",
|
||||||
"AUDIO\\D7_MLD.MP3",
|
"AUDIO\\r6_a1.WAV",
|
||||||
"AUDIO\\D4_GTA.MP3",
|
"AUDIO\\r6_b.WAV",
|
||||||
"AUDIO\\D4_GTA2.MP3",
|
"AUDIO\\lo2_a.WAV",
|
||||||
"AUDIO\\D6_STS.MP3",
|
"AUDIO\\lo6_a.WAV",
|
||||||
"AUDIO\\A6_BAIT.WAV",
|
"AUDIO\\yd2_a.WAV",
|
||||||
"AUDIO\\A7_ETG.WAV",
|
"AUDIO\\yd2_b.WAV",
|
||||||
"AUDIO\\A8_PS.WAV",
|
"AUDIO\\yd2_c.WAV",
|
||||||
"AUDIO\\A9_ASD.WAV",
|
"AUDIO\\yd2_c1.WAV",
|
||||||
"AUDIO\\K4_SHI2.MP3",
|
"AUDIO\\yd2_d.WAV",
|
||||||
"AUDIO\\C1_TEX.MP3",
|
"AUDIO\\yd2_e.WAV",
|
||||||
"AUDIO\\EL_PH1.MP3",
|
"AUDIO\\yd2_f.WAV",
|
||||||
"AUDIO\\EL_PH2.MP3",
|
"AUDIO\\yd2_g.WAV",
|
||||||
"AUDIO\\EL_PH3.MP3",
|
"AUDIO\\yd2_h.WAV",
|
||||||
"AUDIO\\EL_PH4.MP3",
|
"AUDIO\\yd2_ass.WAV",
|
||||||
"AUDIO\\YD_PH1.MP3",
|
"AUDIO\\yd2_ok.WAV",
|
||||||
"AUDIO\\YD_PH2.MP3",
|
"AUDIO\\h5_a.WAV",
|
||||||
"AUDIO\\YD_PH3.MP3",
|
"AUDIO\\h5_b.WAV",
|
||||||
"AUDIO\\YD_PH4.MP3",
|
"AUDIO\\h5_c.WAV",
|
||||||
"AUDIO\\HD_PH1.MP3",
|
"AUDIO\\ammu_a.WAV",
|
||||||
"AUDIO\\HD_PH2.MP3",
|
"AUDIO\\ammu_b.WAV",
|
||||||
"AUDIO\\HD_PH3.MP3",
|
"AUDIO\\ammu_c.WAV",
|
||||||
"AUDIO\\HD_PH4.MP3",
|
"AUDIO\\door_1.WAV",
|
||||||
"AUDIO\\HD_PH5.MP3",
|
"AUDIO\\door_2.WAV",
|
||||||
"AUDIO\\MT_PH1.MP3",
|
"AUDIO\\door_3.WAV",
|
||||||
"AUDIO\\MT_PH2.MP3",
|
"AUDIO\\door_4.WAV",
|
||||||
"AUDIO\\MT_PH3.MP3",
|
"AUDIO\\door_5.WAV",
|
||||||
"AUDIO\\MT_PH4.MP3",
|
"AUDIO\\door_6.WAV",
|
||||||
"AUDIO\\MISCOM.WAV",
|
"AUDIO\\t3_a.WAV",
|
||||||
"AUDIO\\END.MP3",
|
"AUDIO\\t3_b.WAV",
|
||||||
#endif
|
"AUDIO\\t3_c.WAV",
|
||||||
|
"AUDIO\\k1_b.WAV",
|
||||||
|
"AUDIO\\cat1.WAV"
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
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\\J3_VH.MP3",
|
||||||
|
"AUDIO\\J4_ETH.MP3",
|
||||||
|
"AUDIO\\J5_DST.MP3",
|
||||||
|
"AUDIO\\J6_TBJ.MP3",
|
||||||
|
"AUDIO\\T1_TOL.MP3",
|
||||||
|
"AUDIO\\T2_TPU.MP3",
|
||||||
|
"AUDIO\\T3_MAS.MP3",
|
||||||
|
"AUDIO\\T4_TAT.MP3",
|
||||||
|
"AUDIO\\T5_BF.MP3",
|
||||||
|
"AUDIO\\S0_MAS.MP3",
|
||||||
|
"AUDIO\\S1_PF.MP3",
|
||||||
|
"AUDIO\\S2_CTG.MP3",
|
||||||
|
"AUDIO\\S3_RTC.MP3",
|
||||||
|
"AUDIO\\S5_LRQ.MP3",
|
||||||
|
"AUDIO\\S4_BDBA.MP3",
|
||||||
|
"AUDIO\\S4_BDBB.MP3",
|
||||||
|
"AUDIO\\S2_CTG2.MP3",
|
||||||
|
"AUDIO\\S4_BDBD.MP3",
|
||||||
|
"AUDIO\\S5_LRQB.MP3",
|
||||||
|
"AUDIO\\S5_LRQC.MP3",
|
||||||
|
"AUDIO\\A1_SSO.WAV",
|
||||||
|
"AUDIO\\A2_PP.WAV",
|
||||||
|
"AUDIO\\A3_SS.WAV",
|
||||||
|
"AUDIO\\A4_PDR.WAV",
|
||||||
|
"AUDIO\\A5_K2FT.WAV",
|
||||||
|
"AUDIO\\K1_KBO.MP3",
|
||||||
|
"AUDIO\\K2_GIS.MP3",
|
||||||
|
"AUDIO\\K3_DS.MP3",
|
||||||
|
"AUDIO\\K4_SHI.MP3",
|
||||||
|
"AUDIO\\K5_SD.MP3",
|
||||||
|
"AUDIO\\R0_PDR2.MP3",
|
||||||
|
"AUDIO\\R1_SW.MP3",
|
||||||
|
"AUDIO\\R2_AP.MP3",
|
||||||
|
"AUDIO\\R3_ED.MP3",
|
||||||
|
"AUDIO\\R4_GF.MP3",
|
||||||
|
"AUDIO\\R5_PB.MP3",
|
||||||
|
"AUDIO\\R6_MM.MP3",
|
||||||
|
"AUDIO\\D1_STOG.MP3",
|
||||||
|
"AUDIO\\D2_KK.MP3",
|
||||||
|
"AUDIO\\D3_ADO.MP3",
|
||||||
|
"AUDIO\\D5_ES.MP3",
|
||||||
|
"AUDIO\\D7_MLD.MP3",
|
||||||
|
"AUDIO\\D4_GTA.MP3",
|
||||||
|
"AUDIO\\D4_GTA2.MP3",
|
||||||
|
"AUDIO\\D6_STS.MP3",
|
||||||
|
"AUDIO\\A6_BAIT.WAV",
|
||||||
|
"AUDIO\\A7_ETG.WAV",
|
||||||
|
"AUDIO\\A8_PS.WAV",
|
||||||
|
"AUDIO\\A9_ASD.WAV",
|
||||||
|
"AUDIO\\K4_SHI2.MP3",
|
||||||
|
"AUDIO\\C1_TEX.MP3",
|
||||||
|
"AUDIO\\EL_PH1.MP3",
|
||||||
|
"AUDIO\\EL_PH2.MP3",
|
||||||
|
"AUDIO\\EL_PH3.MP3",
|
||||||
|
"AUDIO\\EL_PH4.MP3",
|
||||||
|
"AUDIO\\YD_PH1.MP3",
|
||||||
|
"AUDIO\\YD_PH2.MP3",
|
||||||
|
"AUDIO\\YD_PH3.MP3",
|
||||||
|
"AUDIO\\YD_PH4.MP3",
|
||||||
|
"AUDIO\\HD_PH1.MP3",
|
||||||
|
"AUDIO\\HD_PH2.MP3",
|
||||||
|
"AUDIO\\HD_PH3.MP3",
|
||||||
|
"AUDIO\\HD_PH4.MP3",
|
||||||
|
"AUDIO\\HD_PH5.MP3",
|
||||||
|
"AUDIO\\MT_PH1.MP3",
|
||||||
|
"AUDIO\\MT_PH2.MP3",
|
||||||
|
"AUDIO\\MT_PH3.MP3",
|
||||||
|
"AUDIO\\MT_PH4.MP3",
|
||||||
|
"AUDIO\\MISCOM.WAV",
|
||||||
|
"AUDIO\\END.MP3",
|
||||||
"AUDIO\\lib_a1.WAV",
|
"AUDIO\\lib_a1.WAV",
|
||||||
"AUDIO\\lib_a2.WAV",
|
"AUDIO\\lib_a2.WAV",
|
||||||
"AUDIO\\lib_a.WAV",
|
"AUDIO\\lib_a.WAV",
|
||||||
|
@ -992,11 +992,20 @@ cSampleManager::Initialise(void)
|
|||||||
|
|
||||||
if ( GetDriveType(m_szCDRomRootPath) == DRIVE_CDROM )
|
if ( GetDriveType(m_szCDRomRootPath) == DRIVE_CDROM )
|
||||||
{
|
{
|
||||||
|
FILE *f;
|
||||||
|
#ifdef PS2_AUDIO_PATHS
|
||||||
strcpy(filepath, m_szCDRomRootPath);
|
strcpy(filepath, m_szCDRomRootPath);
|
||||||
strcat(filepath, StreamedNameTable[0]);
|
strcat(filepath, PS2StreamedNameTable[0]);
|
||||||
|
f = fopen(filepath, "rb");
|
||||||
|
|
||||||
FILE *f = fopen(filepath, "rb");
|
if ( !f )
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
strcpy(filepath, m_szCDRomRootPath);
|
||||||
|
strcat(filepath, StreamedNameTable[0]);
|
||||||
|
|
||||||
|
f = fopen(filepath, "rb");
|
||||||
|
}
|
||||||
if ( f )
|
if ( f )
|
||||||
{
|
{
|
||||||
fclose(f);
|
fclose(f);
|
||||||
@ -1005,10 +1014,19 @@ cSampleManager::Initialise(void)
|
|||||||
|
|
||||||
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
|
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
|
||||||
{
|
{
|
||||||
|
#ifdef PS2_AUDIO_PATHS
|
||||||
strcpy(filepath, m_szCDRomRootPath);
|
strcpy(filepath, m_szCDRomRootPath);
|
||||||
strcat(filepath, StreamedNameTable[i]);
|
strcat(filepath, PS2StreamedNameTable[i]);
|
||||||
|
|
||||||
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
|
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] )
|
if ( mp3Stream[0] )
|
||||||
{
|
{
|
||||||
@ -1078,7 +1096,14 @@ cSampleManager::Initialise(void)
|
|||||||
strcpy(_aHDDPath, m_szCDRomRootPath);
|
strcpy(_aHDDPath, m_szCDRomRootPath);
|
||||||
rootpath[0] = '\0';
|
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 )
|
if ( f )
|
||||||
{
|
{
|
||||||
@ -1086,10 +1111,19 @@ cSampleManager::Initialise(void)
|
|||||||
|
|
||||||
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
|
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
|
||||||
{
|
{
|
||||||
|
#ifdef PS2_AUDIO_PATHS
|
||||||
strcpy(filepath, rootpath);
|
strcpy(filepath, rootpath);
|
||||||
strcat(filepath, StreamedNameTable[i]);
|
strcat(filepath, PS2StreamedNameTable[i]);
|
||||||
|
|
||||||
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
|
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] )
|
if ( mp3Stream[0] )
|
||||||
{
|
{
|
||||||
@ -1299,9 +1333,11 @@ cSampleManager::CheckForAnAudioFileOnCD(void)
|
|||||||
{
|
{
|
||||||
#if GTA_VERSION < GTA3_PC_STEAM && !defined(NO_CDCHECK)
|
#if GTA_VERSION < GTA3_PC_STEAM && !defined(NO_CDCHECK)
|
||||||
char filepath[MAX_PATH];
|
char filepath[MAX_PATH];
|
||||||
|
FILE *f;
|
||||||
|
|
||||||
|
#ifdef PS2_AUDIO_PATHS
|
||||||
#if GTA_VERSION >= GTA3_PC_11
|
#if GTA_VERSION >= GTA3_PC_11
|
||||||
if (_bUseHDDAudio)
|
if(_bUseHDDAudio)
|
||||||
strcpy(filepath, _aHDDPath);
|
strcpy(filepath, _aHDDPath);
|
||||||
else
|
else
|
||||||
strcpy(filepath, m_szCDRomRootPath);
|
strcpy(filepath, m_szCDRomRootPath);
|
||||||
@ -1309,10 +1345,25 @@ cSampleManager::CheckForAnAudioFileOnCD(void)
|
|||||||
strcpy(filepath, m_szCDRomRootPath);
|
strcpy(filepath, m_szCDRomRootPath);
|
||||||
#endif // #if GTA_VERSION >= GTA3_PC_11
|
#endif // #if GTA_VERSION >= GTA3_PC_11
|
||||||
|
|
||||||
strcat(filepath, StreamedNameTable[AudioManager.GetRandomNumber(1) % TOTAL_STREAMED_SOUNDS]);
|
strcat(filepath, PS2StreamedNameTable[AudioManager.GetRandomNumber(1) % TOTAL_STREAMED_SOUNDS]);
|
||||||
|
|
||||||
FILE *f = fopen(filepath, "rb");
|
f = fopen(filepath, "rb");
|
||||||
|
if ( !f )
|
||||||
|
#endif // 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, StreamedNameTable[AudioManager.GetRandomNumber(1) % TOTAL_STREAMED_SOUNDS]);
|
||||||
|
|
||||||
|
f = fopen(filepath, "rb");
|
||||||
|
}
|
||||||
if ( f )
|
if ( f )
|
||||||
{
|
{
|
||||||
fclose(f);
|
fclose(f);
|
||||||
@ -2007,11 +2058,19 @@ cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
|
|||||||
}
|
}
|
||||||
|
|
||||||
char filepath[MAX_PATH];
|
char filepath[MAX_PATH];
|
||||||
|
#ifdef PS2_AUDIO_PATHS
|
||||||
strcpy(filepath, m_szCDRomRootPath);
|
strcpy(filepath, m_szCDRomRootPath);
|
||||||
strcat(filepath, StreamedNameTable[nFile]);
|
strcat(filepath, PS2StreamedNameTable[nFile]);
|
||||||
|
|
||||||
mp3Stream[nStream] = AIL_open_stream(DIG, filepath, 0);
|
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] )
|
if ( mp3Stream[nStream] )
|
||||||
{
|
{
|
||||||
@ -2073,10 +2132,19 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
|
|||||||
// Try to continue from previous song, if already started
|
// Try to continue from previous song, if already started
|
||||||
if(!_GetMP3PosFromStreamPos(&position, &e) && !e) {
|
if(!_GetMP3PosFromStreamPos(&position, &e) && !e) {
|
||||||
nFile = 0;
|
nFile = 0;
|
||||||
|
#ifdef PS2_AUDIO_PATHS
|
||||||
strcpy(filename, m_szCDRomRootPath);
|
strcpy(filename, m_szCDRomRootPath);
|
||||||
strcat(filename, StreamedNameTable[nFile]);
|
strcat(filename, PS2StreamedNameTable[nFile]);
|
||||||
|
|
||||||
mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
|
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] )
|
if ( mp3Stream[nStream] )
|
||||||
{
|
{
|
||||||
AIL_set_stream_loop_count(mp3Stream[nStream], 1);
|
AIL_set_stream_loop_count(mp3Stream[nStream], 1);
|
||||||
@ -2120,10 +2188,19 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
|
|||||||
{
|
{
|
||||||
nFile = 0;
|
nFile = 0;
|
||||||
_bIsMp3Active = 0;
|
_bIsMp3Active = 0;
|
||||||
|
#ifdef PS2_AUDIO_PATHS
|
||||||
strcpy(filename, m_szCDRomRootPath);
|
strcpy(filename, m_szCDRomRootPath);
|
||||||
strcat(filename, StreamedNameTable[nFile]);
|
strcat(filename, PS2StreamedNameTable[nFile]);
|
||||||
|
|
||||||
mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
|
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] )
|
if ( mp3Stream[nStream] )
|
||||||
{
|
{
|
||||||
AIL_set_stream_loop_count(mp3Stream[nStream], 1);
|
AIL_set_stream_loop_count(mp3Stream[nStream], 1);
|
||||||
@ -2161,10 +2238,19 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
|
|||||||
position = 0;
|
position = 0;
|
||||||
nFile = 0;
|
nFile = 0;
|
||||||
}
|
}
|
||||||
|
#ifdef PS2_AUDIO_PATHS
|
||||||
strcpy(filename, m_szCDRomRootPath);
|
strcpy(filename, m_szCDRomRootPath);
|
||||||
strcat(filename, StreamedNameTable[nFile]);
|
strcat(filename, PS2StreamedNameTable[nFile]);
|
||||||
|
|
||||||
mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
|
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] )
|
if ( mp3Stream[nStream] )
|
||||||
{
|
{
|
||||||
AIL_set_stream_loop_count(mp3Stream[nStream], 1);
|
AIL_set_stream_loop_count(mp3Stream[nStream], 1);
|
||||||
|
@ -894,7 +894,11 @@ cSampleManager::Initialise(void)
|
|||||||
|
|
||||||
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
|
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();
|
uint32 tatalms = aStream[0]->GetLengthMS();
|
||||||
aStream[0]->Close();
|
aStream[0]->Close();
|
||||||
@ -1601,8 +1605,6 @@ cSampleManager::StopChannel(uint32 nChannel)
|
|||||||
void
|
void
|
||||||
cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
|
cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
|
||||||
{
|
{
|
||||||
char filename[MAX_PATH];
|
|
||||||
|
|
||||||
ASSERT( nStream < MAX_STREAMS );
|
ASSERT( nStream < MAX_STREAMS );
|
||||||
|
|
||||||
if ( nFile < TOTAL_STREAMED_SOUNDS )
|
if ( nFile < TOTAL_STREAMED_SOUNDS )
|
||||||
@ -1611,9 +1613,10 @@ cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
|
|||||||
|
|
||||||
stream->Close();
|
stream->Close();
|
||||||
|
|
||||||
strcpy(filename, StreamedNameTable[nFile]);
|
#ifdef PS2_AUDIO_PATHS
|
||||||
|
if(!stream->Open(PS2StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000))
|
||||||
stream->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
|
#endif
|
||||||
|
stream->Open(StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
|
||||||
if ( !stream->Setup() )
|
if ( !stream->Setup() )
|
||||||
{
|
{
|
||||||
stream->Close();
|
stream->Close();
|
||||||
@ -1673,10 +1676,11 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
|
|||||||
// Try to continue from previous song, if already started
|
// Try to continue from previous song, if already started
|
||||||
if(!_GetMP3PosFromStreamPos(&position, &e) && !e) {
|
if(!_GetMP3PosFromStreamPos(&position, &e) && !e) {
|
||||||
nFile = 0;
|
nFile = 0;
|
||||||
strcpy(filename, StreamedNameTable[nFile]);
|
|
||||||
|
|
||||||
CStream *stream = aStream[nStream];
|
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 ( stream->Setup() ) {
|
||||||
if (position != 0)
|
if (position != 0)
|
||||||
stream->SetPosMS(position);
|
stream->SetPosMS(position);
|
||||||
@ -1725,10 +1729,11 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
|
|||||||
{
|
{
|
||||||
nFile = 0;
|
nFile = 0;
|
||||||
_bIsMp3Active = 0;
|
_bIsMp3Active = 0;
|
||||||
strcpy(filename, StreamedNameTable[nFile]);
|
CStream *stream = aStream[nStream];
|
||||||
|
#ifdef PS2_AUDIO_PATHS
|
||||||
CStream* stream = aStream[nStream];
|
if(!stream->Open(PS2StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000))
|
||||||
stream->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
|
#endif
|
||||||
|
stream->Open(StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
|
||||||
|
|
||||||
if (stream->Setup()) {
|
if (stream->Setup()) {
|
||||||
if (position != 0)
|
if (position != 0)
|
||||||
@ -1768,11 +1773,11 @@ cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
|
|||||||
position = 0;
|
position = 0;
|
||||||
nFile = 0;
|
nFile = 0;
|
||||||
}
|
}
|
||||||
strcpy(filename, StreamedNameTable[nFile]);
|
|
||||||
|
|
||||||
CStream *stream = aStream[nStream];
|
CStream *stream = aStream[nStream];
|
||||||
|
#ifdef PS2_AUDIO_PATHS
|
||||||
aStream[nStream]->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
|
if(!stream->Open(PS2StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000))
|
||||||
|
#endif
|
||||||
|
stream->Open(StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
|
||||||
|
|
||||||
if ( stream->Setup() ) {
|
if ( stream->Setup() ) {
|
||||||
if (position != 0)
|
if (position != 0)
|
||||||
|
@ -420,7 +420,7 @@ enum Config {
|
|||||||
#define RADIO_SCROLL_TO_PREV_STATION
|
#define RADIO_SCROLL_TO_PREV_STATION
|
||||||
#define AUDIO_CACHE
|
#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_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_SNDFILE // use libsndfile to decode WAVs instead of our internal decoder
|
||||||
#define AUDIO_OAL_USE_MPG123 // use mpg123 to support mp3 files
|
#define AUDIO_OAL_USE_MPG123 // use mpg123 to support mp3 files
|
||||||
#define PAUSE_RADIO_IN_FRONTEND // pause radio when game is paused
|
#define PAUSE_RADIO_IN_FRONTEND // pause radio when game is paused
|
||||||
|
Loading…
Reference in New Issue
Block a user