Compare commits

...

2 Commits

Author SHA1 Message Date
Elad f6ea921e0d Merge branch 'master' into hot-cake 2026-06-07 19:19:33 +03:00
Elad ba9464c547 cellAudio: Fix _mxr000 event queue hack 2026-06-07 17:57:40 +03:00
+11 -11
View File
@@ -1666,11 +1666,7 @@ error_code AudioSetNotifyEventQueue(ppu_thread& ppu, u64 key, u32 iFlags)
if (key == c_mxr000 || key == 0)
{
bool has_sur_mixer_thread = false;
for (usz count = 0; !lv2_event_queue::find(c_mxr000) && count < 100; count++)
{
if (has_sur_mixer_thread || idm::select<named_thread<ppu_thread>>([&](u32 id, named_thread<ppu_thread>& test_ppu)
const bool has_sur_mixer_thread = idm::select<named_thread<ppu_thread>>([&](u32 id, named_thread<ppu_thread>& test_ppu)
{
// Confirm thread existence
if (id == ppu.id)
@@ -1686,12 +1682,15 @@ error_code AudioSetNotifyEventQueue(ppu_thread& ppu, u64 key, u32 iFlags)
}
return *ptr == "_cellsurMixerMain"sv;
}).ret)
}).ret;
bool was_mxr000_queue_found = false;
for (usz count = 0; has_sur_mixer_thread && count < 100; count++)
{
has_sur_mixer_thread = true;
}
else
if (lv2_event_queue::find(c_mxr000))
{
was_mxr000_queue_found = true;
break;
}
@@ -1701,13 +1700,14 @@ error_code AudioSetNotifyEventQueue(ppu_thread& ppu, u64 key, u32 iFlags)
return {};
}
cellAudio.error("AudioSetNotifyEventQueue(): Waiting for _mxr000. x%d", count);
(count < 3 ? cellAudio.warning : cellAudio.error)("AudioSetNotifyEventQueue(): Waiting for _mxr000. x%d", count);
lv2_sleep(50'000, &ppu);
}
if (has_sur_mixer_thread && lv2_event_queue::find(c_mxr000))
if (key == 0 && was_mxr000_queue_found)
{
// Correct key value argument
key = c_mxr000;
}
}