More snafu fix. Need a couple more patchups for now.

Must restore talk buffer explicitly when not taking it and promote
the buffer state.

Change-Id: Ia0341ede05837e6e94885a9ad62460c415ec6f00
This commit is contained in:
Michael Sevakis 2012-05-24 20:59:05 -04:00
parent 4b97437c23
commit 652b39b9e1
2 changed files with 2 additions and 2 deletions

View file

@ -3624,8 +3624,7 @@ unsigned char * audio_get_buffer(bool talk_buf, size_t *buffer_size)
if (buffer_state == AUDIOBUF_STATE_INITIALIZED)
buffering_reset(NULL, 0); /* mark buffer invalid */
if (talk_buf || buffer_state == AUDIOBUF_STATE_TRASHED
|| !talk_voice_required())
if (talk_buf || !talk_voice_required())
{
logf("get buffer: talk, audio");
/* Ok to use everything from audiobuf - voice is loaded,

View file

@ -627,6 +627,7 @@ static bool restore_state(void)
size_t size;
audio_restore_playback(AUDIO_WANT_VOICE);
voicebuf = audio_get_buffer(true, &size);
audio_get_buffer(false, &size);
}
return !!voicebuf;