Melnorm text should no longer overlap. Perhaps fix momentary

display of wrong subtitles too


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@667 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
ghaushe
2003-02-04 05:27:54 +00:00
parent e2ef3fffb4
commit 6f89afc7fe
2 changed files with 9 additions and 9 deletions
-1
View File
@@ -88,7 +88,6 @@ Implementation bugs (low priority):
- The lander report messages should possibly be modified to use up the entire - The lander report messages should possibly be modified to use up the entire
lander pane lander pane
- Voice-over subtitle synchrinzation issues: - Voice-over subtitle synchrinzation issues:
- alignment seems worse with sdl_mixer than openAL. Hard to tell for sure
- Many clips don't match the text/can't be synced well. A partial list: - Many clips don't match the text/can't be synced well. A partial list:
black031.ogg black041.ogg black044.ogg yehat008.ogg yehat015.ogg black031.ogg black041.ogg black044.ogg yehat008.ogg yehat015.ogg
yehat021.ogg yehat023.ogg supox002.ogg supox003.ogg supox028.ogg yehat021.ogg yehat023.ogg supox002.ogg supox003.ogg supox028.ogg
+9 -8
View File
@@ -175,8 +175,9 @@ StopTrack ()
sound_sample = NULL; sound_sample = NULL;
} }
tct = tcur = 0; tct = tcur = 0;
cur_page = 0;
no_voice = 0; no_voice = 0;
do_subtitles (0, (void *)~0, 1); do_subtitles ((void *)~0, (void *)~0, 1);
} }
void void
@@ -328,7 +329,7 @@ SpliceTrack (UNICODE *TrackName, UNICODE *TrackText, UNICODE *TimeStamp)
} }
else else
{ {
int num_pages, cur_page; int num_pages, page_counter;
uint32 time_stamps[50]; uint32 time_stamps[50];
if (no_page_break && tct) if (no_page_break && tct)
@@ -355,7 +356,7 @@ SpliceTrack (UNICODE *TrackName, UNICODE *TrackText, UNICODE *TimeStamp)
fprintf (stderr, "SpliceTrack(): loading %s\n", TrackName); fprintf (stderr, "SpliceTrack(): loading %s\n", TrackName);
startTime = 0; startTime = 0;
for (cur_page = 0; cur_page <= num_pages; cur_page++) for (page_counter = 0; page_counter <= num_pages; page_counter++)
{ {
if (! sound_sample) if (! sound_sample)
{ {
@@ -366,7 +367,7 @@ SpliceTrack (UNICODE *TrackName, UNICODE *TrackText, UNICODE *TimeStamp)
sound_sample->buffer_tag = HMalloc (sizeof (TFB_SoundTag *) * sound_sample->num_buffers); sound_sample->buffer_tag = HMalloc (sizeof (TFB_SoundTag *) * sound_sample->num_buffers);
sound_sample->buffer = HMalloc (sizeof (uint32) * sound_sample->num_buffers); sound_sample->buffer = HMalloc (sizeof (uint32) * sound_sample->num_buffers);
TFBSound_GenBuffers (sound_sample->num_buffers, sound_sample->buffer); TFBSound_GenBuffers (sound_sample->num_buffers, sound_sample->buffer);
decoder = SoundDecoder_Load (TrackName, 4096, startTime, time_stamps[cur_page]); decoder = SoundDecoder_Load (TrackName, 4096, startTime, time_stamps[page_counter]);
sound_sample->read_chain_ptr = create_soundchain (decoder, 0.0); sound_sample->read_chain_ptr = create_soundchain (decoder, 0.0);
sound_sample->decoder = decoder; sound_sample->decoder = decoder;
first_chain = last_chain = sound_sample->read_chain_ptr; first_chain = last_chain = sound_sample->read_chain_ptr;
@@ -375,13 +376,13 @@ SpliceTrack (UNICODE *TrackName, UNICODE *TrackText, UNICODE *TimeStamp)
else else
{ {
TFB_SoundDecoder *decoder; TFB_SoundDecoder *decoder;
decoder = SoundDecoder_Load (TrackName, 4096, startTime, time_stamps[cur_page]); decoder = SoundDecoder_Load (TrackName, 4096, startTime, time_stamps[page_counter]);
last_chain->next = create_soundchain (decoder, sound_sample->length); last_chain->next = create_soundchain (decoder, sound_sample->length);
last_chain = last_chain->next; last_chain = last_chain->next;
} }
startTime += time_stamps[cur_page]; startTime += time_stamps[page_counter];
// fprintf (stderr, "page (%d of %d): %d\n",cur_page, num_pages, startTime); // fprintf (stderr, "page (%d of %d): %d\n",page_counter, num_pages, startTime);
if (last_chain->decoder) if (last_chain->decoder)
{ {
//fprintf (stderr, " decoder: %s, rate %d format %x\n", //fprintf (stderr, " decoder: %s, rate %d format %x\n",
@@ -393,7 +394,7 @@ SpliceTrack (UNICODE *TrackName, UNICODE *TrackText, UNICODE *TimeStamp)
if (! no_page_break) if (! no_page_break)
{ {
last_chain->tag.type = MIX_BUFFER_TAG_TEXT; last_chain->tag.type = MIX_BUFFER_TAG_TEXT;
last_chain->tag.value = (void *)(((tct - 1) << 8) | cur_page); last_chain->tag.value = (void *)(((tct - 1) << 8) | page_counter);
} }
no_page_break = 0; no_page_break = 0;
} }