36 lines
1.1 KiB
C
36 lines
1.1 KiB
C
#ifndef _AUDIOSESSIONS_FRAMEWORK_
|
|
#define _AUDIOSESSIONS_FRAMEWORK_
|
|
|
|
/*
|
|
* The intention of this file is to add an abstraction layer between the main program and the Core Audio API
|
|
*
|
|
* Functions are:
|
|
* Ensure there is always an updated accurate list of all audio sessions active on the device.
|
|
* Supply a single struct allowing for simple function signatures and easy access to important information
|
|
*/
|
|
|
|
#include <Windows.h>
|
|
#include <stdio.h>
|
|
#include <combaseapi.h>
|
|
#include <mmdeviceapi.h>
|
|
#include <audiopolicy.h>
|
|
#include "IAudioSessionNotification.h"
|
|
#include "IAudioSessionEvents.h"
|
|
#include "CLSIDs_and_IIDs.h"
|
|
|
|
typedef struct AudioSessionsInformation AudioSessionsInformation;
|
|
|
|
HRESULT initialiseSessionsFramework(AudioSessionsInformation*);
|
|
HRESULT refreshOpenSessions(AudioSessionsInformation*);
|
|
|
|
/*
|
|
* \brief Structure containing base interfaces needed for other framework calls
|
|
*/
|
|
struct AudioSessionsInformation {
|
|
IAudioSessionControl** AudioSessionControlsCollection;
|
|
int NumberAudioSessionsActive;
|
|
IMMDeviceEnumerator* IMMEnumerator;
|
|
IMMDevice* IMMDevice;
|
|
IAudioSessionNotification * AudioSessionNotification;
|
|
};
|
|
#endif |