1 /*
2  * This file is auto-generated.  DO NOT MODIFY.
3  * Using: out/host/linux-x86/bin/aidl --lang=ndk -Weverything -Wno-missing-permission-annotation --structured --version 3 --hash notfrozen -t --stability vintf --min_sdk_version current -pout/soong/.intermediates/system/hardware/interfaces/media/android.media.audio.eraser.types_interface/1/preprocessed.aidl -pout/soong/.intermediates/system/hardware/interfaces/media/android.media.audio.common.types_interface/4/preprocessed.aidl -pout/soong/.intermediates/hardware/interfaces/audio/aidl/android.hardware.audio.common_interface/4/preprocessed.aidl -pout/soong/.intermediates/hardware/interfaces/common/aidl/android.hardware.common_interface/2/preprocessed.aidl -pout/soong/.intermediates/hardware/interfaces/common/fmq/aidl/android.hardware.common.fmq_interface/1/preprocessed.aidl --previous_api_dir=hardware/interfaces/audio/aidl/aidl_api/android.hardware.audio.effect/2 --previous_hash 54d5a2e1d59066b57e35eb7bcb5ebc72a1259c1c --ninja -d out/soong/.intermediates/hardware/interfaces/audio/aidl/android.hardware.audio.effect-V3-ndk-source/gen/staging/android/hardware/audio/effect/DynamicsProcessing.cpp.d -h out/soong/.intermediates/hardware/interfaces/audio/aidl/android.hardware.audio.effect-V3-ndk-source/gen/include/staging -o out/soong/.intermediates/hardware/interfaces/audio/aidl/android.hardware.audio.effect-V3-ndk-source/gen/staging -Nhardware/interfaces/audio/aidl hardware/interfaces/audio/aidl/android/hardware/audio/effect/DynamicsProcessing.aidl
4  *
5  * DO NOT CHECK THIS FILE INTO A CODE TREE (e.g. git, etc..).
6  * ALWAYS GENERATE THIS FILE FROM UPDATED AIDL COMPILER
7  * AS A BUILD INTERMEDIATE ONLY. THIS IS NOT SOURCE CODE.
8  */
9 #pragma once
10 
11 #include <array>
12 #include <cassert>
13 #include <cstdint>
14 #include <memory>
15 #include <optional>
16 #include <string>
17 #include <type_traits>
18 #include <utility>
19 #include <variant>
20 #include <vector>
21 #include <android/binder_enums.h>
22 #include <android/binder_interface_utils.h>
23 #include <android/binder_parcelable_utils.h>
24 #include <android/binder_to_string.h>
25 #include <aidl/android/hardware/audio/effect/DynamicsProcessing.h>
26 #include <aidl/android/hardware/audio/effect/VendorExtension.h>
27 #ifdef BINDER_STABILITY_SUPPORT
28 #include <android/binder_stability.h>
29 #endif  // BINDER_STABILITY_SUPPORT
30 
31 #ifndef __BIONIC__
32 #define __assert2(a,b,c,d) ((void)0)
33 #endif
34 
35 namespace aidl::android::hardware::audio::effect {
36 class VendorExtension;
37 }  // namespace aidl::android::hardware::audio::effect
38 namespace aidl {
39 namespace android {
40 namespace hardware {
41 namespace audio {
42 namespace effect {
43 class DynamicsProcessing {
44 public:
45   typedef std::false_type fixed_size;
46   static const char* descriptor;
47 
48   enum class Tag : int32_t {
49     vendor = 0,
50     engineArchitecture = 1,
51     preEq = 2,
52     postEq = 3,
53     preEqBand = 4,
54     postEqBand = 5,
55     mbc = 6,
56     mbcBand = 7,
57     limiter = 8,
58     inputGain = 9,
59   };
60 
61   class Id {
62   public:
63     typedef std::false_type fixed_size;
64     static const char* descriptor;
65 
66     enum class Tag : int32_t {
67       vendorExtensionTag = 0,
68       commonTag = 1,
69     };
70 
71     // Expose tag symbols for legacy code
72     static const inline Tag vendorExtensionTag = Tag::vendorExtensionTag;
73     static const inline Tag commonTag = Tag::commonTag;
74 
75     template<typename _Tp>
76     static constexpr bool _not_self = !std::is_same_v<std::remove_cv_t<std::remove_reference_t<_Tp>>, Id>;
77 
Id()78     Id() : _value(std::in_place_index<static_cast<size_t>(vendorExtensionTag)>, ::aidl::android::hardware::audio::effect::VendorExtension()) { }
79 
80     template <typename _Tp, typename = std::enable_if_t<_not_self<_Tp>>>
81     // NOLINTNEXTLINE(google-explicit-constructor)
Id(_Tp && _arg)82     constexpr Id(_Tp&& _arg)
83         : _value(std::forward<_Tp>(_arg)) {}
84 
85     template <size_t _Np, typename... _Tp>
Id(std::in_place_index_t<_Np>,_Tp &&..._args)86     constexpr explicit Id(std::in_place_index_t<_Np>, _Tp&&... _args)
87         : _value(std::in_place_index<_Np>, std::forward<_Tp>(_args)...) {}
88 
89     template <Tag _tag, typename... _Tp>
make(_Tp &&..._args)90     static Id make(_Tp&&... _args) {
91       return Id(std::in_place_index<static_cast<size_t>(_tag)>, std::forward<_Tp>(_args)...);
92     }
93 
94     template <Tag _tag, typename _Tp, typename... _Up>
make(std::initializer_list<_Tp> _il,_Up &&..._args)95     static Id make(std::initializer_list<_Tp> _il, _Up&&... _args) {
96       return Id(std::in_place_index<static_cast<size_t>(_tag)>, std::move(_il), std::forward<_Up>(_args)...);
97     }
98 
getTag()99     Tag getTag() const {
100       return static_cast<Tag>(_value.index());
101     }
102 
103     template <Tag _tag>
get()104     const auto& get() const {
105       if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); }
106       return std::get<static_cast<size_t>(_tag)>(_value);
107     }
108 
109     template <Tag _tag>
get()110     auto& get() {
111       if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); }
112       return std::get<static_cast<size_t>(_tag)>(_value);
113     }
114 
115     template <Tag _tag, typename... _Tp>
set(_Tp &&..._args)116     void set(_Tp&&... _args) {
117       _value.emplace<static_cast<size_t>(_tag)>(std::forward<_Tp>(_args)...);
118     }
119 
120     binder_status_t readFromParcel(const AParcel* _parcel);
121     binder_status_t writeToParcel(AParcel* _parcel) const;
122 
123     inline bool operator==(const Id& _rhs) const {
124       return _value == _rhs._value;
125     }
126     inline bool operator<(const Id& _rhs) const {
127       return _value < _rhs._value;
128     }
129     inline bool operator!=(const Id& _rhs) const {
130       return !(*this == _rhs);
131     }
132     inline bool operator>(const Id& _rhs) const {
133       return _rhs < *this;
134     }
135     inline bool operator>=(const Id& _rhs) const {
136       return !(*this < _rhs);
137     }
138     inline bool operator<=(const Id& _rhs) const {
139       return !(_rhs < *this);
140     }
141 
142     static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()143     inline std::string toString() const {
144       std::ostringstream os;
145       os << "Id{";
146       switch (getTag()) {
147       case vendorExtensionTag: os << "vendorExtensionTag: " << ::android::internal::ToString(get<vendorExtensionTag>()); break;
148       case commonTag: os << "commonTag: " << ::android::internal::ToString(get<commonTag>()); break;
149       }
150       os << "}";
151       return os.str();
152     }
153   private:
154     std::variant<::aidl::android::hardware::audio::effect::VendorExtension, ::aidl::android::hardware::audio::effect::DynamicsProcessing::Tag> _value;
155   };
156   enum class ResolutionPreference : int8_t {
157     FAVOR_FREQUENCY_RESOLUTION = 0,
158     FAVOR_TIME_RESOLUTION = 1,
159   };
160 
161   class StageEnablement {
162   public:
163     typedef std::false_type fixed_size;
164     static const char* descriptor;
165 
166     bool inUse = false;
167     int32_t bandCount = 0;
168 
169     binder_status_t readFromParcel(const AParcel* parcel);
170     binder_status_t writeToParcel(AParcel* parcel) const;
171 
172     inline bool operator==(const StageEnablement& _rhs) const {
173       return std::tie(inUse, bandCount) == std::tie(_rhs.inUse, _rhs.bandCount);
174     }
175     inline bool operator<(const StageEnablement& _rhs) const {
176       return std::tie(inUse, bandCount) < std::tie(_rhs.inUse, _rhs.bandCount);
177     }
178     inline bool operator!=(const StageEnablement& _rhs) const {
179       return !(*this == _rhs);
180     }
181     inline bool operator>(const StageEnablement& _rhs) const {
182       return _rhs < *this;
183     }
184     inline bool operator>=(const StageEnablement& _rhs) const {
185       return !(*this < _rhs);
186     }
187     inline bool operator<=(const StageEnablement& _rhs) const {
188       return !(_rhs < *this);
189     }
190 
191     static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()192     inline std::string toString() const {
193       std::ostringstream _aidl_os;
194       _aidl_os << "StageEnablement{";
195       _aidl_os << "inUse: " << ::android::internal::ToString(inUse);
196       _aidl_os << ", bandCount: " << ::android::internal::ToString(bandCount);
197       _aidl_os << "}";
198       return _aidl_os.str();
199     }
200   };
201   class EngineArchitecture {
202   public:
203     typedef std::false_type fixed_size;
204     static const char* descriptor;
205 
206     ::aidl::android::hardware::audio::effect::DynamicsProcessing::ResolutionPreference resolutionPreference = ::aidl::android::hardware::audio::effect::DynamicsProcessing::ResolutionPreference::FAVOR_FREQUENCY_RESOLUTION;
207     float preferredProcessingDurationMs = 0.000000f;
208     ::aidl::android::hardware::audio::effect::DynamicsProcessing::StageEnablement preEqStage;
209     ::aidl::android::hardware::audio::effect::DynamicsProcessing::StageEnablement postEqStage;
210     ::aidl::android::hardware::audio::effect::DynamicsProcessing::StageEnablement mbcStage;
211     bool limiterInUse = false;
212 
213     binder_status_t readFromParcel(const AParcel* parcel);
214     binder_status_t writeToParcel(AParcel* parcel) const;
215 
216     inline bool operator==(const EngineArchitecture& _rhs) const {
217       return std::tie(resolutionPreference, preferredProcessingDurationMs, preEqStage, postEqStage, mbcStage, limiterInUse) == std::tie(_rhs.resolutionPreference, _rhs.preferredProcessingDurationMs, _rhs.preEqStage, _rhs.postEqStage, _rhs.mbcStage, _rhs.limiterInUse);
218     }
219     inline bool operator<(const EngineArchitecture& _rhs) const {
220       return std::tie(resolutionPreference, preferredProcessingDurationMs, preEqStage, postEqStage, mbcStage, limiterInUse) < std::tie(_rhs.resolutionPreference, _rhs.preferredProcessingDurationMs, _rhs.preEqStage, _rhs.postEqStage, _rhs.mbcStage, _rhs.limiterInUse);
221     }
222     inline bool operator!=(const EngineArchitecture& _rhs) const {
223       return !(*this == _rhs);
224     }
225     inline bool operator>(const EngineArchitecture& _rhs) const {
226       return _rhs < *this;
227     }
228     inline bool operator>=(const EngineArchitecture& _rhs) const {
229       return !(*this < _rhs);
230     }
231     inline bool operator<=(const EngineArchitecture& _rhs) const {
232       return !(_rhs < *this);
233     }
234 
235     static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()236     inline std::string toString() const {
237       std::ostringstream _aidl_os;
238       _aidl_os << "EngineArchitecture{";
239       _aidl_os << "resolutionPreference: " << ::android::internal::ToString(resolutionPreference);
240       _aidl_os << ", preferredProcessingDurationMs: " << ::android::internal::ToString(preferredProcessingDurationMs);
241       _aidl_os << ", preEqStage: " << ::android::internal::ToString(preEqStage);
242       _aidl_os << ", postEqStage: " << ::android::internal::ToString(postEqStage);
243       _aidl_os << ", mbcStage: " << ::android::internal::ToString(mbcStage);
244       _aidl_os << ", limiterInUse: " << ::android::internal::ToString(limiterInUse);
245       _aidl_os << "}";
246       return _aidl_os.str();
247     }
248   };
249   class ChannelConfig {
250   public:
251     typedef std::false_type fixed_size;
252     static const char* descriptor;
253 
254     int32_t channel = 0;
255     bool enable = false;
256 
257     binder_status_t readFromParcel(const AParcel* parcel);
258     binder_status_t writeToParcel(AParcel* parcel) const;
259 
260     inline bool operator==(const ChannelConfig& _rhs) const {
261       return std::tie(channel, enable) == std::tie(_rhs.channel, _rhs.enable);
262     }
263     inline bool operator<(const ChannelConfig& _rhs) const {
264       return std::tie(channel, enable) < std::tie(_rhs.channel, _rhs.enable);
265     }
266     inline bool operator!=(const ChannelConfig& _rhs) const {
267       return !(*this == _rhs);
268     }
269     inline bool operator>(const ChannelConfig& _rhs) const {
270       return _rhs < *this;
271     }
272     inline bool operator>=(const ChannelConfig& _rhs) const {
273       return !(*this < _rhs);
274     }
275     inline bool operator<=(const ChannelConfig& _rhs) const {
276       return !(_rhs < *this);
277     }
278 
279     static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()280     inline std::string toString() const {
281       std::ostringstream _aidl_os;
282       _aidl_os << "ChannelConfig{";
283       _aidl_os << "channel: " << ::android::internal::ToString(channel);
284       _aidl_os << ", enable: " << ::android::internal::ToString(enable);
285       _aidl_os << "}";
286       return _aidl_os.str();
287     }
288   };
289   class EqBandConfig {
290   public:
291     typedef std::false_type fixed_size;
292     static const char* descriptor;
293 
294     int32_t channel = 0;
295     int32_t band = 0;
296     bool enable = false;
297     float cutoffFrequencyHz = 0.000000f;
298     float gainDb = 0.000000f;
299 
300     binder_status_t readFromParcel(const AParcel* parcel);
301     binder_status_t writeToParcel(AParcel* parcel) const;
302 
303     inline bool operator==(const EqBandConfig& _rhs) const {
304       return std::tie(channel, band, enable, cutoffFrequencyHz, gainDb) == std::tie(_rhs.channel, _rhs.band, _rhs.enable, _rhs.cutoffFrequencyHz, _rhs.gainDb);
305     }
306     inline bool operator<(const EqBandConfig& _rhs) const {
307       return std::tie(channel, band, enable, cutoffFrequencyHz, gainDb) < std::tie(_rhs.channel, _rhs.band, _rhs.enable, _rhs.cutoffFrequencyHz, _rhs.gainDb);
308     }
309     inline bool operator!=(const EqBandConfig& _rhs) const {
310       return !(*this == _rhs);
311     }
312     inline bool operator>(const EqBandConfig& _rhs) const {
313       return _rhs < *this;
314     }
315     inline bool operator>=(const EqBandConfig& _rhs) const {
316       return !(*this < _rhs);
317     }
318     inline bool operator<=(const EqBandConfig& _rhs) const {
319       return !(_rhs < *this);
320     }
321 
322     static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()323     inline std::string toString() const {
324       std::ostringstream _aidl_os;
325       _aidl_os << "EqBandConfig{";
326       _aidl_os << "channel: " << ::android::internal::ToString(channel);
327       _aidl_os << ", band: " << ::android::internal::ToString(band);
328       _aidl_os << ", enable: " << ::android::internal::ToString(enable);
329       _aidl_os << ", cutoffFrequencyHz: " << ::android::internal::ToString(cutoffFrequencyHz);
330       _aidl_os << ", gainDb: " << ::android::internal::ToString(gainDb);
331       _aidl_os << "}";
332       return _aidl_os.str();
333     }
334   };
335   class MbcBandConfig {
336   public:
337     typedef std::false_type fixed_size;
338     static const char* descriptor;
339 
340     int32_t channel = 0;
341     int32_t band = 0;
342     bool enable = false;
343     float cutoffFrequencyHz = 0.000000f;
344     float attackTimeMs = 0.000000f;
345     float releaseTimeMs = 0.000000f;
346     float ratio = 0.000000f;
347     float thresholdDb = 0.000000f;
348     float kneeWidthDb = 0.000000f;
349     float noiseGateThresholdDb = 0.000000f;
350     float expanderRatio = 0.000000f;
351     float preGainDb = 0.000000f;
352     float postGainDb = 0.000000f;
353 
354     binder_status_t readFromParcel(const AParcel* parcel);
355     binder_status_t writeToParcel(AParcel* parcel) const;
356 
357     inline bool operator==(const MbcBandConfig& _rhs) const {
358       return std::tie(channel, band, enable, cutoffFrequencyHz, attackTimeMs, releaseTimeMs, ratio, thresholdDb, kneeWidthDb, noiseGateThresholdDb, expanderRatio, preGainDb, postGainDb) == std::tie(_rhs.channel, _rhs.band, _rhs.enable, _rhs.cutoffFrequencyHz, _rhs.attackTimeMs, _rhs.releaseTimeMs, _rhs.ratio, _rhs.thresholdDb, _rhs.kneeWidthDb, _rhs.noiseGateThresholdDb, _rhs.expanderRatio, _rhs.preGainDb, _rhs.postGainDb);
359     }
360     inline bool operator<(const MbcBandConfig& _rhs) const {
361       return std::tie(channel, band, enable, cutoffFrequencyHz, attackTimeMs, releaseTimeMs, ratio, thresholdDb, kneeWidthDb, noiseGateThresholdDb, expanderRatio, preGainDb, postGainDb) < std::tie(_rhs.channel, _rhs.band, _rhs.enable, _rhs.cutoffFrequencyHz, _rhs.attackTimeMs, _rhs.releaseTimeMs, _rhs.ratio, _rhs.thresholdDb, _rhs.kneeWidthDb, _rhs.noiseGateThresholdDb, _rhs.expanderRatio, _rhs.preGainDb, _rhs.postGainDb);
362     }
363     inline bool operator!=(const MbcBandConfig& _rhs) const {
364       return !(*this == _rhs);
365     }
366     inline bool operator>(const MbcBandConfig& _rhs) const {
367       return _rhs < *this;
368     }
369     inline bool operator>=(const MbcBandConfig& _rhs) const {
370       return !(*this < _rhs);
371     }
372     inline bool operator<=(const MbcBandConfig& _rhs) const {
373       return !(_rhs < *this);
374     }
375 
376     static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()377     inline std::string toString() const {
378       std::ostringstream _aidl_os;
379       _aidl_os << "MbcBandConfig{";
380       _aidl_os << "channel: " << ::android::internal::ToString(channel);
381       _aidl_os << ", band: " << ::android::internal::ToString(band);
382       _aidl_os << ", enable: " << ::android::internal::ToString(enable);
383       _aidl_os << ", cutoffFrequencyHz: " << ::android::internal::ToString(cutoffFrequencyHz);
384       _aidl_os << ", attackTimeMs: " << ::android::internal::ToString(attackTimeMs);
385       _aidl_os << ", releaseTimeMs: " << ::android::internal::ToString(releaseTimeMs);
386       _aidl_os << ", ratio: " << ::android::internal::ToString(ratio);
387       _aidl_os << ", thresholdDb: " << ::android::internal::ToString(thresholdDb);
388       _aidl_os << ", kneeWidthDb: " << ::android::internal::ToString(kneeWidthDb);
389       _aidl_os << ", noiseGateThresholdDb: " << ::android::internal::ToString(noiseGateThresholdDb);
390       _aidl_os << ", expanderRatio: " << ::android::internal::ToString(expanderRatio);
391       _aidl_os << ", preGainDb: " << ::android::internal::ToString(preGainDb);
392       _aidl_os << ", postGainDb: " << ::android::internal::ToString(postGainDb);
393       _aidl_os << "}";
394       return _aidl_os.str();
395     }
396   };
397   class LimiterConfig {
398   public:
399     typedef std::false_type fixed_size;
400     static const char* descriptor;
401 
402     int32_t channel = 0;
403     bool enable = false;
404     int32_t linkGroup = 0;
405     float attackTimeMs = 0.000000f;
406     float releaseTimeMs = 0.000000f;
407     float ratio = 0.000000f;
408     float thresholdDb = 0.000000f;
409     float postGainDb = 0.000000f;
410 
411     binder_status_t readFromParcel(const AParcel* parcel);
412     binder_status_t writeToParcel(AParcel* parcel) const;
413 
414     inline bool operator==(const LimiterConfig& _rhs) const {
415       return std::tie(channel, enable, linkGroup, attackTimeMs, releaseTimeMs, ratio, thresholdDb, postGainDb) == std::tie(_rhs.channel, _rhs.enable, _rhs.linkGroup, _rhs.attackTimeMs, _rhs.releaseTimeMs, _rhs.ratio, _rhs.thresholdDb, _rhs.postGainDb);
416     }
417     inline bool operator<(const LimiterConfig& _rhs) const {
418       return std::tie(channel, enable, linkGroup, attackTimeMs, releaseTimeMs, ratio, thresholdDb, postGainDb) < std::tie(_rhs.channel, _rhs.enable, _rhs.linkGroup, _rhs.attackTimeMs, _rhs.releaseTimeMs, _rhs.ratio, _rhs.thresholdDb, _rhs.postGainDb);
419     }
420     inline bool operator!=(const LimiterConfig& _rhs) const {
421       return !(*this == _rhs);
422     }
423     inline bool operator>(const LimiterConfig& _rhs) const {
424       return _rhs < *this;
425     }
426     inline bool operator>=(const LimiterConfig& _rhs) const {
427       return !(*this < _rhs);
428     }
429     inline bool operator<=(const LimiterConfig& _rhs) const {
430       return !(_rhs < *this);
431     }
432 
433     static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()434     inline std::string toString() const {
435       std::ostringstream _aidl_os;
436       _aidl_os << "LimiterConfig{";
437       _aidl_os << "channel: " << ::android::internal::ToString(channel);
438       _aidl_os << ", enable: " << ::android::internal::ToString(enable);
439       _aidl_os << ", linkGroup: " << ::android::internal::ToString(linkGroup);
440       _aidl_os << ", attackTimeMs: " << ::android::internal::ToString(attackTimeMs);
441       _aidl_os << ", releaseTimeMs: " << ::android::internal::ToString(releaseTimeMs);
442       _aidl_os << ", ratio: " << ::android::internal::ToString(ratio);
443       _aidl_os << ", thresholdDb: " << ::android::internal::ToString(thresholdDb);
444       _aidl_os << ", postGainDb: " << ::android::internal::ToString(postGainDb);
445       _aidl_os << "}";
446       return _aidl_os.str();
447     }
448   };
449   class InputGain {
450   public:
451     typedef std::false_type fixed_size;
452     static const char* descriptor;
453 
454     int32_t channel = 0;
455     float gainDb = 0.000000f;
456 
457     binder_status_t readFromParcel(const AParcel* parcel);
458     binder_status_t writeToParcel(AParcel* parcel) const;
459 
460     inline bool operator==(const InputGain& _rhs) const {
461       return std::tie(channel, gainDb) == std::tie(_rhs.channel, _rhs.gainDb);
462     }
463     inline bool operator<(const InputGain& _rhs) const {
464       return std::tie(channel, gainDb) < std::tie(_rhs.channel, _rhs.gainDb);
465     }
466     inline bool operator!=(const InputGain& _rhs) const {
467       return !(*this == _rhs);
468     }
469     inline bool operator>(const InputGain& _rhs) const {
470       return _rhs < *this;
471     }
472     inline bool operator>=(const InputGain& _rhs) const {
473       return !(*this < _rhs);
474     }
475     inline bool operator<=(const InputGain& _rhs) const {
476       return !(_rhs < *this);
477     }
478 
479     static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()480     inline std::string toString() const {
481       std::ostringstream _aidl_os;
482       _aidl_os << "InputGain{";
483       _aidl_os << "channel: " << ::android::internal::ToString(channel);
484       _aidl_os << ", gainDb: " << ::android::internal::ToString(gainDb);
485       _aidl_os << "}";
486       return _aidl_os.str();
487     }
488   };
489   // Expose tag symbols for legacy code
490   static const inline Tag vendor = Tag::vendor;
491   static const inline Tag engineArchitecture = Tag::engineArchitecture;
492   static const inline Tag preEq = Tag::preEq;
493   static const inline Tag postEq = Tag::postEq;
494   static const inline Tag preEqBand = Tag::preEqBand;
495   static const inline Tag postEqBand = Tag::postEqBand;
496   static const inline Tag mbc = Tag::mbc;
497   static const inline Tag mbcBand = Tag::mbcBand;
498   static const inline Tag limiter = Tag::limiter;
499   static const inline Tag inputGain = Tag::inputGain;
500 
501   template<typename _Tp>
502   static constexpr bool _not_self = !std::is_same_v<std::remove_cv_t<std::remove_reference_t<_Tp>>, DynamicsProcessing>;
503 
DynamicsProcessing()504   DynamicsProcessing() : _value(std::in_place_index<static_cast<size_t>(vendor)>, ::aidl::android::hardware::audio::effect::VendorExtension()) { }
505 
506   template <typename _Tp, typename = std::enable_if_t<_not_self<_Tp>>>
507   // NOLINTNEXTLINE(google-explicit-constructor)
DynamicsProcessing(_Tp && _arg)508   constexpr DynamicsProcessing(_Tp&& _arg)
509       : _value(std::forward<_Tp>(_arg)) {}
510 
511   template <size_t _Np, typename... _Tp>
DynamicsProcessing(std::in_place_index_t<_Np>,_Tp &&..._args)512   constexpr explicit DynamicsProcessing(std::in_place_index_t<_Np>, _Tp&&... _args)
513       : _value(std::in_place_index<_Np>, std::forward<_Tp>(_args)...) {}
514 
515   template <Tag _tag, typename... _Tp>
make(_Tp &&..._args)516   static DynamicsProcessing make(_Tp&&... _args) {
517     return DynamicsProcessing(std::in_place_index<static_cast<size_t>(_tag)>, std::forward<_Tp>(_args)...);
518   }
519 
520   template <Tag _tag, typename _Tp, typename... _Up>
make(std::initializer_list<_Tp> _il,_Up &&..._args)521   static DynamicsProcessing make(std::initializer_list<_Tp> _il, _Up&&... _args) {
522     return DynamicsProcessing(std::in_place_index<static_cast<size_t>(_tag)>, std::move(_il), std::forward<_Up>(_args)...);
523   }
524 
getTag()525   Tag getTag() const {
526     return static_cast<Tag>(_value.index());
527   }
528 
529   template <Tag _tag>
get()530   const auto& get() const {
531     if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); }
532     return std::get<static_cast<size_t>(_tag)>(_value);
533   }
534 
535   template <Tag _tag>
get()536   auto& get() {
537     if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); }
538     return std::get<static_cast<size_t>(_tag)>(_value);
539   }
540 
541   template <Tag _tag, typename... _Tp>
set(_Tp &&..._args)542   void set(_Tp&&... _args) {
543     _value.emplace<static_cast<size_t>(_tag)>(std::forward<_Tp>(_args)...);
544   }
545 
546   binder_status_t readFromParcel(const AParcel* _parcel);
547   binder_status_t writeToParcel(AParcel* _parcel) const;
548 
549   inline bool operator==(const DynamicsProcessing& _rhs) const {
550     return _value == _rhs._value;
551   }
552   inline bool operator<(const DynamicsProcessing& _rhs) const {
553     return _value < _rhs._value;
554   }
555   inline bool operator!=(const DynamicsProcessing& _rhs) const {
556     return !(*this == _rhs);
557   }
558   inline bool operator>(const DynamicsProcessing& _rhs) const {
559     return _rhs < *this;
560   }
561   inline bool operator>=(const DynamicsProcessing& _rhs) const {
562     return !(*this < _rhs);
563   }
564   inline bool operator<=(const DynamicsProcessing& _rhs) const {
565     return !(_rhs < *this);
566   }
567 
568   static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF;
toString()569   inline std::string toString() const {
570     std::ostringstream os;
571     os << "DynamicsProcessing{";
572     switch (getTag()) {
573     case vendor: os << "vendor: " << ::android::internal::ToString(get<vendor>()); break;
574     case engineArchitecture: os << "engineArchitecture: " << ::android::internal::ToString(get<engineArchitecture>()); break;
575     case preEq: os << "preEq: " << ::android::internal::ToString(get<preEq>()); break;
576     case postEq: os << "postEq: " << ::android::internal::ToString(get<postEq>()); break;
577     case preEqBand: os << "preEqBand: " << ::android::internal::ToString(get<preEqBand>()); break;
578     case postEqBand: os << "postEqBand: " << ::android::internal::ToString(get<postEqBand>()); break;
579     case mbc: os << "mbc: " << ::android::internal::ToString(get<mbc>()); break;
580     case mbcBand: os << "mbcBand: " << ::android::internal::ToString(get<mbcBand>()); break;
581     case limiter: os << "limiter: " << ::android::internal::ToString(get<limiter>()); break;
582     case inputGain: os << "inputGain: " << ::android::internal::ToString(get<inputGain>()); break;
583     }
584     os << "}";
585     return os.str();
586   }
587 private:
588   std::variant<::aidl::android::hardware::audio::effect::VendorExtension, ::aidl::android::hardware::audio::effect::DynamicsProcessing::EngineArchitecture, std::vector<::aidl::android::hardware::audio::effect::DynamicsProcessing::ChannelConfig>, std::vector<::aidl::android::hardware::audio::effect::DynamicsProcessing::ChannelConfig>, std::vector<::aidl::android::hardware::audio::effect::DynamicsProcessing::EqBandConfig>, std::vector<::aidl::android::hardware::audio::effect::DynamicsProcessing::EqBandConfig>, std::vector<::aidl::android::hardware::audio::effect::DynamicsProcessing::ChannelConfig>, std::vector<::aidl::android::hardware::audio::effect::DynamicsProcessing::MbcBandConfig>, std::vector<::aidl::android::hardware::audio::effect::DynamicsProcessing::LimiterConfig>, std::vector<::aidl::android::hardware::audio::effect::DynamicsProcessing::InputGain>> _value;
589 };
590 }  // namespace effect
591 }  // namespace audio
592 }  // namespace hardware
593 }  // namespace android
594 }  // namespace aidl
595 namespace aidl {
596 namespace android {
597 namespace hardware {
598 namespace audio {
599 namespace effect {
toString(DynamicsProcessing::Id::Tag val)600 [[nodiscard]] static inline std::string toString(DynamicsProcessing::Id::Tag val) {
601   switch(val) {
602   case DynamicsProcessing::Id::Tag::vendorExtensionTag:
603     return "vendorExtensionTag";
604   case DynamicsProcessing::Id::Tag::commonTag:
605     return "commonTag";
606   default:
607     return std::to_string(static_cast<int32_t>(val));
608   }
609 }
610 }  // namespace effect
611 }  // namespace audio
612 }  // namespace hardware
613 }  // namespace android
614 }  // namespace aidl
615 namespace ndk {
616 namespace internal {
617 #pragma clang diagnostic push
618 #pragma clang diagnostic ignored "-Wc++17-extensions"
619 template <>
620 constexpr inline std::array<aidl::android::hardware::audio::effect::DynamicsProcessing::Id::Tag, 2> enum_values<aidl::android::hardware::audio::effect::DynamicsProcessing::Id::Tag> = {
621   aidl::android::hardware::audio::effect::DynamicsProcessing::Id::Tag::vendorExtensionTag,
622   aidl::android::hardware::audio::effect::DynamicsProcessing::Id::Tag::commonTag,
623 };
624 #pragma clang diagnostic pop
625 }  // namespace internal
626 }  // namespace ndk
627 namespace aidl {
628 namespace android {
629 namespace hardware {
630 namespace audio {
631 namespace effect {
toString(DynamicsProcessing::ResolutionPreference val)632 [[nodiscard]] static inline std::string toString(DynamicsProcessing::ResolutionPreference val) {
633   switch(val) {
634   case DynamicsProcessing::ResolutionPreference::FAVOR_FREQUENCY_RESOLUTION:
635     return "FAVOR_FREQUENCY_RESOLUTION";
636   case DynamicsProcessing::ResolutionPreference::FAVOR_TIME_RESOLUTION:
637     return "FAVOR_TIME_RESOLUTION";
638   default:
639     return std::to_string(static_cast<int8_t>(val));
640   }
641 }
642 }  // namespace effect
643 }  // namespace audio
644 }  // namespace hardware
645 }  // namespace android
646 }  // namespace aidl
647 namespace ndk {
648 namespace internal {
649 #pragma clang diagnostic push
650 #pragma clang diagnostic ignored "-Wc++17-extensions"
651 template <>
652 constexpr inline std::array<aidl::android::hardware::audio::effect::DynamicsProcessing::ResolutionPreference, 2> enum_values<aidl::android::hardware::audio::effect::DynamicsProcessing::ResolutionPreference> = {
653   aidl::android::hardware::audio::effect::DynamicsProcessing::ResolutionPreference::FAVOR_FREQUENCY_RESOLUTION,
654   aidl::android::hardware::audio::effect::DynamicsProcessing::ResolutionPreference::FAVOR_TIME_RESOLUTION,
655 };
656 #pragma clang diagnostic pop
657 }  // namespace internal
658 }  // namespace ndk
659 namespace aidl {
660 namespace android {
661 namespace hardware {
662 namespace audio {
663 namespace effect {
toString(DynamicsProcessing::Tag val)664 [[nodiscard]] static inline std::string toString(DynamicsProcessing::Tag val) {
665   switch(val) {
666   case DynamicsProcessing::Tag::vendor:
667     return "vendor";
668   case DynamicsProcessing::Tag::engineArchitecture:
669     return "engineArchitecture";
670   case DynamicsProcessing::Tag::preEq:
671     return "preEq";
672   case DynamicsProcessing::Tag::postEq:
673     return "postEq";
674   case DynamicsProcessing::Tag::preEqBand:
675     return "preEqBand";
676   case DynamicsProcessing::Tag::postEqBand:
677     return "postEqBand";
678   case DynamicsProcessing::Tag::mbc:
679     return "mbc";
680   case DynamicsProcessing::Tag::mbcBand:
681     return "mbcBand";
682   case DynamicsProcessing::Tag::limiter:
683     return "limiter";
684   case DynamicsProcessing::Tag::inputGain:
685     return "inputGain";
686   default:
687     return std::to_string(static_cast<int32_t>(val));
688   }
689 }
690 }  // namespace effect
691 }  // namespace audio
692 }  // namespace hardware
693 }  // namespace android
694 }  // namespace aidl
695 namespace ndk {
696 namespace internal {
697 #pragma clang diagnostic push
698 #pragma clang diagnostic ignored "-Wc++17-extensions"
699 template <>
700 constexpr inline std::array<aidl::android::hardware::audio::effect::DynamicsProcessing::Tag, 10> enum_values<aidl::android::hardware::audio::effect::DynamicsProcessing::Tag> = {
701   aidl::android::hardware::audio::effect::DynamicsProcessing::Tag::vendor,
702   aidl::android::hardware::audio::effect::DynamicsProcessing::Tag::engineArchitecture,
703   aidl::android::hardware::audio::effect::DynamicsProcessing::Tag::preEq,
704   aidl::android::hardware::audio::effect::DynamicsProcessing::Tag::postEq,
705   aidl::android::hardware::audio::effect::DynamicsProcessing::Tag::preEqBand,
706   aidl::android::hardware::audio::effect::DynamicsProcessing::Tag::postEqBand,
707   aidl::android::hardware::audio::effect::DynamicsProcessing::Tag::mbc,
708   aidl::android::hardware::audio::effect::DynamicsProcessing::Tag::mbcBand,
709   aidl::android::hardware::audio::effect::DynamicsProcessing::Tag::limiter,
710   aidl::android::hardware::audio::effect::DynamicsProcessing::Tag::inputGain,
711 };
712 #pragma clang diagnostic pop
713 }  // namespace internal
714 }  // namespace ndk
715