/
githubmirror
/
obs-studio
Обзор
Документация
Войти
/
githubmirror
/
obs-studio
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
plugins/win-wasapi/wasapi-notify.hpp
31 строка
779 B
Ryan Foster
clang-format: Increase column limit from 80 to 120
05 окт 2024, 01:19
05 окт 2024, 01:19
a1fbf10
Код
Авторство
О чём код?
#pragma once #include <util/windows/ComPtr.hpp> #include <Mmdeviceapi.h> #include <unordered_map> #include <functional> #include <mutex> typedef std::function<void(EDataFlow, ERole, LPCWSTR)> WASAPINotifyDefaultDeviceChangedCallback; class NotificationClient; class WASAPINotify { public: WASAPINotify(); ~WASAPINotify(); void AddDefaultDeviceChangedCallback(void *handle, WASAPINotifyDefaultDeviceChangedCallback cb); void RemoveDefaultDeviceChangedCallback(void *handle); private: void OnDefaultDeviceChanged(EDataFlow flow, ERole role, LPCWSTR id); std::mutex mutex; ComPtr<IMMDeviceEnumerator> enumerator; ComPtr<NotificationClient> notificationClient; std::unordered_map<void *, WASAPINotifyDefaultDeviceChangedCallback> defaultDeviceChangedCallbacks; };