Zelda HLE: Convert some ERROR_LOG to PanicAlert.

While these are not really unrecoverable errors, while Zelda HLE is in a
testing / development phase it is useful to notice these "unexpected" cases (or
expected without known ways to reproduce) by making them as hard as possible to
ignore.
This commit is contained in:
Pierre Bourdon 2014-12-20 03:41:23 +01:00
parent 2bb3daf027
commit 63712e58fd
1 changed files with 13 additions and 6 deletions

View File

@ -86,7 +86,7 @@ void ZeldaUCode::HandleMail(u32 mail)
{
if ((mail >> 16) != 0xCDD1)
{
ERROR_LOG(DSPHLE, "Rendering end mail without prefix CDD1: %08x",
PanicAlert("Rendering end mail without prefix CDD1: %08x",
mail);
}
@ -536,6 +536,15 @@ void ZeldaAudioRenderer::PrepareFrame()
m_buf_front_left.fill(0);
m_buf_front_right.fill(0);
ApplyVolumeInPlace_1_15(&m_buf_back_left, 0x6784);
ApplyVolumeInPlace_1_15(&m_buf_back_right, 0x6784);
// TODO: Back left and back right should have a filter applied to them,
// then get mixed into front left and front right. In practice, TWW never
// uses this AFAICT. PanicAlert to help me find places that use this.
if (m_buf_back_left[0] != 0 || m_buf_back_right[0] != 0)
PanicAlert("Zelda HLE using back mixing buffers");
// TODO: Dolby/reverb mixing here.
m_prepared = true;
@ -554,9 +563,7 @@ void ZeldaAudioRenderer::AddVoice(u16 voice_id)
// TODO: In place effects.
// TODO: IIR.filter.
// TODO: Loop, etc.
// TODO: IIR filter.
if (vpb.use_dolby_volume)
{
@ -771,7 +778,7 @@ void ZeldaAudioRenderer::LoadInputSamples(MixingBuffer* buffer, VPB* vpb)
break;
default:
ERROR_LOG(DSPHLE, "Using an unknown/unimplemented sample source: %04x", vpb->samples_source_type);
PanicAlert("Using an unknown/unimplemented sample source: %04x", vpb->samples_source_type);
buffer->fill(0);
return;
}