2 * Copyright (C) 2005-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/VideoPlayer/Interface/StreamInfo.h"
12 #include "settings/dialogs/GUIDialogSettingsManualBase.h"
19 struct IntegerSettingOption
;
21 class CGUIDialogAudioSettings
: public CGUIDialogSettingsManualBase
24 CGUIDialogAudioSettings();
25 ~CGUIDialogAudioSettings() override
;
27 // specialization of CGUIWindow
28 void FrameMove() override
;
30 static std::string
FormatDelay(float value
, float interval
);
31 static std::string
FormatDecibel(float value
);
32 static std::string
FormatPercentAsDecibel(float value
);
35 // implementations of ISettingCallback
36 void OnSettingChanged(const std::shared_ptr
<const CSetting
>& setting
) override
;
37 void OnSettingAction(const std::shared_ptr
<const CSetting
>& setting
) override
;
39 // specialization of CGUIDialogSettingsBase
40 bool AllowResettingSettings() const override
{ return false; }
42 void SetupView() override
;
44 // specialization of CGUIDialogSettingsManualBase
45 void InitializeSettings() override
;
47 bool SupportsAudioFeature(int feature
);
49 void AddAudioStreams(const std::shared_ptr
<CSettingGroup
>& group
, const std::string
& settingId
);
51 static bool IsPlayingPassthrough(const std::string
& condition
,
52 const std::string
& value
,
53 const std::shared_ptr
<const CSetting
>& setting
,
56 static void AudioStreamsOptionFiller(const std::shared_ptr
<const CSetting
>& setting
,
57 std::vector
<IntegerSettingOption
>& list
,
61 static std::string
SettingFormatterDelay(
62 const std::shared_ptr
<const CSettingControlSlider
>& control
,
63 const CVariant
& value
,
64 const CVariant
& minimum
,
66 const CVariant
& maximum
);
67 static std::string
SettingFormatterPercentAsDecibel(
68 const std::shared_ptr
<const CSettingControlSlider
>& control
,
69 const CVariant
& value
,
70 const CVariant
& minimum
,
72 const CVariant
& maximum
);
76 bool m_passthrough
= false;
78 typedef std::vector
<int> Features
;
81 static std::string
FormatFlags(StreamFlags flags
);