2 * Copyright (C) 2010-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
11 #include "Utils/AEAudioFormat.h"
12 #include "Utils/AEDeviceInfo.h"
28 std::string m_sinkName
;
29 AEDeviceInfoList m_deviceInfoList
;
33 std::function
<std::unique_ptr
<IAESink
>(std::string
& device
, AEAudioFormat
& desiredFormat
)>;
34 using Enumerate
= std::function
<void(AEDeviceInfoList
& list
, bool force
)>;
35 using Cleanup
= std::function
<void()>;
40 CreateSink createFunc
;
41 Enumerate enumerateFunc
;
49 std::string friendlyName
;
51 bool IsSameDeviceAs(const AESinkDevice
& d
) const
53 return driver
== d
.driver
&& (name
== d
.name
|| friendlyName
== d
.friendlyName
);
60 static void RegisterSink(const AESinkRegEntry
& regEntry
);
61 static void ClearSinks();
62 static bool HasSinks();
64 static AESinkDevice
ParseDevice(const std::string
& device
);
65 static std::unique_ptr
<IAESink
> Create(const std::string
& device
, AEAudioFormat
& desiredFormat
);
66 static void EnumerateEx(std::vector
<AESinkInfo
>& list
, bool force
, const std::string
& driver
);
67 static void Cleanup();
70 static std::map
<std::string
, AESinkRegEntry
> m_AESinkRegEntry
;