audiostream only wait if at speed

This commit is contained in:
David Miller 2019-05-01 12:01:45 -04:00
parent 1e04de06bc
commit d6f682a329
1 changed files with 5 additions and 1 deletions

View File

@ -117,10 +117,14 @@ audiobackend_t* GetAudioBackend(std::string slug)
return NULL;
}
extern double full_rps;
u32 PushAudio(void* frame, u32 amt, bool wait)
{
bool do_wait = (full_rps<50.f)?false:wait;
if (audiobackend_current != NULL) {
return audiobackend_current->push(frame, amt, wait);
return audiobackend_current->push(frame, amt, do_wait);
}
return 0;
}