mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-09 13:37:48 +00:00
Allow audio AQS buffering to occur during frame idle
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "boo/IWindow.hpp"
|
||||
#include "boo/IGraphicsContext.hpp"
|
||||
#include "boo/audiodev/IAudioVoiceEngine.hpp"
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#undef None
|
||||
@@ -199,8 +200,10 @@ struct WindowWayland : IWindow
|
||||
return std::unique_ptr<uint8_t[]>();
|
||||
}
|
||||
|
||||
void waitForRetrace()
|
||||
void waitForRetrace(IAudioVoiceEngine* engine)
|
||||
{
|
||||
if (engine)
|
||||
engine->pumpAndMixVoices();
|
||||
}
|
||||
|
||||
uintptr_t getPlatformHandle() const
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "boo/IGraphicsContext.hpp"
|
||||
#include "boo/IApplication.hpp"
|
||||
#include "boo/graphicsdev/GL.hpp"
|
||||
#include "boo/audiodev/IAudioVoiceEngine.hpp"
|
||||
|
||||
#if BOO_HAS_VULKAN
|
||||
#include "boo/graphicsdev/Vulkan.hpp"
|
||||
@@ -1418,8 +1419,10 @@ public:
|
||||
XSendEvent(m_xDisp, se->requestor, False, 0, &reply);
|
||||
}
|
||||
|
||||
void waitForRetrace()
|
||||
void waitForRetrace(IAudioVoiceEngine* engine)
|
||||
{
|
||||
if (engine)
|
||||
engine->pumpAndMixVoices();
|
||||
std::unique_lock<std::mutex> lk(m_gfxCtx->m_vsyncmt);
|
||||
m_gfxCtx->m_vsynccv.wait(lk);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user