fixed synch issues + memleak @ name fetching
This commit is contained in:
parent
f1b734bea6
commit
3239e60471
7 changed files with 87 additions and 43 deletions
|
|
@ -82,6 +82,7 @@ class Endpoint {
|
|||
void unregisterNewSessionNotification(EndpointNewSessionCallback* ensc);
|
||||
void deleteSessions();
|
||||
void activateEndpointSessions();
|
||||
//void deleteSessionManager();
|
||||
std::mutex endpointSessionsMutex;
|
||||
~Endpoint();
|
||||
|
||||
|
|
@ -91,12 +92,13 @@ class Endpoint {
|
|||
std::vector<Session*> endpointSessions;
|
||||
uint32_t channelCount = 0;
|
||||
IMMDevice *endpoint;
|
||||
IAudioClient *audioClient;
|
||||
IAudioEndpointVolume *endpointVolume = nullptr;
|
||||
IPropertyStore *properties;
|
||||
IAudioMeterInformation *endpointPeakMeter = nullptr;
|
||||
//IAudioClient *audioClient;
|
||||
int64_t defTime, minTime;
|
||||
IAudioSessionManager2 *sessionManager = nullptr;
|
||||
Flows flow;
|
||||
IAudioEndpointVolume *endpointVolume = nullptr;
|
||||
IPropertyStore *properties;
|
||||
std::wstring friendlyName;
|
||||
std::wstring descriptionName;
|
||||
std::wstring deviceName;
|
||||
|
|
@ -105,7 +107,6 @@ class Endpoint {
|
|||
Roles endpointRoles = (Roles)0;
|
||||
uint64_t idx;
|
||||
//Not implemented in llvm-mingw. Sad! todo: mingw patch
|
||||
IAudioMeterInformation *endpointPeakMeter = nullptr;
|
||||
IPolicyConfig7* policyConfig;
|
||||
};
|
||||
|
||||
|
|
@ -125,7 +126,7 @@ class EndpointVolumeCallback : public IAudioEndpointVolumeCallback {
|
|||
private:
|
||||
ULONG ref = 1;
|
||||
Endpoint* ep;
|
||||
bool wait = false;
|
||||
std::atomic<bool> wait = false;
|
||||
};
|
||||
|
||||
class EndpointSituationCallback : public IMMNotificationClient {
|
||||
|
|
@ -143,7 +144,7 @@ class EndpointSituationCallback : public IMMNotificationClient {
|
|||
private:
|
||||
ULONG ref = 1;
|
||||
Overseer* os;
|
||||
bool isEpStateChanging = false;
|
||||
std::atomic<bool> isEpStateChanging = false;
|
||||
};
|
||||
|
||||
class Overseer {
|
||||
|
|
@ -204,7 +205,7 @@ class EndpointNewSessionCallback : public IAudioSessionNotification {
|
|||
void createSessionThread(SessionThreadParams params);
|
||||
|
||||
private:
|
||||
bool wait = false;
|
||||
std::atomic<bool> wait = false;
|
||||
ULONG ref = 1;
|
||||
EndpointHandler *eph;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue