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 "cores/AudioEngine/Interfaces/AESink.h"
12 #include "cores/AudioEngine/Utils/AEDeviceInfo.h"
13 #include "threads/CriticalSection.h"
19 class CAESinkSNDIO
: public IAESink
22 const char *GetName() override
{ return "sndio"; }
25 ~CAESinkSNDIO() override
;
27 static void Register();
28 static std::unique_ptr
<IAESink
> Create(std::string
& device
, AEAudioFormat
& desiredFormat
);
29 static void EnumerateDevicesEx(AEDeviceInfoList
&list
, bool force
= false);
31 bool Initialize(AEAudioFormat
&format
, std::string
&device
) override
;
32 void Deinitialize() override
;
35 void GetDelay(AEDelayStatus
& status
) override
;
36 double GetCacheTotal() override
{ return 0.0; }
37 unsigned int AddPackets(uint8_t **data
, unsigned int frames
, unsigned int offset
) override
;
38 void Drain() override
;
40 void AudioFormatToPar(AEAudioFormat
& format
);
41 bool ParToAudioFormat(AEAudioFormat
& format
);
42 static void OnmoveCb(void *arg
, int delta
);
44 struct sio_hdl
*m_hdl
;