mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 12:32:43 +00:00
replace some random Emu.Pause with fatal errors
This commit is contained in:
parent
954d83b6a0
commit
50354253c8
@ -54,8 +54,7 @@ void FAudioBackend::Play()
|
||||
const u32 res = FAudioSourceVoice_Start(m_source_voice, 0, FAUDIO_COMMIT_NOW);
|
||||
if (res)
|
||||
{
|
||||
FAudio_.error("FAudioSourceVoice_Start() failed(0x%08x)", res);
|
||||
Emu.Pause();
|
||||
FAudio_.fatal("FAudioSourceVoice_Start() failed(0x%08x)", res);
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,8 +65,7 @@ void FAudioBackend::Pause()
|
||||
const u32 res = FAudioSourceVoice_Stop(m_source_voice, 0, FAUDIO_COMMIT_NOW);
|
||||
if (res)
|
||||
{
|
||||
FAudio_.error("FAudioSourceVoice_Stop() failed(0x%08x)", res);
|
||||
Emu.Pause();
|
||||
FAudio_.fatal("FAudioSourceVoice_Stop() failed(0x%08x)", res);
|
||||
}
|
||||
}
|
||||
|
||||
@ -78,8 +76,7 @@ void FAudioBackend::Flush()
|
||||
const u32 res = FAudioSourceVoice_FlushSourceBuffers(m_source_voice);
|
||||
if (res)
|
||||
{
|
||||
FAudio_.error("FAudioSourceVoice_FlushSourceBuffers() failed(0x%08x)", res);
|
||||
Emu.Pause();
|
||||
FAudio_.fatal("FAudioSourceVoice_FlushSourceBuffers() failed(0x%08x)", res);
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,8 +110,7 @@ void FAudioBackend::Open(u32 /* num_buffers */)
|
||||
const u32 res = FAudio_CreateSourceVoice(m_instance, &m_source_voice, &waveformatex, 0, FAUDIO_DEFAULT_FREQ_RATIO, nullptr, nullptr, nullptr);
|
||||
if (res)
|
||||
{
|
||||
FAudio_.error("FAudio_CreateSourceVoice() failed(0x%08x)", res);
|
||||
Emu.Pause();
|
||||
FAudio_.fatal("FAudio_CreateSourceVoice() failed(0x%08x)", res);
|
||||
}
|
||||
|
||||
AUDIT(m_source_voice != nullptr);
|
||||
@ -148,8 +144,7 @@ bool FAudioBackend::AddData(const void* src, u32 num_samples)
|
||||
const u32 res = FAudioSourceVoice_SubmitSourceBuffer(m_source_voice, &buffer, nullptr);
|
||||
if (res)
|
||||
{
|
||||
FAudio_.error("FAudioSourceVoice_SubmitSourceBuffer() failed(0x%08x)", res);
|
||||
Emu.Pause();
|
||||
FAudio_.fatal("FAudioSourceVoice_SubmitSourceBuffer() failed(0x%08x)", res);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -172,8 +167,7 @@ f32 FAudioBackend::SetFrequencyRatio(f32 new_ratio)
|
||||
const u32 res = FAudioSourceVoice_SetFrequencyRatio(m_source_voice, new_ratio, FAUDIO_COMMIT_NOW);
|
||||
if (res)
|
||||
{
|
||||
FAudio_.error("FAudioSourceVoice_SetFrequencyRatio() failed(0x%08x)", res);
|
||||
Emu.Pause();
|
||||
FAudio_.fatal("FAudioSourceVoice_SetFrequencyRatio() failed(0x%08x)", res);
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
|
@ -67,8 +67,7 @@ void XAudio2Backend::Play()
|
||||
const HRESULT hr = m_source_voice->Start();
|
||||
if (FAILED(hr))
|
||||
{
|
||||
XAudio.error("Start() failed: %s (0x%08x)", std::system_category().message(hr), static_cast<u32>(hr));
|
||||
Emu.Pause();
|
||||
XAudio.fatal("Start() failed: %s (0x%08x)", std::system_category().message(hr), static_cast<u32>(hr));
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,8 +84,7 @@ void XAudio2Backend::Pause()
|
||||
const HRESULT hr = m_source_voice->Stop();
|
||||
if (FAILED(hr))
|
||||
{
|
||||
XAudio.error("Stop() failed: %s (0x%08x)", std::system_category().message(hr), static_cast<u32>(hr));
|
||||
Emu.Pause();
|
||||
XAudio.fatal("Stop() failed: %s (0x%08x)", std::system_category().message(hr), static_cast<u32>(hr));
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,8 +102,7 @@ void XAudio2Backend::Open(u32 /* num_buffers */)
|
||||
const HRESULT hr = m_xaudio2_instance->CreateSourceVoice(&m_source_voice, &waveformatex, 0, XAUDIO2_DEFAULT_FREQ_RATIO);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
XAudio.error("CreateSourceVoice() failed: %s (0x%08x)", std::system_category().message(hr), static_cast<u32>(hr));
|
||||
Emu.Pause();
|
||||
XAudio.fatal("CreateSourceVoice() failed: %s (0x%08x)", std::system_category().message(hr), static_cast<u32>(hr));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -151,8 +148,7 @@ bool XAudio2Backend::AddData(const void* src, u32 num_samples)
|
||||
const HRESULT hr = m_source_voice->SubmitSourceBuffer(&buffer);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
XAudio.error("AddData() failed: %s (0x%08x)", std::system_category().message(hr), static_cast<u32>(hr));
|
||||
Emu.Pause();
|
||||
XAudio.fatal("AddData() failed: %s (0x%08x)", std::system_category().message(hr), static_cast<u32>(hr));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -166,8 +162,7 @@ void XAudio2Backend::Flush()
|
||||
const HRESULT hr = m_source_voice->FlushSourceBuffers();
|
||||
if (FAILED(hr))
|
||||
{
|
||||
XAudio.error("FlushSourceBuffers() failed: %s (0x%08x)", std::system_category().message(hr), static_cast<u32>(hr));
|
||||
Emu.Pause();
|
||||
XAudio.fatal("FlushSourceBuffers() failed: %s (0x%08x)", std::system_category().message(hr), static_cast<u32>(hr));
|
||||
}
|
||||
}
|
||||
|
||||
@ -189,8 +184,7 @@ f32 XAudio2Backend::SetFrequencyRatio(f32 new_ratio)
|
||||
const HRESULT hr = m_source_voice->SetFrequencyRatio(new_ratio);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
XAudio.error("SetFrequencyRatio() failed: %s (0x%08x)", std::system_category().message(hr), static_cast<u32>(hr));
|
||||
Emu.Pause();
|
||||
XAudio.fatal("SetFrequencyRatio() failed: %s (0x%08x)", std::system_category().message(hr), static_cast<u32>(hr));
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
|
@ -655,8 +655,7 @@ next:
|
||||
OMAHeader oma(1 /* atrac3p id */, adec.sample_rate, adec.ch_cfg, adec.frame_size);
|
||||
if (buf_size + 0u < sizeof(oma))
|
||||
{
|
||||
cellAdec.error("adecRead(): OMAHeader writing failed");
|
||||
Emu.Pause();
|
||||
cellAdec.fatal("adecRead(): OMAHeader writing failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -706,8 +705,7 @@ next:
|
||||
case adecStartSeq: // TODO ?
|
||||
default:
|
||||
{
|
||||
cellAdec.error("adecRawRead(): unknown task (%d)", +task.type);
|
||||
Emu.Pause();
|
||||
cellAdec.fatal("adecRawRead(): unknown task (%d)", +task.type);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -749,8 +747,7 @@ bool adecCheckType(s32 type)
|
||||
case CELL_ADEC_TYPE_M4AAC:
|
||||
case CELL_ADEC_TYPE_CELP8:
|
||||
{
|
||||
cellAdec.todo("Unimplemented audio codec type (%d)", type);
|
||||
Emu.Pause();
|
||||
cellAdec.fatal("Unimplemented audio codec type (%d)", type);
|
||||
break;
|
||||
}
|
||||
default: return false;
|
||||
@ -880,8 +877,7 @@ error_code cellAdecStartSeq(u32 handle, u32 param)
|
||||
}
|
||||
default:
|
||||
{
|
||||
cellAdec.todo("cellAdecStartSeq(): Unimplemented audio codec type(%d)", adec->type);
|
||||
Emu.Pause();
|
||||
cellAdec.fatal("cellAdecStartSeq(): Unimplemented audio codec type(%d)", adec->type);
|
||||
return CELL_OK;
|
||||
}
|
||||
}
|
||||
@ -1107,8 +1103,7 @@ error_code cellAdecGetPcmItem(u32 handle, vm::pptr<CellAdecPcmItem> pcmItem)
|
||||
}
|
||||
else
|
||||
{
|
||||
cellAdec.error("cellAdecGetPcmItem(): unsupported channel count (%d)", frame->channels);
|
||||
Emu.Pause();
|
||||
cellAdec.fatal("cellAdecGetPcmItem(): unsupported channel count (%d)", frame->channels);
|
||||
}
|
||||
}
|
||||
else if (adec->type == CELL_ADEC_TYPE_MP3)
|
||||
|
@ -871,22 +871,19 @@ bool ElementaryStream::release()
|
||||
std::lock_guard lock(m_mutex);
|
||||
if (released >= put_count)
|
||||
{
|
||||
cellDmux.error("es::release() error: buffer is empty");
|
||||
Emu.Pause();
|
||||
cellDmux.fatal("es::release() error: buffer is empty");
|
||||
return false;
|
||||
}
|
||||
if (released >= got_count)
|
||||
{
|
||||
cellDmux.error("es::release() error: buffer has not been seen yet");
|
||||
Emu.Pause();
|
||||
cellDmux.fatal("es::release() error: buffer has not been seen yet");
|
||||
return false;
|
||||
}
|
||||
|
||||
u32 addr = 0;
|
||||
if (!entries.pop(addr, &dmux->is_closed) || !addr)
|
||||
{
|
||||
cellDmux.error("es::release() error: entries.Pop() failed");
|
||||
Emu.Pause();
|
||||
cellDmux.fatal("es::release() error: entries.Pop() failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -899,8 +896,7 @@ bool ElementaryStream::peek(u32& out_data, bool no_ex, u32& out_spec, bool updat
|
||||
std::lock_guard lock(m_mutex);
|
||||
if (got_count < released)
|
||||
{
|
||||
cellDmux.error("es::peek() error: got_count(%d) < released(%d) (put_count=%d)", got_count, released, put_count);
|
||||
Emu.Pause();
|
||||
cellDmux.fatal("es::peek() error: got_count(%d) < released(%d) (put_count=%d)", got_count, released, put_count);
|
||||
return false;
|
||||
}
|
||||
if (got_count >= put_count)
|
||||
@ -911,8 +907,7 @@ bool ElementaryStream::peek(u32& out_data, bool no_ex, u32& out_spec, bool updat
|
||||
u32 addr = 0;
|
||||
if (!entries.peek(addr, got_count - released, &dmux->is_closed) || !addr)
|
||||
{
|
||||
cellDmux.error("es::peek() error: entries.Peek() failed");
|
||||
Emu.Pause();
|
||||
cellDmux.fatal("es::peek() error: entries.Peek() failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -125,8 +125,7 @@ error_code pamfStreamTypeToEsFilterId(u8 type, u8 ch, CellCodecEsFilterId& pEsFi
|
||||
|
||||
default:
|
||||
{
|
||||
cellPamf.error("pamfStreamTypeToEsFilterId(): unknown type (%d, ch=%d)", type, ch);
|
||||
Emu.Pause();
|
||||
cellPamf.fatal("pamfStreamTypeToEsFilterId(): unknown type (%d, ch=%d)", type, ch);
|
||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||
}
|
||||
}
|
||||
@ -151,8 +150,7 @@ u8 pamfGetStreamType(vm::ptr<CellPamfReader> pSelf, u32 stream)
|
||||
default: break;
|
||||
}
|
||||
|
||||
cellPamf.todo("pamfGetStreamType(): unsupported stream type found(0x%x)", header.type);
|
||||
Emu.Pause();
|
||||
cellPamf.fatal("pamfGetStreamType(): unsupported stream type found(0x%x)", header.type);
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
@ -200,8 +198,7 @@ u8 pamfGetStreamChannel(vm::ptr<CellPamfReader> pSelf, u32 stream)
|
||||
default: break;
|
||||
}
|
||||
|
||||
cellPamf.todo("pamfGetStreamChannel(): unsupported stream type found(0x%x)", header.type);
|
||||
Emu.Pause();
|
||||
cellPamf.fatal("pamfGetStreamChannel(): unsupported stream type found(0x%x)", header.type);
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
@ -346,8 +343,7 @@ u8 cellPamfReaderGetNumberOfSpecificStreams(vm::ptr<CellPamfReader> pSelf, u8 st
|
||||
}
|
||||
}
|
||||
|
||||
cellPamf.todo("cellPamfReaderGetNumberOfSpecificStreams(): unsupported stream type (0x%x)", streamType);
|
||||
Emu.Pause();
|
||||
cellPamf.fatal("cellPamfReaderGetNumberOfSpecificStreams(): unsupported stream type (0x%x)", streamType);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -368,10 +364,9 @@ error_code cellPamfReaderSetStreamWithTypeAndChannel(vm::ptr<CellPamfReader> pSe
|
||||
{
|
||||
cellPamf.warning("cellPamfReaderSetStreamWithTypeAndChannel(pSelf=*0x%x, streamType=%d, ch=%d)", pSelf, streamType, ch);
|
||||
|
||||
// it probably doesn't support "any audio" or "any video" argument
|
||||
// TODO: it probably doesn't support "any audio" or "any video" argument
|
||||
if (streamType > 5 || ch >= 16)
|
||||
{
|
||||
Emu.Pause();
|
||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
|
@ -851,7 +851,8 @@ void gdb_thread::operator()()
|
||||
return;
|
||||
}
|
||||
//stop immediately
|
||||
if (Emu.IsRunning()) {
|
||||
if (Emu.IsRunning())
|
||||
{
|
||||
Emu.Pause();
|
||||
}
|
||||
|
||||
|
@ -100,8 +100,7 @@ std::string CgBinaryDisasm::GetSRCDisasm(const u32 n)
|
||||
break;
|
||||
|
||||
default:
|
||||
rsx_log.error("Bad src%u reg type: %d", n, u32{ src[n].reg_type });
|
||||
Emu.Pause();
|
||||
rsx_log.fatal("Bad src%u reg type: %d", n, u32{ src[n].reg_type });
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -664,8 +664,7 @@ template<typename T> std::string FragmentProgramDecompiler::GetSRC(T src)
|
||||
break;
|
||||
|
||||
default:
|
||||
rsx_log.error("Bad src type %d", u32{ src.reg_type });
|
||||
Emu.Pause();
|
||||
rsx_log.fatal("Bad src type %d", u32{ src.reg_type });
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -130,8 +130,7 @@ std::string VertexProgramDecompiler::GetSRC(const u32 n)
|
||||
break;
|
||||
|
||||
default:
|
||||
rsx_log.error("Bad src%u reg type: %d", n, u32{ src[n].reg_type });
|
||||
Emu.Pause();
|
||||
rsx_log.fatal("Bad src%u reg type: %d", n, u32{ src[n].reg_type });
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user