mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-19 20:19:13 +12:00
Sleep emulator thread if too many samples queued
This commit is contained in:
parent
56f716c1f1
commit
8148e68c4c
1 changed files with 1 additions and 0 deletions
|
@ -131,6 +131,7 @@ void TeakraDSP::setAudioEnabled(bool enable) {
|
|||
|
||||
// Wait until we've actually got room to do so
|
||||
while (sampleBuffer.size() + 2 > sampleBuffer.Capacity()) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds{1});
|
||||
}
|
||||
|
||||
sampleBuffer.push(audioFrame.data(), audioFrame.size());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue