mirror of
https://github.com/AndroidAudioMods/ViPERFX_RE.git
synced 2025-06-08 02:29:40 +08:00
266 lines
12 KiB
C++
266 lines
12 KiB
C++
![]() |
/*
|
||
|
* This file is auto-generated. DO NOT MODIFY.
|
||
|
* Using: /home/iscle/Android/Sdk/build-tools/35.0.1/aidl --lang=ndk -o generated -h generated/include --structured --stability=vintf --min_sdk_version=31 -I hardware_interfaces/common/aidl/aidl_api/android.hardware.common/current/ -I hardware_interfaces/common/fmq/aidl/aidl_api/android.hardware.common.fmq/current/ -I hardware_interfaces/audio/aidl/aidl_api/android.hardware.audio.common/current/ -I hardware_interfaces/audio/aidl/aidl_api/android.hardware.audio.effect/current/ -I system_hardware_interfaces/media/aidl_api/android.media.audio.common.types/current/ -I system_hardware_interfaces/media/aidl_api/android.media.audio.eraser.types/current/ hardware_interfaces/audio/aidl/aidl_api/android.hardware.audio.effect/current/android/hardware/audio/effect/Virtualizer.aidl
|
||
|
*/
|
||
|
#include "aidl/android/hardware/audio/effect/Virtualizer.h"
|
||
|
|
||
|
#include <android/binder_parcel_utils.h>
|
||
|
|
||
|
namespace aidl {
|
||
|
namespace android {
|
||
|
namespace hardware {
|
||
|
namespace audio {
|
||
|
namespace effect {
|
||
|
const char* Virtualizer::descriptor = "android.hardware.audio.effect.Virtualizer";
|
||
|
|
||
|
binder_status_t Virtualizer::readFromParcel(const AParcel* _parcel) {
|
||
|
binder_status_t _aidl_ret_status;
|
||
|
int32_t _aidl_tag;
|
||
|
if ((_aidl_ret_status = ::ndk::AParcel_readData(_parcel, &_aidl_tag)) != STATUS_OK) return _aidl_ret_status;
|
||
|
switch (static_cast<Tag>(_aidl_tag)) {
|
||
|
case vendor: {
|
||
|
::aidl::android::hardware::audio::effect::VendorExtension _aidl_value;
|
||
|
if ((_aidl_ret_status = ::ndk::AParcel_readData(_parcel, &_aidl_value)) != STATUS_OK) return _aidl_ret_status;
|
||
|
if constexpr (std::is_trivially_copyable_v<::aidl::android::hardware::audio::effect::VendorExtension>) {
|
||
|
set<vendor>(_aidl_value);
|
||
|
} else {
|
||
|
// NOLINTNEXTLINE(performance-move-const-arg)
|
||
|
set<vendor>(std::move(_aidl_value));
|
||
|
}
|
||
|
return STATUS_OK; }
|
||
|
case strengthPm: {
|
||
|
int32_t _aidl_value;
|
||
|
if ((_aidl_ret_status = ::ndk::AParcel_readData(_parcel, &_aidl_value)) != STATUS_OK) return _aidl_ret_status;
|
||
|
if constexpr (std::is_trivially_copyable_v<int32_t>) {
|
||
|
set<strengthPm>(_aidl_value);
|
||
|
} else {
|
||
|
// NOLINTNEXTLINE(performance-move-const-arg)
|
||
|
set<strengthPm>(std::move(_aidl_value));
|
||
|
}
|
||
|
return STATUS_OK; }
|
||
|
case speakerAngles: {
|
||
|
std::vector<::aidl::android::hardware::audio::effect::Virtualizer::ChannelAngle> _aidl_value;
|
||
|
if ((_aidl_ret_status = ::ndk::AParcel_readData(_parcel, &_aidl_value)) != STATUS_OK) return _aidl_ret_status;
|
||
|
if constexpr (std::is_trivially_copyable_v<std::vector<::aidl::android::hardware::audio::effect::Virtualizer::ChannelAngle>>) {
|
||
|
set<speakerAngles>(_aidl_value);
|
||
|
} else {
|
||
|
// NOLINTNEXTLINE(performance-move-const-arg)
|
||
|
set<speakerAngles>(std::move(_aidl_value));
|
||
|
}
|
||
|
return STATUS_OK; }
|
||
|
case device: {
|
||
|
::aidl::android::media::audio::common::AudioDeviceDescription _aidl_value;
|
||
|
if ((_aidl_ret_status = ::ndk::AParcel_readData(_parcel, &_aidl_value)) != STATUS_OK) return _aidl_ret_status;
|
||
|
if constexpr (std::is_trivially_copyable_v<::aidl::android::media::audio::common::AudioDeviceDescription>) {
|
||
|
set<device>(_aidl_value);
|
||
|
} else {
|
||
|
// NOLINTNEXTLINE(performance-move-const-arg)
|
||
|
set<device>(std::move(_aidl_value));
|
||
|
}
|
||
|
return STATUS_OK; }
|
||
|
}
|
||
|
return STATUS_BAD_VALUE;
|
||
|
}
|
||
|
binder_status_t Virtualizer::writeToParcel(AParcel* _parcel) const {
|
||
|
binder_status_t _aidl_ret_status = ::ndk::AParcel_writeData(_parcel, static_cast<int32_t>(getTag()));
|
||
|
if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
|
||
|
switch (getTag()) {
|
||
|
case vendor: return ::ndk::AParcel_writeData(_parcel, get<vendor>());
|
||
|
case strengthPm: return ::ndk::AParcel_writeData(_parcel, get<strengthPm>());
|
||
|
case speakerAngles: return ::ndk::AParcel_writeData(_parcel, get<speakerAngles>());
|
||
|
case device: return ::ndk::AParcel_writeData(_parcel, get<device>());
|
||
|
}
|
||
|
__assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "can't reach here");
|
||
|
}
|
||
|
|
||
|
} // namespace effect
|
||
|
} // namespace audio
|
||
|
} // namespace hardware
|
||
|
} // namespace android
|
||
|
} // namespace aidl
|
||
|
namespace aidl {
|
||
|
namespace android {
|
||
|
namespace hardware {
|
||
|
namespace audio {
|
||
|
namespace effect {
|
||
|
const char* Virtualizer::Id::descriptor = "android.hardware.audio.effect.Virtualizer.Id";
|
||
|
|
||
|
binder_status_t Virtualizer::Id::readFromParcel(const AParcel* _parcel) {
|
||
|
binder_status_t _aidl_ret_status;
|
||
|
int32_t _aidl_tag;
|
||
|
if ((_aidl_ret_status = ::ndk::AParcel_readData(_parcel, &_aidl_tag)) != STATUS_OK) return _aidl_ret_status;
|
||
|
switch (static_cast<Tag>(_aidl_tag)) {
|
||
|
case vendorExtensionTag: {
|
||
|
::aidl::android::hardware::audio::effect::VendorExtension _aidl_value;
|
||
|
if ((_aidl_ret_status = ::ndk::AParcel_readData(_parcel, &_aidl_value)) != STATUS_OK) return _aidl_ret_status;
|
||
|
if constexpr (std::is_trivially_copyable_v<::aidl::android::hardware::audio::effect::VendorExtension>) {
|
||
|
set<vendorExtensionTag>(_aidl_value);
|
||
|
} else {
|
||
|
// NOLINTNEXTLINE(performance-move-const-arg)
|
||
|
set<vendorExtensionTag>(std::move(_aidl_value));
|
||
|
}
|
||
|
return STATUS_OK; }
|
||
|
case commonTag: {
|
||
|
::aidl::android::hardware::audio::effect::Virtualizer::Tag _aidl_value;
|
||
|
if ((_aidl_ret_status = ::ndk::AParcel_readData(_parcel, &_aidl_value)) != STATUS_OK) return _aidl_ret_status;
|
||
|
if constexpr (std::is_trivially_copyable_v<::aidl::android::hardware::audio::effect::Virtualizer::Tag>) {
|
||
|
set<commonTag>(_aidl_value);
|
||
|
} else {
|
||
|
// NOLINTNEXTLINE(performance-move-const-arg)
|
||
|
set<commonTag>(std::move(_aidl_value));
|
||
|
}
|
||
|
return STATUS_OK; }
|
||
|
case speakerAnglesPayload: {
|
||
|
::aidl::android::hardware::audio::effect::Virtualizer::SpeakerAnglesPayload _aidl_value;
|
||
|
if ((_aidl_ret_status = ::ndk::AParcel_readData(_parcel, &_aidl_value)) != STATUS_OK) return _aidl_ret_status;
|
||
|
if constexpr (std::is_trivially_copyable_v<::aidl::android::hardware::audio::effect::Virtualizer::SpeakerAnglesPayload>) {
|
||
|
set<speakerAnglesPayload>(_aidl_value);
|
||
|
} else {
|
||
|
// NOLINTNEXTLINE(performance-move-const-arg)
|
||
|
set<speakerAnglesPayload>(std::move(_aidl_value));
|
||
|
}
|
||
|
return STATUS_OK; }
|
||
|
}
|
||
|
return STATUS_BAD_VALUE;
|
||
|
}
|
||
|
binder_status_t Virtualizer::Id::writeToParcel(AParcel* _parcel) const {
|
||
|
binder_status_t _aidl_ret_status = ::ndk::AParcel_writeData(_parcel, static_cast<int32_t>(getTag()));
|
||
|
if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
|
||
|
switch (getTag()) {
|
||
|
case vendorExtensionTag: return ::ndk::AParcel_writeData(_parcel, get<vendorExtensionTag>());
|
||
|
case commonTag: return ::ndk::AParcel_writeData(_parcel, get<commonTag>());
|
||
|
case speakerAnglesPayload: return ::ndk::AParcel_writeData(_parcel, get<speakerAnglesPayload>());
|
||
|
}
|
||
|
__assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "can't reach here");
|
||
|
}
|
||
|
|
||
|
} // namespace effect
|
||
|
} // namespace audio
|
||
|
} // namespace hardware
|
||
|
} // namespace android
|
||
|
} // namespace aidl
|
||
|
namespace aidl {
|
||
|
namespace android {
|
||
|
namespace hardware {
|
||
|
namespace audio {
|
||
|
namespace effect {
|
||
|
const char* Virtualizer::SpeakerAnglesPayload::descriptor = "android.hardware.audio.effect.Virtualizer.SpeakerAnglesPayload";
|
||
|
|
||
|
binder_status_t Virtualizer::SpeakerAnglesPayload::readFromParcel(const AParcel* _aidl_parcel) {
|
||
|
binder_status_t _aidl_ret_status = STATUS_OK;
|
||
|
int32_t _aidl_start_pos = AParcel_getDataPosition(_aidl_parcel);
|
||
|
int32_t _aidl_parcelable_size = 0;
|
||
|
_aidl_ret_status = AParcel_readInt32(_aidl_parcel, &_aidl_parcelable_size);
|
||
|
if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
|
||
|
|
||
|
if (_aidl_parcelable_size < 4) return STATUS_BAD_VALUE;
|
||
|
if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return STATUS_BAD_VALUE;
|
||
|
if (AParcel_getDataPosition(_aidl_parcel) - _aidl_start_pos >= _aidl_parcelable_size) {
|
||
|
AParcel_setDataPosition(_aidl_parcel, _aidl_start_pos + _aidl_parcelable_size);
|
||
|
return _aidl_ret_status;
|
||
|
}
|
||
|
_aidl_ret_status = ::ndk::AParcel_readData(_aidl_parcel, &layout);
|
||
|
if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
|
||
|
|
||
|
if (AParcel_getDataPosition(_aidl_parcel) - _aidl_start_pos >= _aidl_parcelable_size) {
|
||
|
AParcel_setDataPosition(_aidl_parcel, _aidl_start_pos + _aidl_parcelable_size);
|
||
|
return _aidl_ret_status;
|
||
|
}
|
||
|
_aidl_ret_status = ::ndk::AParcel_readData(_aidl_parcel, &device);
|
||
|
if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
|
||
|
|
||
|
AParcel_setDataPosition(_aidl_parcel, _aidl_start_pos + _aidl_parcelable_size);
|
||
|
return _aidl_ret_status;
|
||
|
}
|
||
|
binder_status_t Virtualizer::SpeakerAnglesPayload::writeToParcel(AParcel* _aidl_parcel) const {
|
||
|
binder_status_t _aidl_ret_status;
|
||
|
size_t _aidl_start_pos = AParcel_getDataPosition(_aidl_parcel);
|
||
|
_aidl_ret_status = AParcel_writeInt32(_aidl_parcel, 0);
|
||
|
if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
|
||
|
|
||
|
_aidl_ret_status = ::ndk::AParcel_writeData(_aidl_parcel, layout);
|
||
|
if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
|
||
|
|
||
|
_aidl_ret_status = ::ndk::AParcel_writeData(_aidl_parcel, device);
|
||
|
if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
|
||
|
|
||
|
size_t _aidl_end_pos = AParcel_getDataPosition(_aidl_parcel);
|
||
|
AParcel_setDataPosition(_aidl_parcel, _aidl_start_pos);
|
||
|
AParcel_writeInt32(_aidl_parcel, _aidl_end_pos - _aidl_start_pos);
|
||
|
AParcel_setDataPosition(_aidl_parcel, _aidl_end_pos);
|
||
|
return _aidl_ret_status;
|
||
|
}
|
||
|
|
||
|
} // namespace effect
|
||
|
} // namespace audio
|
||
|
} // namespace hardware
|
||
|
} // namespace android
|
||
|
} // namespace aidl
|
||
|
namespace aidl {
|
||
|
namespace android {
|
||
|
namespace hardware {
|
||
|
namespace audio {
|
||
|
namespace effect {
|
||
|
const char* Virtualizer::ChannelAngle::descriptor = "android.hardware.audio.effect.Virtualizer.ChannelAngle";
|
||
|
|
||
|
binder_status_t Virtualizer::ChannelAngle::readFromParcel(const AParcel* _aidl_parcel) {
|
||
|
binder_status_t _aidl_ret_status = STATUS_OK;
|
||
|
int32_t _aidl_start_pos = AParcel_getDataPosition(_aidl_parcel);
|
||
|
int32_t _aidl_parcelable_size = 0;
|
||
|
_aidl_ret_status = AParcel_readInt32(_aidl_parcel, &_aidl_parcelable_size);
|
||
|
if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
|
||
|
|
||
|
if (_aidl_parcelable_size < 4) return STATUS_BAD_VALUE;
|
||
|
if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return STATUS_BAD_VALUE;
|
||
|
if (AParcel_getDataPosition(_aidl_parcel) - _aidl_start_pos >= _aidl_parcelable_size) {
|
||
|
AParcel_setDataPosition(_aidl_parcel, _aidl_start_pos + _aidl_parcelable_size);
|
||
|
return _aidl_ret_status;
|
||
|
}
|
||
|
_aidl_ret_status = ::ndk::AParcel_readData(_aidl_parcel, &channel);
|
||
|
if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
|
||
|
|
||
|
if (AParcel_getDataPosition(_aidl_parcel) - _aidl_start_pos >= _aidl_parcelable_size) {
|
||
|
AParcel_setDataPosition(_aidl_parcel, _aidl_start_pos + _aidl_parcelable_size);
|
||
|
return _aidl_ret_status;
|
||
|
}
|
||
|
_aidl_ret_status = ::ndk::AParcel_readData(_aidl_parcel, &azimuthDegree);
|
||
|
if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
|
||
|
|
||
|
if (AParcel_getDataPosition(_aidl_parcel) - _aidl_start_pos >= _aidl_parcelable_size) {
|
||
|
AParcel_setDataPosition(_aidl_parcel, _aidl_start_pos + _aidl_parcelable_size);
|
||
|
return _aidl_ret_status;
|
||
|
}
|
||
|
_aidl_ret_status = ::ndk::AParcel_readData(_aidl_parcel, &elevationDegree);
|
||
|
if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
|
||
|
|
||
|
AParcel_setDataPosition(_aidl_parcel, _aidl_start_pos + _aidl_parcelable_size);
|
||
|
return _aidl_ret_status;
|
||
|
}
|
||
|
binder_status_t Virtualizer::ChannelAngle::writeToParcel(AParcel* _aidl_parcel) const {
|
||
|
binder_status_t _aidl_ret_status;
|
||
|
size_t _aidl_start_pos = AParcel_getDataPosition(_aidl_parcel);
|
||
|
_aidl_ret_status = AParcel_writeInt32(_aidl_parcel, 0);
|
||
|
if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
|
||
|
|
||
|
_aidl_ret_status = ::ndk::AParcel_writeData(_aidl_parcel, channel);
|
||
|
if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
|
||
|
|
||
|
_aidl_ret_status = ::ndk::AParcel_writeData(_aidl_parcel, azimuthDegree);
|
||
|
if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
|
||
|
|
||
|
_aidl_ret_status = ::ndk::AParcel_writeData(_aidl_parcel, elevationDegree);
|
||
|
if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
|
||
|
|
||
|
size_t _aidl_end_pos = AParcel_getDataPosition(_aidl_parcel);
|
||
|
AParcel_setDataPosition(_aidl_parcel, _aidl_start_pos);
|
||
|
AParcel_writeInt32(_aidl_parcel, _aidl_end_pos - _aidl_start_pos);
|
||
|
AParcel_setDataPosition(_aidl_parcel, _aidl_end_pos);
|
||
|
return _aidl_ret_status;
|
||
|
}
|
||
|
|
||
|
} // namespace effect
|
||
|
} // namespace audio
|
||
|
} // namespace hardware
|
||
|
} // namespace android
|
||
|
} // namespace aidl
|