Commit adc8ff1d authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

InstanceCX: Remove audioclient hack

parent f845e7e0
......@@ -33,7 +33,7 @@ namespace libVLCX
Instance::Instance(Windows::Foundation::Collections::IVector<Platform::String^>^ argv, SwapChainPanel^ panel)
: m_chainPanel(panel)
{
int extraArgs = 5;
int extraArgs = 4;
auto c_argv = new char*[argv->Size + extraArgs];
unsigned int i = 0;
for (auto arg : argv)
......@@ -58,27 +58,6 @@ namespace libVLCX
m_dxManager->CreateSwapPanel(m_chainPanel);
UpdateSize(m_chainPanel->ActualWidth, m_chainPanel->ActualHeight);
ComPtr<MMDeviceLocator> audioReg = Make<MMDeviceLocator>();
audioReg->m_AudioClient = NULL;
audioReg->m_audioClientReady = CreateEventEx(NULL, TEXT("AudioClientReady"), 0, EVENT_ALL_ACCESS);
audioReg->RegisterForWASAPI();
void *addr = NULL;
DWORD res;
while ((res = WaitForSingleObjectEx(audioReg->m_audioClientReady, 1000, TRUE)) == WAIT_TIMEOUT) {
OutputDebugStringW(L"Waiting for audio\n");
}
CloseHandle(audioReg->m_audioClientReady);
if (res != WAIT_OBJECT_0) {
OutputDebugString(TEXT("Failure while waiting for audio client"));
return;
}
char ptr_astring[40];
sprintf_s(ptr_astring, "--winstore-audioclient=0x%p", audioReg->m_AudioClient);
argv[nbArgs++] = _strdup(ptr_astring);
char ptr_d2dstring[40];
sprintf_s(ptr_d2dstring, "--winrt-d2dcontext=0x%p", m_dxManager->cp_d2dContext);
argv[nbArgs++] = _strdup(ptr_d2dstring);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment