temp commit
This commit is contained in:
parent
064c16d9e7
commit
574c6f039e
7 changed files with 99 additions and 11 deletions
|
|
@ -37,6 +37,22 @@ HRESULT EndpointNewSessionCallback::QueryInterface(REFIID riid, VOID **ppvInterf
|
|||
}
|
||||
|
||||
HRESULT EndpointNewSessionCallback::OnSessionCreated(IAudioSessionControl *NewSession) {
|
||||
if (eph->getFlow() == Flows::FLOW_CAPTURE) return S_OK;
|
||||
|
||||
HRESULT result = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
|
||||
IAudioSessionControl2* sessionControl;
|
||||
//ISimmpleAudioVolume* sessionVolume;
|
||||
if (FAILED(NewSession->QueryInterface(__uuidof(IAudioSessionControl2), (void**)&sessionControl))) { log_wdebugcpp(L"no nueva sesion......"); };
|
||||
if (sessionControl) {
|
||||
sessionControl->AddRef();
|
||||
//sessionControl->QueryInterface(__uuidof(ISimpleAudioVolume), (void**)&sessionVolume);
|
||||
Session* newSession = new Session(this->eph->getEndpoint(), sessionControl);
|
||||
eph->addSession(newSession);
|
||||
}
|
||||
|
||||
if (result == S_OK)
|
||||
CoUninitialize();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
@ -299,6 +315,11 @@ void Endpoint::activateEndpointSessions() {
|
|||
sessionEnumerator->Release();
|
||||
}
|
||||
|
||||
void Endpoint::addSession(Session* session) {
|
||||
session->setIndex(this->getSessionCount());
|
||||
endpointSessions.push_back(session);
|
||||
}
|
||||
|
||||
void Endpoint::activateEndpointVolume() {
|
||||
//bool extraThread = false;
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue