mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-07 23:41:18 +12:00
more explicit and sensible error handling
This commit is contained in:
parent
e0f5a9f98e
commit
f1d4c399a2
2 changed files with 22 additions and 4 deletions
|
@ -862,7 +862,15 @@ void LatteShaderCache_StreamBootSound()
|
|||
while(audiothread_keeprunning)
|
||||
{
|
||||
while (bootSndAudioDev->NeedAdditionalBlocks())
|
||||
bootSndAudioDev->FeedBlock(bootSndFileReader->getSamples());
|
||||
{
|
||||
sint16* data = bootSndFileReader->getSamples();
|
||||
if(data == nullptr)
|
||||
{
|
||||
audiothread_keeprunning = false;
|
||||
break;
|
||||
}
|
||||
bootSndAudioDev->FeedBlock(data);
|
||||
}
|
||||
// sleep for the duration of a single block
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(samplesPerBlock / (sampleRate/ 1'000)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue