Allow audio AQS buffering to occur during frame idle

This commit is contained in:
Jack Andersen
2017-02-14 20:00:10 -10:00
parent 48491e3250
commit fef663a5e3
9 changed files with 132 additions and 52 deletions

View File

@@ -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

View File

@@ -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);
}