mirror of https://github.com/Nofated095/re-GTA.git
Audio: PS2 mission audio
This commit is contained in:
parent
57757e6c6f
commit
6c3cb330c1
|
@ -279,9 +279,15 @@ cAudioManager::ProcessSpecial()
|
|||
if (m_bIsPaused) {
|
||||
if (!m_bWasPaused) {
|
||||
MusicManager.ChangeMusicMode(MUSICMODE_FRONTEND);
|
||||
#ifndef GTA_PS2
|
||||
SampleManager.SetEffectsFadeVolume(MAX_VOLUME);
|
||||
SampleManager.SetMusicFadeVolume(MAX_VOLUME);
|
||||
#endif
|
||||
}
|
||||
#ifdef GTA_PS2
|
||||
if (!SampleManager.IsSampleBankLoaded(SFX_BANK_FRONT_END_MENU))
|
||||
SampleManager.LoadSampleBank(SFX_BANK_FRONT_END_MENU);
|
||||
#endif
|
||||
} else {
|
||||
if (m_bWasPaused) {
|
||||
MusicManager.StopFrontEndTrack();
|
||||
|
@ -669,7 +675,11 @@ enum
|
|||
BRIDGE_WARNING_VOLUME = 100,
|
||||
|
||||
MISSION_AUDIO_MAX_DIST = 50,
|
||||
#ifdef GTA_PS2
|
||||
MISSION_AUDIO_VOLUME = MAX_VOLUME,
|
||||
#else
|
||||
MISSION_AUDIO_VOLUME = 80,
|
||||
#endif
|
||||
};
|
||||
|
||||
#pragma region VEHICLE AUDIO
|
||||
|
@ -8644,40 +8654,45 @@ struct MissionAudioData {
|
|||
};
|
||||
|
||||
Const MissionAudioData MissionAudioNameSfxAssoc[] = {
|
||||
{"lib_a1", STREAMED_SOUND_MISSION_LIB_A1}, {"lib_a2", STREAMED_SOUND_MISSION_LIB_A2}, {"lib_a", STREAMED_SOUND_MISSION_LIB_A},
|
||||
{"lib_b", STREAMED_SOUND_MISSION_LIB_B}, {"lib_c", STREAMED_SOUND_MISSION_LIB_C}, {"lib_d", STREAMED_SOUND_MISSION_LIB_D},
|
||||
{"l2_a", STREAMED_SOUND_MISSION_L2_A}, {"j4t_1", STREAMED_SOUND_MISSION_J4T_1}, {"j4t_2", STREAMED_SOUND_MISSION_J4T_2},
|
||||
{"j4t_3", STREAMED_SOUND_MISSION_J4T_3}, {"j4t_4", STREAMED_SOUND_MISSION_J4T_4}, {"j4_a", STREAMED_SOUND_MISSION_J4_A},
|
||||
{"j4_b", STREAMED_SOUND_MISSION_J4_B}, {"j4_c", STREAMED_SOUND_MISSION_J4_C}, {"j4_d", STREAMED_SOUND_MISSION_J4_D},
|
||||
{"j4_e", STREAMED_SOUND_MISSION_J4_E}, {"j4_f", STREAMED_SOUND_MISSION_J4_F}, {"j6_1", STREAMED_SOUND_MISSION_J6_1},
|
||||
{"j6_a", STREAMED_SOUND_MISSION_J6_A}, {"j6_b", STREAMED_SOUND_MISSION_J6_B}, {"j6_c", STREAMED_SOUND_MISSION_J6_C},
|
||||
{"j6_d", STREAMED_SOUND_MISSION_J6_D}, {"t4_a", STREAMED_SOUND_MISSION_T4_A}, {"s1_a", STREAMED_SOUND_MISSION_S1_A},
|
||||
{"s1_a1", STREAMED_SOUND_MISSION_S1_A1}, {"s1_b", STREAMED_SOUND_MISSION_S1_B}, {"s1_c", STREAMED_SOUND_MISSION_S1_C},
|
||||
{"s1_c1", STREAMED_SOUND_MISSION_S1_C1}, {"s1_d", STREAMED_SOUND_MISSION_S1_D}, {"s1_e", STREAMED_SOUND_MISSION_S1_E},
|
||||
{"s1_f", STREAMED_SOUND_MISSION_S1_F}, {"s1_g", STREAMED_SOUND_MISSION_S1_G}, {"s1_h", STREAMED_SOUND_MISSION_S1_H},
|
||||
{"s1_i", STREAMED_SOUND_MISSION_S1_I}, {"s1_j", STREAMED_SOUND_MISSION_S1_J}, {"s1_k", STREAMED_SOUND_MISSION_S1_K},
|
||||
{"s1_l", STREAMED_SOUND_MISSION_S1_L}, {"s3_a", STREAMED_SOUND_MISSION_S3_A}, {"s3_b", STREAMED_SOUND_MISSION_S3_B},
|
||||
{"el3_a", STREAMED_SOUND_MISSION_EL3_A}, {"mf1_a", STREAMED_SOUND_MISSION_MF1_A}, {"mf2_a", STREAMED_SOUND_MISSION_MF2_A},
|
||||
{"mf3_a", STREAMED_SOUND_MISSION_MF3_A}, {"mf3_b", STREAMED_SOUND_MISSION_MF3_B}, {"mf3_b1", STREAMED_SOUND_MISSION_MF3_B1},
|
||||
{"mf3_c", STREAMED_SOUND_MISSION_MF3_C}, {"mf4_a", STREAMED_SOUND_MISSION_MF4_A}, {"mf4_b", STREAMED_SOUND_MISSION_MF4_B},
|
||||
{"mf4_c", STREAMED_SOUND_MISSION_MF4_C}, {"a1_a", STREAMED_SOUND_MISSION_A1_A}, {"a3_a", STREAMED_SOUND_MISSION_A3_A},
|
||||
{"a5_a", STREAMED_SOUND_MISSION_A5_A}, {"a4_a", STREAMED_SOUND_MISSION_A4_A}, {"a4_b", STREAMED_SOUND_MISSION_A4_B},
|
||||
{"a4_c", STREAMED_SOUND_MISSION_A4_C}, {"a4_d", STREAMED_SOUND_MISSION_A4_D}, {"k1_a", STREAMED_SOUND_MISSION_K1_A},
|
||||
{"k3_a", STREAMED_SOUND_MISSION_K3_A}, {"r1_a", STREAMED_SOUND_MISSION_R1_A}, {"r2_a", STREAMED_SOUND_MISSION_R2_A},
|
||||
{"r2_b", STREAMED_SOUND_MISSION_R2_B}, {"r2_c", STREAMED_SOUND_MISSION_R2_C}, {"r2_d", STREAMED_SOUND_MISSION_R2_D},
|
||||
{"r2_e", STREAMED_SOUND_MISSION_R2_E}, {"r2_f", STREAMED_SOUND_MISSION_R2_F}, {"r2_g", STREAMED_SOUND_MISSION_R2_G},
|
||||
{"r2_h", STREAMED_SOUND_MISSION_R2_H}, {"r5_a", STREAMED_SOUND_MISSION_R5_A}, {"r6_a", STREAMED_SOUND_MISSION_R6_A},
|
||||
{"r6_a1", STREAMED_SOUND_MISSION_R6_A1}, {"r6_b", STREAMED_SOUND_MISSION_R6_B}, {"lo2_a", STREAMED_SOUND_MISSION_LO2_A},
|
||||
{"lo6_a", STREAMED_SOUND_MISSION_LO6_A}, {"yd2_a", STREAMED_SOUND_MISSION_YD2_A}, {"yd2_b", STREAMED_SOUND_MISSION_YD2_B},
|
||||
{"yd2_c", STREAMED_SOUND_MISSION_YD2_C}, {"yd2_c1", STREAMED_SOUND_MISSION_YD2_C1}, {"yd2_d", STREAMED_SOUND_MISSION_YD2_D},
|
||||
{"yd2_e", STREAMED_SOUND_MISSION_YD2_E}, {"yd2_f", STREAMED_SOUND_MISSION_YD2_F}, {"yd2_g", STREAMED_SOUND_MISSION_YD2_G},
|
||||
{"yd2_h", STREAMED_SOUND_MISSION_YD2_H}, {"yd2_ass", STREAMED_SOUND_MISSION_YD2_ASS}, {"yd2_ok", STREAMED_SOUND_MISSION_YD2_OK},
|
||||
{"h5_a", STREAMED_SOUND_MISSION_H5_A}, {"h5_b", STREAMED_SOUND_MISSION_H5_B}, {"h5_c", STREAMED_SOUND_MISSION_H5_C},
|
||||
{"ammu_a", STREAMED_SOUND_MISSION_AMMU_A}, {"ammu_b", STREAMED_SOUND_MISSION_AMMU_B}, {"ammu_c", STREAMED_SOUND_MISSION_AMMU_C},
|
||||
{"door_1", STREAMED_SOUND_MISSION_DOOR_1}, {"door_2", STREAMED_SOUND_MISSION_DOOR_2}, {"door_3", STREAMED_SOUND_MISSION_DOOR_3},
|
||||
{"door_4", STREAMED_SOUND_MISSION_DOOR_4}, {"door_5", STREAMED_SOUND_MISSION_DOOR_5}, {"door_6", STREAMED_SOUND_MISSION_DOOR_6},
|
||||
{"t3_a", STREAMED_SOUND_MISSION_T3_A}, {"t3_b", STREAMED_SOUND_MISSION_T3_B}, {"t3_c", STREAMED_SOUND_MISSION_T3_C},
|
||||
{"k1_b", STREAMED_SOUND_MISSION_K1_B}, {"c_1", STREAMED_SOUND_MISSION_CAT1}, {nil, 0}};
|
||||
{"lib_a1", SFX_MISSION_LIB_A1}, {"lib_a2", SFX_MISSION_LIB_A2}, {"lib_a", SFX_MISSION_LIB_A},
|
||||
{"lib_b", SFX_MISSION_LIB_B}, {"lib_c", SFX_MISSION_LIB_C}, {"lib_d", SFX_MISSION_LIB_D},
|
||||
{"l2_a", SFX_MISSION_L2_A}, {"j4t_1", SFX_MISSION_J4T_1}, {"j4t_2", SFX_MISSION_J4T_2},
|
||||
{"j4t_3", SFX_MISSION_J4T_3}, {"j4t_4", SFX_MISSION_J4T_4}, {"j4_a", SFX_MISSION_J4_A},
|
||||
{"j4_b", SFX_MISSION_J4_B}, {"j4_c", SFX_MISSION_J4_C}, {"j4_d", SFX_MISSION_J4_D},
|
||||
{"j4_e", SFX_MISSION_J4_E}, {"j4_f", SFX_MISSION_J4_F}, {"j6_1", SFX_MISSION_J6_1},
|
||||
{"j6_a", SFX_MISSION_J6_A}, {"j6_b", SFX_MISSION_J6_B}, {"j6_c", SFX_MISSION_J6_C},
|
||||
{"j6_d", SFX_MISSION_J6_D}, {"t4_a", SFX_MISSION_T4_A}, {"s1_a", SFX_MISSION_S1_A},
|
||||
{"s1_a1", SFX_MISSION_S1_A1}, {"s1_b", SFX_MISSION_S1_B}, {"s1_c", SFX_MISSION_S1_C},
|
||||
{"s1_c1", SFX_MISSION_S1_C1}, {"s1_d", SFX_MISSION_S1_D}, {"s1_e", SFX_MISSION_S1_E},
|
||||
{"s1_f", SFX_MISSION_S1_F}, {"s1_g", SFX_MISSION_S1_G}, {"s1_h", SFX_MISSION_S1_H},
|
||||
{"s1_i", SFX_MISSION_S1_I}, {"s1_j", SFX_MISSION_S1_J}, {"s1_k", SFX_MISSION_S1_K},
|
||||
{"s1_l", SFX_MISSION_S1_L}, {"s3_a", SFX_MISSION_S3_A}, {"s3_b", SFX_MISSION_S3_B},
|
||||
{"el3_a", SFX_MISSION_EL3_A}, {"mf1_a", SFX_MISSION_MF1_A}, {"mf2_a", SFX_MISSION_MF2_A},
|
||||
{"mf3_a", SFX_MISSION_MF3_A}, {"mf3_b", SFX_MISSION_MF3_B}, {"mf3_b1", SFX_MISSION_MF3_B1},
|
||||
{"mf3_c", SFX_MISSION_MF3_C}, {"mf4_a", SFX_MISSION_MF4_A}, {"mf4_b", SFX_MISSION_MF4_B},
|
||||
{"mf4_c", SFX_MISSION_MF4_C}, {"a1_a", SFX_MISSION_A1_A}, {"a3_a", SFX_MISSION_A3_A},
|
||||
{"a5_a", SFX_MISSION_A5_A}, {"a4_a", SFX_MISSION_A4_A}, {"a4_b", SFX_MISSION_A4_B},
|
||||
{"a4_c", SFX_MISSION_A4_C}, {"a4_d", SFX_MISSION_A4_D}, {"k1_a", SFX_MISSION_K1_A},
|
||||
{"k3_a", SFX_MISSION_K3_A}, {"r1_a", SFX_MISSION_R1_A}, {"r2_a", SFX_MISSION_R2_A},
|
||||
{"r2_b", SFX_MISSION_R2_B}, {"r2_c", SFX_MISSION_R2_C}, {"r2_d", SFX_MISSION_R2_D},
|
||||
{"r2_e", SFX_MISSION_R2_E}, {"r2_f", SFX_MISSION_R2_F}, {"r2_g", SFX_MISSION_R2_G},
|
||||
{"r2_h", SFX_MISSION_R2_H}, {"r5_a", SFX_MISSION_R5_A}, {"r6_a", SFX_MISSION_R6_A},
|
||||
{"r6_a1", SFX_MISSION_R6_A1}, {"r6_b", SFX_MISSION_R6_B}, {"lo2_a", SFX_MISSION_LO2_A},
|
||||
{"lo6_a", SFX_MISSION_LO6_A}, {"yd2_a", SFX_MISSION_YD2_A}, {"yd2_b", SFX_MISSION_YD2_B},
|
||||
{"yd2_c", SFX_MISSION_YD2_C}, {"yd2_c1", SFX_MISSION_YD2_C1}, {"yd2_d", SFX_MISSION_YD2_D},
|
||||
{"yd2_e", SFX_MISSION_YD2_E}, {"yd2_f", SFX_MISSION_YD2_F}, {"yd2_g", SFX_MISSION_YD2_G},
|
||||
{"yd2_h", SFX_MISSION_YD2_H}, {"yd2_ass", SFX_MISSION_YD2_ASS}, {"yd2_ok", SFX_MISSION_YD2_OK},
|
||||
{"h5_a", SFX_MISSION_H5_A}, {"h5_b", SFX_MISSION_H5_B}, {"h5_c", SFX_MISSION_H5_C},
|
||||
{"ammu_a", SFX_MISSION_AMMU_A}, {"ammu_b", SFX_MISSION_AMMU_B}, {"ammu_c", SFX_MISSION_AMMU_C},
|
||||
#if GTA_VERSION < GTA3_PC_10
|
||||
{"ammu_d", SFX_AMMU_D }, {"ammu_e", SFX_AMMU_E}, {"ammu_f", SFX_AMMU_F},
|
||||
{"ammu_g", SFX_MISSION_AMMU_A}, {"ammu_h", SFX_MISSION_AMMU_A}, {"ammu_i", SFX_MISSION_AMMU_A},
|
||||
{"ammu_j", SFX_MISSION_AMMU_A}, {"ammu_k", SFX_MISSION_AMMU_A},
|
||||
#endif
|
||||
{"door_1", SFX_MISSION_DOOR_1}, {"door_2", SFX_MISSION_DOOR_2}, {"door_3", SFX_MISSION_DOOR_3},
|
||||
{"door_4", SFX_MISSION_DOOR_4}, {"door_5", SFX_MISSION_DOOR_5}, {"door_6", SFX_MISSION_DOOR_6},
|
||||
{"t3_a", SFX_MISSION_T3_A}, {"t3_b", SFX_MISSION_T3_B}, {"t3_c", SFX_MISSION_T3_C},
|
||||
{"k1_b", SFX_MISSION_K1_B}, {"c_1", SFX_MISSION_CAT1}, {nil, 0}};
|
||||
|
||||
uint32
|
||||
FindMissionAudioSfx(const char *name)
|
||||
|
@ -8694,18 +8709,18 @@ bool8
|
|||
cAudioManager::MissionScriptAudioUsesPoliceChannel(uint32 soundMission)
|
||||
{
|
||||
switch (soundMission) {
|
||||
case STREAMED_SOUND_MISSION_J6_D:
|
||||
case STREAMED_SOUND_MISSION_T4_A:
|
||||
case STREAMED_SOUND_MISSION_S1_H:
|
||||
case STREAMED_SOUND_MISSION_S3_B:
|
||||
case STREAMED_SOUND_MISSION_EL3_A:
|
||||
case STREAMED_SOUND_MISSION_A3_A:
|
||||
case STREAMED_SOUND_MISSION_A5_A:
|
||||
case STREAMED_SOUND_MISSION_K1_A:
|
||||
case STREAMED_SOUND_MISSION_R1_A:
|
||||
case STREAMED_SOUND_MISSION_R5_A:
|
||||
case STREAMED_SOUND_MISSION_LO2_A:
|
||||
case STREAMED_SOUND_MISSION_LO6_A:
|
||||
case SFX_MISSION_J6_D:
|
||||
case SFX_MISSION_T4_A:
|
||||
case SFX_MISSION_S1_H:
|
||||
case SFX_MISSION_S3_B:
|
||||
case SFX_MISSION_EL3_A:
|
||||
case SFX_MISSION_A3_A:
|
||||
case SFX_MISSION_A5_A:
|
||||
case SFX_MISSION_K1_A:
|
||||
case SFX_MISSION_R1_A:
|
||||
case SFX_MISSION_R5_A:
|
||||
case SFX_MISSION_LO2_A:
|
||||
case SFX_MISSION_LO6_A:
|
||||
return TRUE;
|
||||
default:
|
||||
return FALSE;
|
||||
|
@ -8798,27 +8813,48 @@ cAudioManager::ProcessMissionAudio()
|
|||
if (m_bIsInitialised && m_nMissionAudioSampleIndex != NO_SAMPLE) {
|
||||
switch (m_nMissionAudioLoadingStatus) {
|
||||
case LOADING_STATUS_NOT_LOADED:
|
||||
#ifdef GTA_PS2
|
||||
SampleManager.LoadPedComment(m_nMissionAudioSampleIndex);
|
||||
m_nMissionAudioLoadingStatus = LOADING_STATUS_LOADING;
|
||||
#else
|
||||
SampleManager.PreloadStreamedFile(m_nMissionAudioSampleIndex, 1);
|
||||
m_nMissionAudioLoadingStatus = LOADING_STATUS_LOADED;
|
||||
#endif
|
||||
nFramesUntilFailedLoad = 0;
|
||||
break;
|
||||
case LOADING_STATUS_FAILED:
|
||||
case LOADING_STATUS_LOADING:
|
||||
#ifdef GTA_PS2
|
||||
if (SampleManager.IsPedCommentLoaded(m_nMissionAudioSampleIndex) == TRUE)
|
||||
m_nMissionAudioLoadingStatus = LOADING_STATUS_LOADED;
|
||||
// fallthrough
|
||||
else
|
||||
#endif
|
||||
if (++nFramesUntilFailedLoad >= 90) {
|
||||
nFramesForPretendPlaying = 0;
|
||||
g_bMissionAudioLoadFailed = TRUE;
|
||||
nFramesUntilFailedLoad = 0;
|
||||
m_nMissionAudioLoadingStatus = LOADING_STATUS_LOADED;
|
||||
return;
|
||||
}
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
#ifdef GTA_PS2
|
||||
else {
|
||||
// try loading again
|
||||
SampleManager.LoadPedComment(m_nMissionAudioSampleIndex);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
case LOADING_STATUS_LOADED:
|
||||
if (!m_bIsMissionAudioAllowedToPlay)
|
||||
break;
|
||||
if (g_bMissionAudioLoadFailed) {
|
||||
if (m_bTimerJustReset) {
|
||||
ClearMissionAudio();
|
||||
#ifdef GTA_PS2
|
||||
SampleManager.StopChannel(CHANNEL_POLICE_RADIO); // why?
|
||||
SampleManager.StopChannel(CHANNEL_MISSION_AUDIO);
|
||||
#else
|
||||
SampleManager.StopStreamedFile(1);
|
||||
#endif
|
||||
nFramesForPretendPlaying = 0;
|
||||
nCheckPlayingDelay = 0;
|
||||
nFramesUntilFailedLoad = 0;
|
||||
|
@ -8836,10 +8872,24 @@ cAudioManager::ProcessMissionAudio()
|
|||
if (MissionScriptAudioUsesPoliceChannel(m_nMissionAudioSampleIndex))
|
||||
SetMissionScriptPoliceAudio(m_nMissionAudioSampleIndex);
|
||||
else {
|
||||
#ifdef GTA_PS2
|
||||
SampleManager.InitialiseChannel(CHANNEL_MISSION_AUDIO, m_nMissionAudioSampleIndex, SFX_BANK_PED_COMMENTS);
|
||||
if (m_bIsPaused)
|
||||
SampleManager.SetChannelFrequency(CHANNEL_MISSION_AUDIO, 0);
|
||||
else
|
||||
SampleManager.SetChannelFrequency(CHANNEL_MISSION_AUDIO, SampleManager.GetSampleBaseFrequency(m_nMissionAudioSampleIndex));
|
||||
#else
|
||||
if (m_bIsPaused)
|
||||
SampleManager.PauseStream(TRUE, 1);
|
||||
#endif
|
||||
if (m_bIsMissionAudio2D) {
|
||||
#ifdef GTA_PS2
|
||||
SampleManager.SetChannelVolume(CHANNEL_MISSION_AUDIO, MISSION_AUDIO_VOLUME);
|
||||
SampleManager.SetChannelPan(CHANNEL_MISSION_AUDIO, 63);
|
||||
SampleManager.SetChannelReverbFlag(CHANNEL_MISSION_AUDIO, FALSE);
|
||||
#else
|
||||
SampleManager.SetStreamedVolumeAndPan(MISSION_AUDIO_VOLUME, 63, TRUE, 1);
|
||||
#endif
|
||||
} else {
|
||||
distSquared = GetDistanceSquared(m_vecMissionAudioPosition);
|
||||
if (distSquared < SQR(MISSION_AUDIO_MAX_DIST)) {
|
||||
|
@ -8851,9 +8901,19 @@ cAudioManager::ProcessMissionAudio()
|
|||
Vol = 0;
|
||||
pan = 63;
|
||||
}
|
||||
#ifdef GTA_PS2
|
||||
SampleManager.SetChannelVolume(CHANNEL_MISSION_AUDIO, Vol);
|
||||
SampleManager.SetChannelPan(CHANNEL_MISSION_AUDIO, pan);
|
||||
SampleManager.SetChannelReverbFlag(CHANNEL_MISSION_AUDIO, TRUE);
|
||||
#else
|
||||
SampleManager.SetStreamedVolumeAndPan(Vol, pan, TRUE, 1);
|
||||
#endif
|
||||
}
|
||||
#ifdef GTA_PS2
|
||||
SampleManager.StartChannel(CHANNEL_MISSION_AUDIO);
|
||||
#else
|
||||
SampleManager.StartPreloadedStreamedFile(1);
|
||||
#endif
|
||||
}
|
||||
m_nMissionAudioPlayStatus = PLAY_STATUS_PLAYING;
|
||||
nCheckPlayingDelay = 30;
|
||||
|
@ -8861,7 +8921,12 @@ cAudioManager::ProcessMissionAudio()
|
|||
case PLAY_STATUS_PLAYING:
|
||||
if (m_bTimerJustReset) {
|
||||
ClearMissionAudio();
|
||||
#ifdef GTA_PS2
|
||||
SampleManager.StopChannel(CHANNEL_POLICE_RADIO); // why?
|
||||
SampleManager.StopChannel(CHANNEL_MISSION_AUDIO);
|
||||
#else
|
||||
SampleManager.StopStreamedFile(1);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
if (MissionScriptAudioUsesPoliceChannel(m_nMissionAudioSampleIndex)) {
|
||||
|
@ -8871,27 +8936,50 @@ cAudioManager::ProcessMissionAudio()
|
|||
} else if (GetMissionScriptPoliceAudioPlayingStatus() == PLAY_STATUS_FINISHED || m_nMissionAudioFramesToPlay-- == 0) {
|
||||
m_nMissionAudioPlayStatus = PLAY_STATUS_FINISHED;
|
||||
m_nMissionAudioSampleIndex = NO_SAMPLE;
|
||||
#ifdef GTA_PS2
|
||||
SampleManager.StopChannel(CHANNEL_POLICE_RADIO);
|
||||
#else
|
||||
SampleManager.StopStreamedFile(1);
|
||||
#endif
|
||||
m_nMissionAudioFramesToPlay = 0;
|
||||
}
|
||||
}
|
||||
} else if (m_bIsMissionAudioPlaying) {
|
||||
#ifdef GTA_PS2
|
||||
if (!SampleManager.GetChannelUsedFlag(CHANNEL_MISSION_AUDIO) && !m_bIsPaused && !m_bWasPaused) {
|
||||
#else
|
||||
if (!SampleManager.IsStreamPlaying(1) && !m_bIsPaused && !m_bWasPaused) {
|
||||
#endif
|
||||
m_nMissionAudioPlayStatus = PLAY_STATUS_FINISHED;
|
||||
m_nMissionAudioSampleIndex = NO_SAMPLE;
|
||||
#ifdef GTA_PS2
|
||||
SampleManager.StopChannel(CHANNEL_MISSION_AUDIO);
|
||||
#else
|
||||
SampleManager.StopStreamedFile(1);
|
||||
#endif
|
||||
m_nMissionAudioFramesToPlay = 0;
|
||||
} else {
|
||||
#ifdef GTA_PS2
|
||||
if (m_bIsPaused)
|
||||
SampleManager.SetChannelFrequency(CHANNEL_MISSION_AUDIO, 0);
|
||||
else
|
||||
SampleManager.SetChannelFrequency(CHANNEL_MISSION_AUDIO, SampleManager.GetSampleBaseFrequency(m_nMissionAudioSampleIndex));
|
||||
#else
|
||||
if (m_bIsPaused)
|
||||
SampleManager.PauseStream(TRUE, 1);
|
||||
else
|
||||
SampleManager.PauseStream(FALSE, 1);
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
if (m_bIsPaused)
|
||||
break;
|
||||
if (nCheckPlayingDelay-- > 0) {
|
||||
#ifdef GTA_PS2
|
||||
if (!SampleManager.GetChannelUsedFlag(CHANNEL_MISSION_AUDIO))
|
||||
#else
|
||||
if (!SampleManager.IsStreamPlaying(1))
|
||||
#endif
|
||||
break;
|
||||
nCheckPlayingDelay = 0;
|
||||
}
|
||||
|
@ -8902,6 +8990,8 @@ cAudioManager::ProcessMissionAudio()
|
|||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -204,7 +204,7 @@ enum {
|
|||
};
|
||||
|
||||
enum PLAY_STATUS { PLAY_STATUS_STOPPED = 0, PLAY_STATUS_PLAYING, PLAY_STATUS_FINISHED };
|
||||
enum LOADING_STATUS { LOADING_STATUS_NOT_LOADED = 0, LOADING_STATUS_LOADED, LOADING_STATUS_FAILED };
|
||||
enum LOADING_STATUS { LOADING_STATUS_NOT_LOADED = 0, LOADING_STATUS_LOADED, LOADING_STATUS_LOADING };
|
||||
|
||||
class cAudioManager
|
||||
{
|
||||
|
|
|
@ -564,8 +564,9 @@ enum eSfxSample
|
|||
// bank 59
|
||||
SFX_EXPLOSION_1,
|
||||
SFX_BRIDGE_OPEN_WARNING,
|
||||
|
||||
#ifndef GTA_PS2
|
||||
SFX_PAGER, // used to be ped comment on PS2
|
||||
#endif
|
||||
|
||||
SFX_COP_VOICE_1_ARREST_1,
|
||||
SFX_COP_VOICE_1_ARREST_2,
|
||||
|
@ -703,6 +704,9 @@ enum eSfxSample
|
|||
SFX_POLICE_HELI_27,
|
||||
SFX_POLICE_HELI_28,
|
||||
SFX_POLICE_HELI_29,
|
||||
#ifdef GTA_PS2
|
||||
SFX_MISSION_CAT1,
|
||||
#endif
|
||||
SFX_CHUNKY_DEATH,
|
||||
SFX_BLACK_DOCKER_VOICE_1_DRIVER_ABUSE_1,
|
||||
SFX_BLACK_DOCKER_VOICE_1_DRIVER_ABUSE_2,
|
||||
|
@ -761,6 +765,9 @@ enum eSfxSample
|
|||
SFX_ARMY_VOICE_2_CHASE_13,
|
||||
SFX_ARMY_VOICE_2_CHASE_14,
|
||||
SFX_ARMY_VOICE_2_CHASE_15,
|
||||
#ifdef GTA_PS2
|
||||
SFX_PAGER,
|
||||
#endif
|
||||
SFX_CLAUDE_LOW_DAMAGE_GRUNT_1,
|
||||
SFX_CLAUDE_LOW_DAMAGE_GRUNT_2,
|
||||
SFX_CLAUDE_LOW_DAMAGE_GRUNT_3,
|
||||
|
@ -3140,14 +3147,127 @@ enum eSfxSample
|
|||
SFX_AMMU_D,
|
||||
SFX_AMMU_E,
|
||||
SFX_AMMU_F,
|
||||
|
||||
#ifdef GTA_PS2
|
||||
SFX_MISSION_LIB_A1,
|
||||
SFX_MISSION_LIB_A2,
|
||||
SFX_MISSION_LIB_A,
|
||||
SFX_MISSION_LIB_B,
|
||||
SFX_MISSION_LIB_C,
|
||||
SFX_MISSION_LIB_D,
|
||||
SFX_MISSION_L2_A,
|
||||
SFX_MISSION_J4T_1,
|
||||
SFX_MISSION_J4T_2,
|
||||
SFX_MISSION_J4T_3,
|
||||
SFX_MISSION_J4T_4,
|
||||
SFX_MISSION_J4_A,
|
||||
SFX_MISSION_J4_B,
|
||||
SFX_MISSION_J4_C,
|
||||
SFX_MISSION_J4_D,
|
||||
SFX_MISSION_J4_E,
|
||||
SFX_MISSION_J4_F,
|
||||
SFX_MISSION_J6_1,
|
||||
SFX_MISSION_J6_A,
|
||||
SFX_MISSION_J6_B,
|
||||
SFX_MISSION_J6_C,
|
||||
SFX_MISSION_J6_D,
|
||||
SFX_MISSION_T4_A,
|
||||
SFX_MISSION_S1_A,
|
||||
SFX_MISSION_S1_A1,
|
||||
SFX_MISSION_S1_B,
|
||||
SFX_MISSION_S1_C,
|
||||
SFX_MISSION_S1_C1,
|
||||
SFX_MISSION_S1_D,
|
||||
SFX_MISSION_S1_E,
|
||||
SFX_MISSION_S1_F,
|
||||
SFX_MISSION_S1_G,
|
||||
SFX_MISSION_S1_H,
|
||||
SFX_MISSION_S1_I,
|
||||
SFX_MISSION_S1_J,
|
||||
SFX_MISSION_S1_K,
|
||||
SFX_MISSION_S1_L,
|
||||
SFX_MISSION_S3_A,
|
||||
SFX_MISSION_S3_B,
|
||||
SFX_MISSION_EL3_A,
|
||||
SFX_MISSION_MF1_A,
|
||||
SFX_MISSION_MF2_A,
|
||||
SFX_MISSION_MF3_A,
|
||||
SFX_MISSION_MF3_B,
|
||||
SFX_MISSION_MF3_B1,
|
||||
SFX_MISSION_MF3_C,
|
||||
SFX_MISSION_MF4_A,
|
||||
SFX_MISSION_MF4_B,
|
||||
SFX_MISSION_MF4_C,
|
||||
SFX_MISSION_A1_A,
|
||||
SFX_MISSION_A3_A,
|
||||
SFX_MISSION_A5_A,
|
||||
SFX_MISSION_A4_A,
|
||||
SFX_MISSION_A4_B,
|
||||
SFX_MISSION_A4_C,
|
||||
SFX_MISSION_A4_D,
|
||||
SFX_MISSION_K1_A,
|
||||
SFX_MISSION_K3_A,
|
||||
SFX_MISSION_R1_A,
|
||||
SFX_MISSION_R2_A,
|
||||
SFX_MISSION_R2_B,
|
||||
SFX_MISSION_R2_C,
|
||||
SFX_MISSION_R2_D,
|
||||
SFX_MISSION_R2_E,
|
||||
SFX_MISSION_R2_F,
|
||||
SFX_MISSION_R2_G,
|
||||
SFX_MISSION_R2_H,
|
||||
SFX_MISSION_R5_A,
|
||||
SFX_MISSION_R6_A,
|
||||
SFX_MISSION_R6_A1,
|
||||
SFX_MISSION_R6_B,
|
||||
SFX_MISSION_LO2_A,
|
||||
SFX_MISSION_LO6_A,
|
||||
SFX_MISSION_YD2_A,
|
||||
SFX_MISSION_YD2_B,
|
||||
SFX_MISSION_YD2_C,
|
||||
SFX_MISSION_YD2_C1,
|
||||
SFX_MISSION_YD2_D,
|
||||
SFX_MISSION_YD2_E,
|
||||
SFX_MISSION_YD2_F,
|
||||
SFX_MISSION_YD2_G,
|
||||
SFX_MISSION_YD2_H,
|
||||
SFX_MISSION_YD2_ASS,
|
||||
SFX_MISSION_YD2_OK,
|
||||
SFX_MISSION_H5_A,
|
||||
SFX_MISSION_H5_B,
|
||||
SFX_MISSION_H5_C,
|
||||
SFX_MISSION_DOOR_1,
|
||||
SFX_MISSION_DOOR_2,
|
||||
SFX_MISSION_DOOR_3,
|
||||
SFX_MISSION_DOOR_4,
|
||||
SFX_MISSION_DOOR_5,
|
||||
SFX_MISSION_DOOR_6,
|
||||
SFX_MISSION_T3_A,
|
||||
SFX_MISSION_T3_B,
|
||||
SFX_MISSION_T3_C,
|
||||
SFX_MISSION_K1_B,
|
||||
SFX_MISSION_AMMU_A,
|
||||
SFX_MISSION_AMMU_B,
|
||||
SFX_MISSION_AMMU_C,
|
||||
#endif
|
||||
TOTAL_AUDIO_SAMPLES,
|
||||
NO_SAMPLE,
|
||||
|
||||
// shorthands
|
||||
SAMPLEBANK_START = SFX_CAR_HORN_JEEP,
|
||||
#ifdef GTA_PS2
|
||||
SAMPLEBANK_END = SFX_INFO,
|
||||
SAMPLEBANK_MAX = SFX_INFO + 1,
|
||||
#else
|
||||
SAMPLEBANK_END = SFX_PAGER,
|
||||
SAMPLEBANK_MAX = SFX_PAGER + 1,
|
||||
#endif
|
||||
SAMPLEBANK_PED_START = SFX_COP_VOICE_1_ARREST_1,
|
||||
#ifdef GTA_PS2
|
||||
SAMPLEBANK_PED_END = SFX_MISSION_AMMU_C,
|
||||
SAMPLEBANK_PED_MAX = SFX_MISSION_AMMU_C + 1,
|
||||
#else
|
||||
SAMPLEBANK_PED_END = SFX_AMMU_F,
|
||||
SAMPLEBANK_PED_MAX = SFX_AMMU_F + 1,
|
||||
#endif
|
||||
};
|
||||
|
|
|
@ -123,107 +123,109 @@ enum eStreamedSounds
|
|||
STREAMED_SOUND_CUTSCENE_MARTY_PH4,
|
||||
STREAMED_SOUND_MISSION_COMPLETED,
|
||||
STREAMED_SOUND_GAME_COMPLETED,
|
||||
STREAMED_SOUND_MISSION_LIB_A1,
|
||||
STREAMED_SOUND_MISSION_LIB_A2,
|
||||
STREAMED_SOUND_MISSION_LIB_A,
|
||||
STREAMED_SOUND_MISSION_LIB_B,
|
||||
STREAMED_SOUND_MISSION_LIB_C,
|
||||
STREAMED_SOUND_MISSION_LIB_D,
|
||||
STREAMED_SOUND_MISSION_L2_A,
|
||||
STREAMED_SOUND_MISSION_J4T_1,
|
||||
STREAMED_SOUND_MISSION_J4T_2,
|
||||
STREAMED_SOUND_MISSION_J4T_3,
|
||||
STREAMED_SOUND_MISSION_J4T_4,
|
||||
STREAMED_SOUND_MISSION_J4_A,
|
||||
STREAMED_SOUND_MISSION_J4_B,
|
||||
STREAMED_SOUND_MISSION_J4_C,
|
||||
STREAMED_SOUND_MISSION_J4_D,
|
||||
STREAMED_SOUND_MISSION_J4_E,
|
||||
STREAMED_SOUND_MISSION_J4_F,
|
||||
STREAMED_SOUND_MISSION_J6_1,
|
||||
STREAMED_SOUND_MISSION_J6_A,
|
||||
STREAMED_SOUND_MISSION_J6_B,
|
||||
STREAMED_SOUND_MISSION_J6_C,
|
||||
STREAMED_SOUND_MISSION_J6_D,
|
||||
STREAMED_SOUND_MISSION_T4_A,
|
||||
STREAMED_SOUND_MISSION_S1_A,
|
||||
STREAMED_SOUND_MISSION_S1_A1,
|
||||
STREAMED_SOUND_MISSION_S1_B,
|
||||
STREAMED_SOUND_MISSION_S1_C,
|
||||
STREAMED_SOUND_MISSION_S1_C1,
|
||||
STREAMED_SOUND_MISSION_S1_D,
|
||||
STREAMED_SOUND_MISSION_S1_E,
|
||||
STREAMED_SOUND_MISSION_S1_F,
|
||||
STREAMED_SOUND_MISSION_S1_G,
|
||||
STREAMED_SOUND_MISSION_S1_H,
|
||||
STREAMED_SOUND_MISSION_S1_I,
|
||||
STREAMED_SOUND_MISSION_S1_J,
|
||||
STREAMED_SOUND_MISSION_S1_K,
|
||||
STREAMED_SOUND_MISSION_S1_L,
|
||||
STREAMED_SOUND_MISSION_S3_A,
|
||||
STREAMED_SOUND_MISSION_S3_B,
|
||||
STREAMED_SOUND_MISSION_EL3_A,
|
||||
STREAMED_SOUND_MISSION_MF1_A,
|
||||
STREAMED_SOUND_MISSION_MF2_A,
|
||||
STREAMED_SOUND_MISSION_MF3_A,
|
||||
STREAMED_SOUND_MISSION_MF3_B,
|
||||
STREAMED_SOUND_MISSION_MF3_B1,
|
||||
STREAMED_SOUND_MISSION_MF3_C,
|
||||
STREAMED_SOUND_MISSION_MF4_A,
|
||||
STREAMED_SOUND_MISSION_MF4_B,
|
||||
STREAMED_SOUND_MISSION_MF4_C,
|
||||
STREAMED_SOUND_MISSION_A1_A,
|
||||
STREAMED_SOUND_MISSION_A3_A,
|
||||
STREAMED_SOUND_MISSION_A5_A,
|
||||
STREAMED_SOUND_MISSION_A4_A,
|
||||
STREAMED_SOUND_MISSION_A4_B,
|
||||
STREAMED_SOUND_MISSION_A4_C,
|
||||
STREAMED_SOUND_MISSION_A4_D,
|
||||
STREAMED_SOUND_MISSION_K1_A,
|
||||
STREAMED_SOUND_MISSION_K3_A,
|
||||
STREAMED_SOUND_MISSION_R1_A,
|
||||
STREAMED_SOUND_MISSION_R2_A,
|
||||
STREAMED_SOUND_MISSION_R2_B,
|
||||
STREAMED_SOUND_MISSION_R2_C,
|
||||
STREAMED_SOUND_MISSION_R2_D,
|
||||
STREAMED_SOUND_MISSION_R2_E,
|
||||
STREAMED_SOUND_MISSION_R2_F,
|
||||
STREAMED_SOUND_MISSION_R2_G,
|
||||
STREAMED_SOUND_MISSION_R2_H,
|
||||
STREAMED_SOUND_MISSION_R5_A,
|
||||
STREAMED_SOUND_MISSION_R6_A,
|
||||
STREAMED_SOUND_MISSION_R6_A1,
|
||||
STREAMED_SOUND_MISSION_R6_B,
|
||||
STREAMED_SOUND_MISSION_LO2_A,
|
||||
STREAMED_SOUND_MISSION_LO6_A,
|
||||
STREAMED_SOUND_MISSION_YD2_A,
|
||||
STREAMED_SOUND_MISSION_YD2_B,
|
||||
STREAMED_SOUND_MISSION_YD2_C,
|
||||
STREAMED_SOUND_MISSION_YD2_C1,
|
||||
STREAMED_SOUND_MISSION_YD2_D,
|
||||
STREAMED_SOUND_MISSION_YD2_E,
|
||||
STREAMED_SOUND_MISSION_YD2_F,
|
||||
STREAMED_SOUND_MISSION_YD2_G,
|
||||
STREAMED_SOUND_MISSION_YD2_H,
|
||||
STREAMED_SOUND_MISSION_YD2_ASS,
|
||||
STREAMED_SOUND_MISSION_YD2_OK,
|
||||
STREAMED_SOUND_MISSION_H5_A,
|
||||
STREAMED_SOUND_MISSION_H5_B,
|
||||
STREAMED_SOUND_MISSION_H5_C,
|
||||
STREAMED_SOUND_MISSION_AMMU_A,
|
||||
STREAMED_SOUND_MISSION_AMMU_B,
|
||||
STREAMED_SOUND_MISSION_AMMU_C,
|
||||
STREAMED_SOUND_MISSION_DOOR_1,
|
||||
STREAMED_SOUND_MISSION_DOOR_2,
|
||||
STREAMED_SOUND_MISSION_DOOR_3,
|
||||
STREAMED_SOUND_MISSION_DOOR_4,
|
||||
STREAMED_SOUND_MISSION_DOOR_5,
|
||||
STREAMED_SOUND_MISSION_DOOR_6,
|
||||
STREAMED_SOUND_MISSION_T3_A,
|
||||
STREAMED_SOUND_MISSION_T3_B,
|
||||
STREAMED_SOUND_MISSION_T3_C,
|
||||
STREAMED_SOUND_MISSION_K1_B,
|
||||
STREAMED_SOUND_MISSION_CAT1,
|
||||
#ifndef GTA_PS2
|
||||
SFX_MISSION_LIB_A1,
|
||||
SFX_MISSION_LIB_A2,
|
||||
SFX_MISSION_LIB_A,
|
||||
SFX_MISSION_LIB_B,
|
||||
SFX_MISSION_LIB_C,
|
||||
SFX_MISSION_LIB_D,
|
||||
SFX_MISSION_L2_A,
|
||||
SFX_MISSION_J4T_1,
|
||||
SFX_MISSION_J4T_2,
|
||||
SFX_MISSION_J4T_3,
|
||||
SFX_MISSION_J4T_4,
|
||||
SFX_MISSION_J4_A,
|
||||
SFX_MISSION_J4_B,
|
||||
SFX_MISSION_J4_C,
|
||||
SFX_MISSION_J4_D,
|
||||
SFX_MISSION_J4_E,
|
||||
SFX_MISSION_J4_F,
|
||||
SFX_MISSION_J6_1,
|
||||
SFX_MISSION_J6_A,
|
||||
SFX_MISSION_J6_B,
|
||||
SFX_MISSION_J6_C,
|
||||
SFX_MISSION_J6_D,
|
||||
SFX_MISSION_T4_A,
|
||||
SFX_MISSION_S1_A,
|
||||
SFX_MISSION_S1_A1,
|
||||
SFX_MISSION_S1_B,
|
||||
SFX_MISSION_S1_C,
|
||||
SFX_MISSION_S1_C1,
|
||||
SFX_MISSION_S1_D,
|
||||
SFX_MISSION_S1_E,
|
||||
SFX_MISSION_S1_F,
|
||||
SFX_MISSION_S1_G,
|
||||
SFX_MISSION_S1_H,
|
||||
SFX_MISSION_S1_I,
|
||||
SFX_MISSION_S1_J,
|
||||
SFX_MISSION_S1_K,
|
||||
SFX_MISSION_S1_L,
|
||||
SFX_MISSION_S3_A,
|
||||
SFX_MISSION_S3_B,
|
||||
SFX_MISSION_EL3_A,
|
||||
SFX_MISSION_MF1_A,
|
||||
SFX_MISSION_MF2_A,
|
||||
SFX_MISSION_MF3_A,
|
||||
SFX_MISSION_MF3_B,
|
||||
SFX_MISSION_MF3_B1,
|
||||
SFX_MISSION_MF3_C,
|
||||
SFX_MISSION_MF4_A,
|
||||
SFX_MISSION_MF4_B,
|
||||
SFX_MISSION_MF4_C,
|
||||
SFX_MISSION_A1_A,
|
||||
SFX_MISSION_A3_A,
|
||||
SFX_MISSION_A5_A,
|
||||
SFX_MISSION_A4_A,
|
||||
SFX_MISSION_A4_B,
|
||||
SFX_MISSION_A4_C,
|
||||
SFX_MISSION_A4_D,
|
||||
SFX_MISSION_K1_A,
|
||||
SFX_MISSION_K3_A,
|
||||
SFX_MISSION_R1_A,
|
||||
SFX_MISSION_R2_A,
|
||||
SFX_MISSION_R2_B,
|
||||
SFX_MISSION_R2_C,
|
||||
SFX_MISSION_R2_D,
|
||||
SFX_MISSION_R2_E,
|
||||
SFX_MISSION_R2_F,
|
||||
SFX_MISSION_R2_G,
|
||||
SFX_MISSION_R2_H,
|
||||
SFX_MISSION_R5_A,
|
||||
SFX_MISSION_R6_A,
|
||||
SFX_MISSION_R6_A1,
|
||||
SFX_MISSION_R6_B,
|
||||
SFX_MISSION_LO2_A,
|
||||
SFX_MISSION_LO6_A,
|
||||
SFX_MISSION_YD2_A,
|
||||
SFX_MISSION_YD2_B,
|
||||
SFX_MISSION_YD2_C,
|
||||
SFX_MISSION_YD2_C1,
|
||||
SFX_MISSION_YD2_D,
|
||||
SFX_MISSION_YD2_E,
|
||||
SFX_MISSION_YD2_F,
|
||||
SFX_MISSION_YD2_G,
|
||||
SFX_MISSION_YD2_H,
|
||||
SFX_MISSION_YD2_ASS,
|
||||
SFX_MISSION_YD2_OK,
|
||||
SFX_MISSION_H5_A,
|
||||
SFX_MISSION_H5_B,
|
||||
SFX_MISSION_H5_C,
|
||||
SFX_MISSION_AMMU_A,
|
||||
SFX_MISSION_AMMU_B,
|
||||
SFX_MISSION_AMMU_C,
|
||||
SFX_MISSION_DOOR_1,
|
||||
SFX_MISSION_DOOR_2,
|
||||
SFX_MISSION_DOOR_3,
|
||||
SFX_MISSION_DOOR_4,
|
||||
SFX_MISSION_DOOR_5,
|
||||
SFX_MISSION_DOOR_6,
|
||||
SFX_MISSION_T3_A,
|
||||
SFX_MISSION_T3_B,
|
||||
SFX_MISSION_T3_C,
|
||||
SFX_MISSION_K1_B,
|
||||
SFX_MISSION_CAT1,
|
||||
#endif
|
||||
TOTAL_STREAMED_SOUNDS,
|
||||
NO_TRACK,
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue