View Issue Details

IDProjectCategoryView StatusLast Update
0002637FSSCPspeechpublic2012-11-20 00:37
Reportergereedy Assigned ToGoober5000  
PrioritylowSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Target Version3.7.2Fixed in Version3.7.2 
Summary0002637: Briefing advances before synthesized speech finishes
DescriptionIf synthesized speech is enabled briefing screens can advanced before the speech is finished. The attached patch corrects the issue.
TagsNo tags attached.

Relationships

related to 0001199 closedGoober5000 Problem with briefing speech in Rebel's bluff 

Activities

gereedy

2012-04-13 04:19

reporter  

briefspeech.patch (1,312 bytes)   
Index: code/missionui/missioncmdbrief.cpp
===================================================================
--- code/missionui/missioncmdbrief.cpp	(revision 8666)
+++ code/missionui/missioncmdbrief.cpp	(working copy)
@@ -226,6 +226,17 @@
 
 	if (Voice_ended_time && (timer_get_milliseconds() - Voice_ended_time >= 1000))
 		return 1;
+    
+    if (Voice_started_time && (Cmd_brief_last_voice < 0)) {
+        /* we are playing synthesized voice */
+        if ((timer_get_milliseconds() - Voice_started_time < 1000) || fsspeech_playing()) {
+            return 0;
+        }
+        
+        if (!Voice_ended_time) {
+            Voice_ended_time = timer_get_milliseconds();
+        }
+    }
 
 	if (Briefing_voice_enabled && (Cmd_brief_last_voice >= 0)) {
 		if (audiostream_is_playing(Cmd_brief_last_voice)){
@@ -325,6 +336,13 @@
 	// If the briefing has no wave to play use simulated speach
 	if(Cur_cmd_brief->stage[stage].wave <= 0) {
 		fsspeech_play(FSSPEECH_FROM_BRIEFING, Cur_cmd_brief->stage[stage].text.c_str());
+        if (fsspeech_play_from(FSSPEECH_FROM_BRIEFING)) {
+            Voice_started_time = timer_get_milliseconds();
+            Voice_ended_time = 0;
+        } else {
+            Voice_started_time = 0;
+            Voice_ended_time = 0;
+        }
 	}
 
 	Cur_stage = stage;
briefspeech.patch (1,312 bytes)   

iss_mneur

2012-05-20 03:46

developer   ~0013569

Last edited: 2012-05-20 03:48

Damn, should really use the right browser tab....

This should wait until we have 3.6.14 out.

Goober5000

2012-05-21 08:05

administrator   ~0013592

That patch doesn't really fix the issue; there are several other things that need to be handled in parallel. Also, you only changed the command briefing code, whereas the regular briefing code needed to be changed as well. But your patch did inspire me to fix the bug, so there's that. :)

Fixed in revision 8811.

Goober5000

2012-05-21 08:06

administrator   ~0013593

Addendum: this fix probably won't be applied to 3.6.14. This is because there are some differences in the briefing between 3.6.14 and trunk, namely a conversion to SCP_string.

Goober5000

2012-05-21 08:23

administrator   ~0013594

Marking as resolved, derp. It has already been tested with both voiced and text-to-speech command briefings and briefings.

Related Changesets

fs2open: trunk r8811

2012-05-21 04:05

Goober5000


Ported: N/A

Details Diff
time the briefing stages appropriately for text-to-speech (Mantis 0002637)
also, make the briefing speech timing, which is badly written, a little bit more like the command briefing, which is a bit better written
Affected Issues
0002637
mod - /trunk/fs2_open/code/missionui/redalert.cpp Diff File
mod - /trunk/fs2_open/code/missionui/missioncmdbrief.cpp Diff File
mod - /trunk/fs2_open/code/missionui/missionbrief.cpp Diff File
mod - /trunk/fs2_open/code/mission/missionbriefcommon.h Diff File
mod - /trunk/fs2_open/code/mission/missionbriefcommon.cpp Diff File

Issue History

Date Modified Username Field Change
2012-04-13 04:19 gereedy New Issue
2012-04-13 04:19 gereedy File Added: briefspeech.patch
2012-05-20 03:45 iss_mneur Priority normal => low
2012-05-20 03:45 iss_mneur Status new => code review
2012-05-20 03:45 iss_mneur Target Version => 3.7.2
2012-05-20 03:45 iss_mneur Description Updated
2012-05-20 03:46 iss_mneur Note Added: 0013569
2012-05-20 03:46 iss_mneur Description Updated
2012-05-20 03:48 iss_mneur Note Edited: 0013569
2012-05-21 08:03 Goober5000 Changeset attached => fs2open trunk r8811
2012-05-21 08:05 Goober5000 Note Added: 0013592
2012-05-21 08:05 Goober5000 Assigned To => Goober5000
2012-05-21 08:05 Goober5000 Resolution open => fixed
2012-05-21 08:05 Goober5000 Fixed in Version => 3.7.2
2012-05-21 08:06 Goober5000 Note Added: 0013593
2012-05-21 08:23 Goober5000 Note Added: 0013594
2012-05-21 08:23 Goober5000 Status code review => resolved
2012-11-20 00:37 Goober5000 Relationship added related to 0001199