mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-19 17:44:13 +02:00
Keyboard now works, exit the game doesn't crash, feedback audio no longer plays the wrong audio.
This commit is contained in:
+26
-2
@@ -303,9 +303,10 @@ void AudMix_Init(void) {
|
||||
void PlayAudio(AudioBuffer_t& buffer, bool speech) {
|
||||
// Only one speech sound can play at once.
|
||||
if (speech) {
|
||||
if (AudMix_IsSourcePlaying(SPEECH_AUDIO_SOURCE))
|
||||
return;
|
||||
//if (AudMix_IsSourcePlaying(SPEECH_AUDIO_SOURCE))
|
||||
// return;
|
||||
|
||||
alSourceStop(audio_sources[SPEECH_AUDIO_SOURCE]);
|
||||
alSourcei(audio_sources[SPEECH_AUDIO_SOURCE], AL_BUFFER, buffer.buffer);
|
||||
alSourcePlay(audio_sources[SPEECH_AUDIO_SOURCE]);
|
||||
return;
|
||||
@@ -360,3 +361,26 @@ void On_Speech(int speech_index, HouseClass* house)
|
||||
// DLLExportClass::On_Speech(house, speech_index);
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************************************
|
||||
* Is_Speaking -- Checks to see if the eva voice is still playing. *
|
||||
* *
|
||||
* Call this routine when the EVA voice being played needs to be checked. A typical use *
|
||||
* of this would be when some action needs to be delayed until the voice has finished -- *
|
||||
* say the end of the game. *
|
||||
* *
|
||||
* INPUT: none *
|
||||
* *
|
||||
* OUTPUT: bool; Is the EVA voice still playing? *
|
||||
* *
|
||||
* WARNINGS: none *
|
||||
* *
|
||||
* HISTORY: *
|
||||
* 03/12/1995 JLB : Created. *
|
||||
*=============================================================================================*/
|
||||
bool Is_Speaking(void)
|
||||
{
|
||||
Speak_AI();
|
||||
return AudMix_IsSourcePlaying(SPEECH_AUDIO_SOURCE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user