2019-10-14 13:40 EDT


View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0002637FSSCPspeechpublic2012-11-19 19:37
Reportergereedy 
Assigned ToGoober5000 
PrioritylowSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
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.
Attached Files
  • patch file icon briefspeech.patch (1,312 bytes) 2012-04-13 00:19 -
    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;
    
    patch file icon briefspeech.patch (1,312 bytes) 2012-04-13 00:19 +

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

-Notes

~0013569

iss_mneur (developer)

Last edited: 2012-05-19 23:48

View 2 revisions

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

This should wait until we have 3.6.14 out.

~0013592

Goober5000 (administrator)

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.

~0013593

Goober5000 (administrator)

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.

~0013594

Goober5000 (administrator)

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

+Related Changesets

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