Fix alien comm flickers when using number speech and other spliced pieces

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3615 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
avolkov
2011-05-17 18:58:06 +00:00
parent 6f75c5c1f1
commit 36fb4559e5
+3 -5
View File
@@ -393,6 +393,7 @@ SpliceMultiTrack (UNICODE *TrackNames[], UNICODE *TrackText)
chunks_tail->next = create_SoundChunk (track_decs[tracks], sound_sample->length); chunks_tail->next = create_SoundChunk (track_decs[tracks], sound_sample->length);
chunks_tail = chunks_tail->next; chunks_tail = chunks_tail->next;
chunks_tail->track_num = track_count - 1;
sound_sample->length += track_decs[tracks]->length; sound_sample->length += track_decs[tracks]->length;
} }
else else
@@ -580,10 +581,10 @@ SpliceTrack (UNICODE *TrackName, UNICODE *TrackText, UNICODE *TimeStamp, TFB_Tra
dec_offset, time_stamps[page]); dec_offset, time_stamps[page]);
#endif #endif
sound_sample->length += decoder->length; sound_sample->length += decoder->length;
chunks_tail->track_num = track_count - 1;
if (!no_page_break) if (!no_page_break)
{ {
chunks_tail->tag_me = 1; chunks_tail->tag_me = 1;
chunks_tail->track_num = track_count - 1;
if (page < num_pages) if (page < num_pages)
{ {
chunks_tail->text = pages[page]; chunks_tail->text = pages[page];
@@ -773,12 +774,9 @@ TFB_SoundChunk *
create_SoundChunk (TFB_SoundDecoder *decoder, float start_time) create_SoundChunk (TFB_SoundDecoder *decoder, float start_time)
{ {
TFB_SoundChunk *chunk; TFB_SoundChunk *chunk;
chunk = HMalloc (sizeof (TFB_SoundChunk)); chunk = HCalloc (sizeof (*chunk));
chunk->decoder = decoder; chunk->decoder = decoder;
chunk->next = NULL;
chunk->start_time = start_time; chunk->start_time = start_time;
chunk->tag_me = 0;
chunk->text = 0;
return chunk; return chunk;
} }