session volume/mute polling
This commit is contained in:
parent
cb9446cb42
commit
064c16d9e7
10 changed files with 263 additions and 4 deletions
|
|
@ -1,6 +1,45 @@
|
|||
#include <backlasses.h>
|
||||
#include <backfuncs.h>
|
||||
|
||||
EndpointNewSessionCallback::EndpointNewSessionCallback(EndpointHandler* eph){
|
||||
this->eph = eph;
|
||||
}
|
||||
|
||||
ULONG EndpointNewSessionCallback::AddRef(){
|
||||
return InterlockedIncrement(&ref);
|
||||
}
|
||||
|
||||
ULONG EndpointNewSessionCallback::Release(){
|
||||
ULONG tempRef = InterlockedDecrement(&ref);
|
||||
if (tempRef == 0) {
|
||||
delete this;
|
||||
}
|
||||
return tempRef;
|
||||
}
|
||||
|
||||
HRESULT EndpointNewSessionCallback::QueryInterface(REFIID riid, VOID **ppvInterface) {
|
||||
if (IID_IUnknown == riid)
|
||||
{
|
||||
AddRef();
|
||||
*ppvInterface = (IUnknown*)this;
|
||||
}
|
||||
else if (__uuidof(IAudioSessionNotification) == riid)
|
||||
{
|
||||
AddRef();
|
||||
*ppvInterface = (IMMNotificationClient*)this;
|
||||
}
|
||||
else
|
||||
{
|
||||
*ppvInterface = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT EndpointNewSessionCallback::OnSessionCreated(IAudioSessionControl *NewSession) {
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
EndpointVolumeCallback::EndpointVolumeCallback(Endpoint* ep){
|
||||
this->ep = ep;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue