From f8dc8dc5f6bc8840214e164c9d4747e4b7bf3b25 Mon Sep 17 00:00:00 2001 From: "ajm@google.com" Date: Fri, 29 Jul 2011 17:29:08 +0000 Subject: [PATCH] Generate protobuf classes at build-time. This method is well-established in Chromium. The new code is largely boilerplate copied from there. The advantage is that we don't have to maintain various versions of the classes; we just generate against whatever compiler version happens to exist at build-time. Review URL: http://webrtc-codereview.appspot.com/93008 git-svn-id: http://webrtc.googlecode.com/svn/trunk@271 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../audio_processing/main/apm_tests.gyp | 50 +- .../audio_processing/main/source/apm.gyp | 6 +- .../unit_test/audio_processing_unittest.pb.cc | 1369 ----------------- .../unit_test/audio_processing_unittest.pb.h | 1061 ------------- 4 files changed, 48 insertions(+), 2438 deletions(-) delete mode 100644 src/modules/audio_processing/main/test/unit_test/audio_processing_unittest.pb.cc delete mode 100644 src/modules/audio_processing/main/test/unit_test/audio_processing_unittest.pb.h diff --git a/src/modules/audio_processing/main/apm_tests.gyp b/src/modules/audio_processing/main/apm_tests.gyp index 14cebbf39..10c1ae96e 100644 --- a/src/modules/audio_processing/main/apm_tests.gyp +++ b/src/modules/audio_processing/main/apm_tests.gyp @@ -10,6 +10,9 @@ 'includes': [ '../../../common_settings.gypi', ], + 'variables': { + 'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out', + }, 'targets': [ { 'target_name': 'unit_test', @@ -22,30 +25,67 @@ }], ], 'dependencies': [ + 'apm_unittest_proto', 'source/apm.gyp:audio_processing', - '../../../system_wrappers/source/system_wrappers.gyp:system_wrappers', '../../../common_audio/signal_processing_library/main/source/spl.gyp:spl', - + '../../../system_wrappers/source/system_wrappers.gyp:system_wrappers', '../../../../testing/gtest.gyp:gtest', '../../../../testing/gtest.gyp:gtest_main', '../../../../third_party/protobuf/protobuf.gyp:protobuf_lite', ], 'include_dirs': [ '../../../../testing/gtest/include', + '<(protoc_out_dir)', ], 'sources': [ 'test/unit_test/unit_test.cc', - 'test/unit_test/audio_processing_unittest.pb.cc', - 'test/unit_test/audio_processing_unittest.pb.h', + '<(protoc_out_dir)/audio_processing_unittest.pb.cc', + '<(protoc_out_dir)/audio_processing_unittest.pb.h', ], }, + { + # Protobuf compiler / generate rule for unit_test + 'target_name': 'apm_unittest_proto', + 'type': 'none', + 'variables': { + 'proto_relpath': 'test/unit_test', + }, + 'sources': [ + '<(proto_relpath)/audio_processing_unittest.proto', + ], + 'rules': [ + { + 'rule_name': 'genproto', + 'extension': 'proto', + 'inputs': [ + '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', + ], + 'outputs': [ + '<(protoc_out_dir)/<(RULE_INPUT_ROOT).pb.cc', + '<(protoc_out_dir)/<(RULE_INPUT_ROOT).pb.h', + ], + 'action': [ + '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', + '--proto_path=<(proto_relpath)', + '<(proto_relpath)/<(RULE_INPUT_NAME)', + '--cpp_out=<(protoc_out_dir)', + ], + 'message': 'Generating C++ code from <(RULE_INPUT_PATH)', + }, + ], + 'dependencies': [ + '../../../../third_party/protobuf/protobuf.gyp:protoc#host', + ], + # This target exports a hard dependency because it generates header + # files. + 'hard_dependency': 1, + }, { 'target_name': 'process_test', 'type': 'executable', 'dependencies': [ 'source/apm.gyp:audio_processing', '../../../system_wrappers/source/system_wrappers.gyp:system_wrappers', - '../../../../testing/gtest.gyp:gtest', '../../../../testing/gtest.gyp:gtest_main', ], diff --git a/src/modules/audio_processing/main/source/apm.gyp b/src/modules/audio_processing/main/source/apm.gyp index 93811c71f..8f94474ad 100644 --- a/src/modules/audio_processing/main/source/apm.gyp +++ b/src/modules/audio_processing/main/source/apm.gyp @@ -8,7 +8,7 @@ { 'includes': [ - '../../../../common_settings.gypi', # Common settings + '../../../../common_settings.gypi', ], 'targets': [ { @@ -18,18 +18,18 @@ ['prefer_fixed_point==1', { 'dependencies': ['../../ns/main/source/ns.gyp:ns_fix'], 'defines': ['WEBRTC_NS_FIXED'], - }, { # else: prefer_fixed_point==0 + }, { 'dependencies': ['../../ns/main/source/ns.gyp:ns'], 'defines': ['WEBRTC_NS_FLOAT'], }], ], 'dependencies': [ - '../../../../system_wrappers/source/system_wrappers.gyp:system_wrappers', '../../aec/main/source/aec.gyp:aec', '../../aecm/main/source/aecm.gyp:aecm', '../../agc/main/source/agc.gyp:agc', '../../../../common_audio/signal_processing_library/main/source/spl.gyp:spl', '../../../../common_audio/vad/main/source/vad.gyp:vad', + '../../../../system_wrappers/source/system_wrappers.gyp:system_wrappers', ], 'include_dirs': [ '../interface', diff --git a/src/modules/audio_processing/main/test/unit_test/audio_processing_unittest.pb.cc b/src/modules/audio_processing/main/test/unit_test/audio_processing_unittest.pb.cc deleted file mode 100644 index 437acda89..000000000 --- a/src/modules/audio_processing/main/test/unit_test/audio_processing_unittest.pb.cc +++ /dev/null @@ -1,1369 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! - -#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION -#include "audio_processing_unittest.pb.h" - -#include - -#include -#include -#include -// @@protoc_insertion_point(includes) - -namespace audio_processing_unittest { - -void protobuf_ShutdownFile_audio_5fprocessing_5funittest_2eproto() { - delete Test::default_instance_; - delete Test_Frame::default_instance_; - delete Test_Statistic::default_instance_; - delete Test_EchoMetrics::default_instance_; - delete OutputData::default_instance_; -} - -void protobuf_AddDesc_audio_5fprocessing_5funittest_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; - GOOGLE_PROTOBUF_VERIFY_VERSION; - - Test::default_instance_ = new Test(); - Test_Frame::default_instance_ = new Test_Frame(); - Test_Statistic::default_instance_ = new Test_Statistic(); - Test_EchoMetrics::default_instance_ = new Test_EchoMetrics(); - OutputData::default_instance_ = new OutputData(); - Test::default_instance_->InitAsDefaultInstance(); - Test_Frame::default_instance_->InitAsDefaultInstance(); - Test_Statistic::default_instance_->InitAsDefaultInstance(); - Test_EchoMetrics::default_instance_->InitAsDefaultInstance(); - OutputData::default_instance_->InitAsDefaultInstance(); - ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_audio_5fprocessing_5funittest_2eproto); -} - -// Force AddDescriptors() to be called at static initialization time. -struct StaticDescriptorInitializer_audio_5fprocessing_5funittest_2eproto { - StaticDescriptorInitializer_audio_5fprocessing_5funittest_2eproto() { - protobuf_AddDesc_audio_5fprocessing_5funittest_2eproto(); - } -} static_descriptor_initializer_audio_5fprocessing_5funittest_2eproto_; - - -// =================================================================== - -#ifndef _MSC_VER -#endif // !_MSC_VER - -Test_Frame::Test_Frame() - : ::google::protobuf::MessageLite() { - SharedCtor(); -} - -void Test_Frame::InitAsDefaultInstance() { -} - -Test_Frame::Test_Frame(const Test_Frame& from) - : ::google::protobuf::MessageLite() { - SharedCtor(); - MergeFrom(from); -} - -void Test_Frame::SharedCtor() { - _cached_size_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -Test_Frame::~Test_Frame() { - SharedDtor(); -} - -void Test_Frame::SharedDtor() { - if (this != default_instance_) { - } -} - -void Test_Frame::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const Test_Frame& Test_Frame::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_audio_5fprocessing_5funittest_2eproto(); return *default_instance_; -} - -Test_Frame* Test_Frame::default_instance_ = NULL; - -Test_Frame* Test_Frame::New() const { - return new Test_Frame; -} - -void Test_Frame::Clear() { - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -bool Test_Frame::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag, NULL)); - } - return true; -#undef DO_ -} - -void Test_Frame::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { -} - -int Test_Frame::ByteSize() const { - int total_size = 0; - - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void Test_Frame::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); -} - -void Test_Frame::MergeFrom(const Test_Frame& from) { - GOOGLE_CHECK_NE(&from, this); -} - -void Test_Frame::CopyFrom(const Test_Frame& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Test_Frame::IsInitialized() const { - - return true; -} - -void Test_Frame::Swap(Test_Frame* other) { - if (other != this) { - std::swap(_cached_size_, other->_cached_size_); - } -} - -::std::string Test_Frame::GetTypeName() const { - return "audio_processing_unittest.Test.Frame"; -} - - -// ------------------------------------------------------------------- - -#ifndef _MSC_VER -const int Test_Statistic::kInstantFieldNumber; -const int Test_Statistic::kAverageFieldNumber; -const int Test_Statistic::kMaximumFieldNumber; -const int Test_Statistic::kMinimumFieldNumber; -#endif // !_MSC_VER - -Test_Statistic::Test_Statistic() - : ::google::protobuf::MessageLite() { - SharedCtor(); -} - -void Test_Statistic::InitAsDefaultInstance() { -} - -Test_Statistic::Test_Statistic(const Test_Statistic& from) - : ::google::protobuf::MessageLite() { - SharedCtor(); - MergeFrom(from); -} - -void Test_Statistic::SharedCtor() { - _cached_size_ = 0; - instant_ = 0; - average_ = 0; - maximum_ = 0; - minimum_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -Test_Statistic::~Test_Statistic() { - SharedDtor(); -} - -void Test_Statistic::SharedDtor() { - if (this != default_instance_) { - } -} - -void Test_Statistic::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const Test_Statistic& Test_Statistic::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_audio_5fprocessing_5funittest_2eproto(); return *default_instance_; -} - -Test_Statistic* Test_Statistic::default_instance_ = NULL; - -Test_Statistic* Test_Statistic::New() const { - return new Test_Statistic; -} - -void Test_Statistic::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - instant_ = 0; - average_ = 0; - maximum_ = 0; - minimum_ = 0; - } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -bool Test_Statistic::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional int32 instant = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &instant_))); - set_has_instant(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(16)) goto parse_average; - break; - } - - // optional int32 average = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_average: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &average_))); - set_has_average(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(24)) goto parse_maximum; - break; - } - - // optional int32 maximum = 3; - case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_maximum: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &maximum_))); - set_has_maximum(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(32)) goto parse_minimum; - break; - } - - // optional int32 minimum = 4; - case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_minimum: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &minimum_))); - set_has_minimum(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag, NULL)); - break; - } - } - } - return true; -#undef DO_ -} - -void Test_Statistic::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // optional int32 instant = 1; - if (has_instant()) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->instant(), output); - } - - // optional int32 average = 2; - if (has_average()) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->average(), output); - } - - // optional int32 maximum = 3; - if (has_maximum()) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->maximum(), output); - } - - // optional int32 minimum = 4; - if (has_minimum()) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->minimum(), output); - } - -} - -int Test_Statistic::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional int32 instant = 1; - if (has_instant()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->instant()); - } - - // optional int32 average = 2; - if (has_average()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->average()); - } - - // optional int32 maximum = 3; - if (has_maximum()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->maximum()); - } - - // optional int32 minimum = 4; - if (has_minimum()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->minimum()); - } - - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void Test_Statistic::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); -} - -void Test_Statistic::MergeFrom(const Test_Statistic& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_instant()) { - set_instant(from.instant()); - } - if (from.has_average()) { - set_average(from.average()); - } - if (from.has_maximum()) { - set_maximum(from.maximum()); - } - if (from.has_minimum()) { - set_minimum(from.minimum()); - } - } -} - -void Test_Statistic::CopyFrom(const Test_Statistic& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Test_Statistic::IsInitialized() const { - - return true; -} - -void Test_Statistic::Swap(Test_Statistic* other) { - if (other != this) { - std::swap(instant_, other->instant_); - std::swap(average_, other->average_); - std::swap(maximum_, other->maximum_); - std::swap(minimum_, other->minimum_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::std::string Test_Statistic::GetTypeName() const { - return "audio_processing_unittest.Test.Statistic"; -} - - -// ------------------------------------------------------------------- - -#ifndef _MSC_VER -const int Test_EchoMetrics::kResidualEchoReturnLossFieldNumber; -const int Test_EchoMetrics::kEchoReturnLossFieldNumber; -const int Test_EchoMetrics::kEchoReturnLossEnhancementFieldNumber; -const int Test_EchoMetrics::kANlpFieldNumber; -#endif // !_MSC_VER - -Test_EchoMetrics::Test_EchoMetrics() - : ::google::protobuf::MessageLite() { - SharedCtor(); -} - -void Test_EchoMetrics::InitAsDefaultInstance() { - residual_echo_return_loss_ = const_cast< ::audio_processing_unittest::Test_Statistic*>(&::audio_processing_unittest::Test_Statistic::default_instance()); - echo_return_loss_ = const_cast< ::audio_processing_unittest::Test_Statistic*>(&::audio_processing_unittest::Test_Statistic::default_instance()); - echo_return_loss_enhancement_ = const_cast< ::audio_processing_unittest::Test_Statistic*>(&::audio_processing_unittest::Test_Statistic::default_instance()); - a_nlp_ = const_cast< ::audio_processing_unittest::Test_Statistic*>(&::audio_processing_unittest::Test_Statistic::default_instance()); -} - -Test_EchoMetrics::Test_EchoMetrics(const Test_EchoMetrics& from) - : ::google::protobuf::MessageLite() { - SharedCtor(); - MergeFrom(from); -} - -void Test_EchoMetrics::SharedCtor() { - _cached_size_ = 0; - residual_echo_return_loss_ = NULL; - echo_return_loss_ = NULL; - echo_return_loss_enhancement_ = NULL; - a_nlp_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -Test_EchoMetrics::~Test_EchoMetrics() { - SharedDtor(); -} - -void Test_EchoMetrics::SharedDtor() { - if (this != default_instance_) { - delete residual_echo_return_loss_; - delete echo_return_loss_; - delete echo_return_loss_enhancement_; - delete a_nlp_; - } -} - -void Test_EchoMetrics::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const Test_EchoMetrics& Test_EchoMetrics::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_audio_5fprocessing_5funittest_2eproto(); return *default_instance_; -} - -Test_EchoMetrics* Test_EchoMetrics::default_instance_ = NULL; - -Test_EchoMetrics* Test_EchoMetrics::New() const { - return new Test_EchoMetrics; -} - -void Test_EchoMetrics::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_residual_echo_return_loss()) { - if (residual_echo_return_loss_ != NULL) residual_echo_return_loss_->::audio_processing_unittest::Test_Statistic::Clear(); - } - if (has_echo_return_loss()) { - if (echo_return_loss_ != NULL) echo_return_loss_->::audio_processing_unittest::Test_Statistic::Clear(); - } - if (has_echo_return_loss_enhancement()) { - if (echo_return_loss_enhancement_ != NULL) echo_return_loss_enhancement_->::audio_processing_unittest::Test_Statistic::Clear(); - } - if (has_a_nlp()) { - if (a_nlp_ != NULL) a_nlp_->::audio_processing_unittest::Test_Statistic::Clear(); - } - } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -bool Test_EchoMetrics::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional .audio_processing_unittest.Test.Statistic residual_echo_return_loss = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_residual_echo_return_loss())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_echo_return_loss; - break; - } - - // optional .audio_processing_unittest.Test.Statistic echo_return_loss = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_echo_return_loss: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_echo_return_loss())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(26)) goto parse_echo_return_loss_enhancement; - break; - } - - // optional .audio_processing_unittest.Test.Statistic echo_return_loss_enhancement = 3; - case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_echo_return_loss_enhancement: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_echo_return_loss_enhancement())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(34)) goto parse_a_nlp; - break; - } - - // optional .audio_processing_unittest.Test.Statistic a_nlp = 4; - case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_a_nlp: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_a_nlp())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag, NULL)); - break; - } - } - } - return true; -#undef DO_ -} - -void Test_EchoMetrics::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // optional .audio_processing_unittest.Test.Statistic residual_echo_return_loss = 1; - if (has_residual_echo_return_loss()) { - ::google::protobuf::internal::WireFormatLite::WriteMessage( - 1, this->residual_echo_return_loss(), output); - } - - // optional .audio_processing_unittest.Test.Statistic echo_return_loss = 2; - if (has_echo_return_loss()) { - ::google::protobuf::internal::WireFormatLite::WriteMessage( - 2, this->echo_return_loss(), output); - } - - // optional .audio_processing_unittest.Test.Statistic echo_return_loss_enhancement = 3; - if (has_echo_return_loss_enhancement()) { - ::google::protobuf::internal::WireFormatLite::WriteMessage( - 3, this->echo_return_loss_enhancement(), output); - } - - // optional .audio_processing_unittest.Test.Statistic a_nlp = 4; - if (has_a_nlp()) { - ::google::protobuf::internal::WireFormatLite::WriteMessage( - 4, this->a_nlp(), output); - } - -} - -int Test_EchoMetrics::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional .audio_processing_unittest.Test.Statistic residual_echo_return_loss = 1; - if (has_residual_echo_return_loss()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->residual_echo_return_loss()); - } - - // optional .audio_processing_unittest.Test.Statistic echo_return_loss = 2; - if (has_echo_return_loss()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->echo_return_loss()); - } - - // optional .audio_processing_unittest.Test.Statistic echo_return_loss_enhancement = 3; - if (has_echo_return_loss_enhancement()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->echo_return_loss_enhancement()); - } - - // optional .audio_processing_unittest.Test.Statistic a_nlp = 4; - if (has_a_nlp()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->a_nlp()); - } - - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void Test_EchoMetrics::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); -} - -void Test_EchoMetrics::MergeFrom(const Test_EchoMetrics& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_residual_echo_return_loss()) { - mutable_residual_echo_return_loss()->::audio_processing_unittest::Test_Statistic::MergeFrom(from.residual_echo_return_loss()); - } - if (from.has_echo_return_loss()) { - mutable_echo_return_loss()->::audio_processing_unittest::Test_Statistic::MergeFrom(from.echo_return_loss()); - } - if (from.has_echo_return_loss_enhancement()) { - mutable_echo_return_loss_enhancement()->::audio_processing_unittest::Test_Statistic::MergeFrom(from.echo_return_loss_enhancement()); - } - if (from.has_a_nlp()) { - mutable_a_nlp()->::audio_processing_unittest::Test_Statistic::MergeFrom(from.a_nlp()); - } - } -} - -void Test_EchoMetrics::CopyFrom(const Test_EchoMetrics& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Test_EchoMetrics::IsInitialized() const { - - return true; -} - -void Test_EchoMetrics::Swap(Test_EchoMetrics* other) { - if (other != this) { - std::swap(residual_echo_return_loss_, other->residual_echo_return_loss_); - std::swap(echo_return_loss_, other->echo_return_loss_); - std::swap(echo_return_loss_enhancement_, other->echo_return_loss_enhancement_); - std::swap(a_nlp_, other->a_nlp_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::std::string Test_EchoMetrics::GetTypeName() const { - return "audio_processing_unittest.Test.EchoMetrics"; -} - - -// ------------------------------------------------------------------- - -#ifndef _MSC_VER -const int Test::kNumReverseChannelsFieldNumber; -const int Test::kNumInputChannelsFieldNumber; -const int Test::kNumOutputChannelsFieldNumber; -const int Test::kSampleRateFieldNumber; -const int Test::kFrameFieldNumber; -const int Test::kAnalogLevelAverageFieldNumber; -const int Test::kMaxOutputAverageFieldNumber; -const int Test::kHasEchoCountFieldNumber; -const int Test::kHasVoiceCountFieldNumber; -const int Test::kIsSaturatedCountFieldNumber; -const int Test::kEchoMetricsFieldNumber; -#endif // !_MSC_VER - -Test::Test() - : ::google::protobuf::MessageLite() { - SharedCtor(); -} - -void Test::InitAsDefaultInstance() { - echo_metrics_ = const_cast< ::audio_processing_unittest::Test_EchoMetrics*>(&::audio_processing_unittest::Test_EchoMetrics::default_instance()); -} - -Test::Test(const Test& from) - : ::google::protobuf::MessageLite() { - SharedCtor(); - MergeFrom(from); -} - -void Test::SharedCtor() { - _cached_size_ = 0; - num_reverse_channels_ = 0; - num_input_channels_ = 0; - num_output_channels_ = 0; - sample_rate_ = 0; - analog_level_average_ = 0; - max_output_average_ = 0; - has_echo_count_ = 0; - has_voice_count_ = 0; - is_saturated_count_ = 0; - echo_metrics_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -Test::~Test() { - SharedDtor(); -} - -void Test::SharedDtor() { - if (this != default_instance_) { - delete echo_metrics_; - } -} - -void Test::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const Test& Test::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_audio_5fprocessing_5funittest_2eproto(); return *default_instance_; -} - -Test* Test::default_instance_ = NULL; - -Test* Test::New() const { - return new Test; -} - -void Test::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - num_reverse_channels_ = 0; - num_input_channels_ = 0; - num_output_channels_ = 0; - sample_rate_ = 0; - analog_level_average_ = 0; - max_output_average_ = 0; - has_echo_count_ = 0; - } - if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) { - has_voice_count_ = 0; - is_saturated_count_ = 0; - if (has_echo_metrics()) { - if (echo_metrics_ != NULL) echo_metrics_->::audio_processing_unittest::Test_EchoMetrics::Clear(); - } - } - frame_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -bool Test::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional int32 num_reverse_channels = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &num_reverse_channels_))); - set_has_num_reverse_channels(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(16)) goto parse_num_input_channels; - break; - } - - // optional int32 num_input_channels = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_num_input_channels: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &num_input_channels_))); - set_has_num_input_channels(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(24)) goto parse_num_output_channels; - break; - } - - // optional int32 num_output_channels = 3; - case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_num_output_channels: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &num_output_channels_))); - set_has_num_output_channels(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(32)) goto parse_sample_rate; - break; - } - - // optional int32 sample_rate = 4; - case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_sample_rate: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &sample_rate_))); - set_has_sample_rate(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(42)) goto parse_frame; - break; - } - - // repeated .audio_processing_unittest.Test.Frame frame = 5; - case 5: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_frame: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_frame())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(42)) goto parse_frame; - if (input->ExpectTag(48)) goto parse_analog_level_average; - break; - } - - // optional int32 analog_level_average = 6; - case 6: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_analog_level_average: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &analog_level_average_))); - set_has_analog_level_average(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(56)) goto parse_max_output_average; - break; - } - - // optional int32 max_output_average = 7; - case 7: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_max_output_average: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &max_output_average_))); - set_has_max_output_average(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(64)) goto parse_has_echo_count; - break; - } - - // optional int32 has_echo_count = 8; - case 8: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_has_echo_count: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &has_echo_count_))); - set_has_has_echo_count(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(72)) goto parse_has_voice_count; - break; - } - - // optional int32 has_voice_count = 9; - case 9: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_has_voice_count: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &has_voice_count_))); - set_has_has_voice_count(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(80)) goto parse_is_saturated_count; - break; - } - - // optional int32 is_saturated_count = 10; - case 10: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_is_saturated_count: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &is_saturated_count_))); - set_has_is_saturated_count(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(90)) goto parse_echo_metrics; - break; - } - - // optional .audio_processing_unittest.Test.EchoMetrics echo_metrics = 11; - case 11: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_echo_metrics: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_echo_metrics())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag, NULL)); - break; - } - } - } - return true; -#undef DO_ -} - -void Test::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // optional int32 num_reverse_channels = 1; - if (has_num_reverse_channels()) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->num_reverse_channels(), output); - } - - // optional int32 num_input_channels = 2; - if (has_num_input_channels()) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->num_input_channels(), output); - } - - // optional int32 num_output_channels = 3; - if (has_num_output_channels()) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->num_output_channels(), output); - } - - // optional int32 sample_rate = 4; - if (has_sample_rate()) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->sample_rate(), output); - } - - // repeated .audio_processing_unittest.Test.Frame frame = 5; - for (int i = 0; i < this->frame_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessage( - 5, this->frame(i), output); - } - - // optional int32 analog_level_average = 6; - if (has_analog_level_average()) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->analog_level_average(), output); - } - - // optional int32 max_output_average = 7; - if (has_max_output_average()) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->max_output_average(), output); - } - - // optional int32 has_echo_count = 8; - if (has_has_echo_count()) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(8, this->has_echo_count(), output); - } - - // optional int32 has_voice_count = 9; - if (has_has_voice_count()) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(9, this->has_voice_count(), output); - } - - // optional int32 is_saturated_count = 10; - if (has_is_saturated_count()) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(10, this->is_saturated_count(), output); - } - - // optional .audio_processing_unittest.Test.EchoMetrics echo_metrics = 11; - if (has_echo_metrics()) { - ::google::protobuf::internal::WireFormatLite::WriteMessage( - 11, this->echo_metrics(), output); - } - -} - -int Test::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional int32 num_reverse_channels = 1; - if (has_num_reverse_channels()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->num_reverse_channels()); - } - - // optional int32 num_input_channels = 2; - if (has_num_input_channels()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->num_input_channels()); - } - - // optional int32 num_output_channels = 3; - if (has_num_output_channels()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->num_output_channels()); - } - - // optional int32 sample_rate = 4; - if (has_sample_rate()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->sample_rate()); - } - - // optional int32 analog_level_average = 6; - if (has_analog_level_average()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->analog_level_average()); - } - - // optional int32 max_output_average = 7; - if (has_max_output_average()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->max_output_average()); - } - - // optional int32 has_echo_count = 8; - if (has_has_echo_count()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->has_echo_count()); - } - - } - if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) { - // optional int32 has_voice_count = 9; - if (has_has_voice_count()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->has_voice_count()); - } - - // optional int32 is_saturated_count = 10; - if (has_is_saturated_count()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->is_saturated_count()); - } - - // optional .audio_processing_unittest.Test.EchoMetrics echo_metrics = 11; - if (has_echo_metrics()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->echo_metrics()); - } - - } - // repeated .audio_processing_unittest.Test.Frame frame = 5; - total_size += 1 * this->frame_size(); - for (int i = 0; i < this->frame_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->frame(i)); - } - - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void Test::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); -} - -void Test::MergeFrom(const Test& from) { - GOOGLE_CHECK_NE(&from, this); - frame_.MergeFrom(from.frame_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_num_reverse_channels()) { - set_num_reverse_channels(from.num_reverse_channels()); - } - if (from.has_num_input_channels()) { - set_num_input_channels(from.num_input_channels()); - } - if (from.has_num_output_channels()) { - set_num_output_channels(from.num_output_channels()); - } - if (from.has_sample_rate()) { - set_sample_rate(from.sample_rate()); - } - if (from.has_analog_level_average()) { - set_analog_level_average(from.analog_level_average()); - } - if (from.has_max_output_average()) { - set_max_output_average(from.max_output_average()); - } - if (from.has_has_echo_count()) { - set_has_echo_count(from.has_echo_count()); - } - } - if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) { - if (from.has_has_voice_count()) { - set_has_voice_count(from.has_voice_count()); - } - if (from.has_is_saturated_count()) { - set_is_saturated_count(from.is_saturated_count()); - } - if (from.has_echo_metrics()) { - mutable_echo_metrics()->::audio_processing_unittest::Test_EchoMetrics::MergeFrom(from.echo_metrics()); - } - } -} - -void Test::CopyFrom(const Test& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Test::IsInitialized() const { - - return true; -} - -void Test::Swap(Test* other) { - if (other != this) { - std::swap(num_reverse_channels_, other->num_reverse_channels_); - std::swap(num_input_channels_, other->num_input_channels_); - std::swap(num_output_channels_, other->num_output_channels_); - std::swap(sample_rate_, other->sample_rate_); - frame_.Swap(&other->frame_); - std::swap(analog_level_average_, other->analog_level_average_); - std::swap(max_output_average_, other->max_output_average_); - std::swap(has_echo_count_, other->has_echo_count_); - std::swap(has_voice_count_, other->has_voice_count_); - std::swap(is_saturated_count_, other->is_saturated_count_); - std::swap(echo_metrics_, other->echo_metrics_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::std::string Test::GetTypeName() const { - return "audio_processing_unittest.Test"; -} - - -// =================================================================== - -#ifndef _MSC_VER -const int OutputData::kTestFieldNumber; -#endif // !_MSC_VER - -OutputData::OutputData() - : ::google::protobuf::MessageLite() { - SharedCtor(); -} - -void OutputData::InitAsDefaultInstance() { -} - -OutputData::OutputData(const OutputData& from) - : ::google::protobuf::MessageLite() { - SharedCtor(); - MergeFrom(from); -} - -void OutputData::SharedCtor() { - _cached_size_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -OutputData::~OutputData() { - SharedDtor(); -} - -void OutputData::SharedDtor() { - if (this != default_instance_) { - } -} - -void OutputData::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const OutputData& OutputData::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_audio_5fprocessing_5funittest_2eproto(); return *default_instance_; -} - -OutputData* OutputData::default_instance_ = NULL; - -OutputData* OutputData::New() const { - return new OutputData; -} - -void OutputData::Clear() { - test_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -bool OutputData::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .audio_processing_unittest.Test test = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_test: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_test())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(10)) goto parse_test; - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag, NULL)); - break; - } - } - } - return true; -#undef DO_ -} - -void OutputData::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // repeated .audio_processing_unittest.Test test = 1; - for (int i = 0; i < this->test_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessage( - 1, this->test(i), output); - } - -} - -int OutputData::ByteSize() const { - int total_size = 0; - - // repeated .audio_processing_unittest.Test test = 1; - total_size += 1 * this->test_size(); - for (int i = 0; i < this->test_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->test(i)); - } - - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void OutputData::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); -} - -void OutputData::MergeFrom(const OutputData& from) { - GOOGLE_CHECK_NE(&from, this); - test_.MergeFrom(from.test_); -} - -void OutputData::CopyFrom(const OutputData& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool OutputData::IsInitialized() const { - - return true; -} - -void OutputData::Swap(OutputData* other) { - if (other != this) { - test_.Swap(&other->test_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::std::string OutputData::GetTypeName() const { - return "audio_processing_unittest.OutputData"; -} - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace audio_processing_unittest - -// @@protoc_insertion_point(global_scope) diff --git a/src/modules/audio_processing/main/test/unit_test/audio_processing_unittest.pb.h b/src/modules/audio_processing/main/test/unit_test/audio_processing_unittest.pb.h deleted file mode 100644 index 094295dca..000000000 --- a/src/modules/audio_processing/main/test/unit_test/audio_processing_unittest.pb.h +++ /dev/null @@ -1,1061 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: audio_processing_unittest.proto - -#ifndef PROTOBUF_audio_5fprocessing_5funittest_2eproto__INCLUDED -#define PROTOBUF_audio_5fprocessing_5funittest_2eproto__INCLUDED - -#include - -#include - -#if GOOGLE_PROTOBUF_VERSION < 2004000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 2004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -// @@protoc_insertion_point(includes) - -namespace audio_processing_unittest { - -// Internal implementation detail -- do not call these. -void protobuf_AddDesc_audio_5fprocessing_5funittest_2eproto(); -void protobuf_AssignDesc_audio_5fprocessing_5funittest_2eproto(); -void protobuf_ShutdownFile_audio_5fprocessing_5funittest_2eproto(); - -class Test; -class Test_Frame; -class Test_Statistic; -class Test_EchoMetrics; -class OutputData; - -// =================================================================== - -class Test_Frame : public ::google::protobuf::MessageLite { - public: - Test_Frame(); - virtual ~Test_Frame(); - - Test_Frame(const Test_Frame& from); - - inline Test_Frame& operator=(const Test_Frame& from) { - CopyFrom(from); - return *this; - } - - static const Test_Frame& default_instance(); - - void Swap(Test_Frame* other); - - // implements Message ---------------------------------------------- - - Test_Frame* New() const; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); - void CopyFrom(const Test_Frame& from); - void MergeFrom(const Test_Frame& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::std::string GetTypeName() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // @@protoc_insertion_point(class_scope:audio_processing_unittest.Test.Frame) - private: - - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[1]; - - friend void protobuf_AddDesc_audio_5fprocessing_5funittest_2eproto(); - friend void protobuf_AssignDesc_audio_5fprocessing_5funittest_2eproto(); - friend void protobuf_ShutdownFile_audio_5fprocessing_5funittest_2eproto(); - - void InitAsDefaultInstance(); - static Test_Frame* default_instance_; -}; -// ------------------------------------------------------------------- - -class Test_Statistic : public ::google::protobuf::MessageLite { - public: - Test_Statistic(); - virtual ~Test_Statistic(); - - Test_Statistic(const Test_Statistic& from); - - inline Test_Statistic& operator=(const Test_Statistic& from) { - CopyFrom(from); - return *this; - } - - static const Test_Statistic& default_instance(); - - void Swap(Test_Statistic* other); - - // implements Message ---------------------------------------------- - - Test_Statistic* New() const; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); - void CopyFrom(const Test_Statistic& from); - void MergeFrom(const Test_Statistic& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::std::string GetTypeName() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // optional int32 instant = 1; - inline bool has_instant() const; - inline void clear_instant(); - static const int kInstantFieldNumber = 1; - inline ::google::protobuf::int32 instant() const; - inline void set_instant(::google::protobuf::int32 value); - - // optional int32 average = 2; - inline bool has_average() const; - inline void clear_average(); - static const int kAverageFieldNumber = 2; - inline ::google::protobuf::int32 average() const; - inline void set_average(::google::protobuf::int32 value); - - // optional int32 maximum = 3; - inline bool has_maximum() const; - inline void clear_maximum(); - static const int kMaximumFieldNumber = 3; - inline ::google::protobuf::int32 maximum() const; - inline void set_maximum(::google::protobuf::int32 value); - - // optional int32 minimum = 4; - inline bool has_minimum() const; - inline void clear_minimum(); - static const int kMinimumFieldNumber = 4; - inline ::google::protobuf::int32 minimum() const; - inline void set_minimum(::google::protobuf::int32 value); - - // @@protoc_insertion_point(class_scope:audio_processing_unittest.Test.Statistic) - private: - inline void set_has_instant(); - inline void clear_has_instant(); - inline void set_has_average(); - inline void clear_has_average(); - inline void set_has_maximum(); - inline void clear_has_maximum(); - inline void set_has_minimum(); - inline void clear_has_minimum(); - - ::google::protobuf::int32 instant_; - ::google::protobuf::int32 average_; - ::google::protobuf::int32 maximum_; - ::google::protobuf::int32 minimum_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; - - friend void protobuf_AddDesc_audio_5fprocessing_5funittest_2eproto(); - friend void protobuf_AssignDesc_audio_5fprocessing_5funittest_2eproto(); - friend void protobuf_ShutdownFile_audio_5fprocessing_5funittest_2eproto(); - - void InitAsDefaultInstance(); - static Test_Statistic* default_instance_; -}; -// ------------------------------------------------------------------- - -class Test_EchoMetrics : public ::google::protobuf::MessageLite { - public: - Test_EchoMetrics(); - virtual ~Test_EchoMetrics(); - - Test_EchoMetrics(const Test_EchoMetrics& from); - - inline Test_EchoMetrics& operator=(const Test_EchoMetrics& from) { - CopyFrom(from); - return *this; - } - - static const Test_EchoMetrics& default_instance(); - - void Swap(Test_EchoMetrics* other); - - // implements Message ---------------------------------------------- - - Test_EchoMetrics* New() const; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); - void CopyFrom(const Test_EchoMetrics& from); - void MergeFrom(const Test_EchoMetrics& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::std::string GetTypeName() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // optional .audio_processing_unittest.Test.Statistic residual_echo_return_loss = 1; - inline bool has_residual_echo_return_loss() const; - inline void clear_residual_echo_return_loss(); - static const int kResidualEchoReturnLossFieldNumber = 1; - inline const ::audio_processing_unittest::Test_Statistic& residual_echo_return_loss() const; - inline ::audio_processing_unittest::Test_Statistic* mutable_residual_echo_return_loss(); - inline ::audio_processing_unittest::Test_Statistic* release_residual_echo_return_loss(); - - // optional .audio_processing_unittest.Test.Statistic echo_return_loss = 2; - inline bool has_echo_return_loss() const; - inline void clear_echo_return_loss(); - static const int kEchoReturnLossFieldNumber = 2; - inline const ::audio_processing_unittest::Test_Statistic& echo_return_loss() const; - inline ::audio_processing_unittest::Test_Statistic* mutable_echo_return_loss(); - inline ::audio_processing_unittest::Test_Statistic* release_echo_return_loss(); - - // optional .audio_processing_unittest.Test.Statistic echo_return_loss_enhancement = 3; - inline bool has_echo_return_loss_enhancement() const; - inline void clear_echo_return_loss_enhancement(); - static const int kEchoReturnLossEnhancementFieldNumber = 3; - inline const ::audio_processing_unittest::Test_Statistic& echo_return_loss_enhancement() const; - inline ::audio_processing_unittest::Test_Statistic* mutable_echo_return_loss_enhancement(); - inline ::audio_processing_unittest::Test_Statistic* release_echo_return_loss_enhancement(); - - // optional .audio_processing_unittest.Test.Statistic a_nlp = 4; - inline bool has_a_nlp() const; - inline void clear_a_nlp(); - static const int kANlpFieldNumber = 4; - inline const ::audio_processing_unittest::Test_Statistic& a_nlp() const; - inline ::audio_processing_unittest::Test_Statistic* mutable_a_nlp(); - inline ::audio_processing_unittest::Test_Statistic* release_a_nlp(); - - // @@protoc_insertion_point(class_scope:audio_processing_unittest.Test.EchoMetrics) - private: - inline void set_has_residual_echo_return_loss(); - inline void clear_has_residual_echo_return_loss(); - inline void set_has_echo_return_loss(); - inline void clear_has_echo_return_loss(); - inline void set_has_echo_return_loss_enhancement(); - inline void clear_has_echo_return_loss_enhancement(); - inline void set_has_a_nlp(); - inline void clear_has_a_nlp(); - - ::audio_processing_unittest::Test_Statistic* residual_echo_return_loss_; - ::audio_processing_unittest::Test_Statistic* echo_return_loss_; - ::audio_processing_unittest::Test_Statistic* echo_return_loss_enhancement_; - ::audio_processing_unittest::Test_Statistic* a_nlp_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; - - friend void protobuf_AddDesc_audio_5fprocessing_5funittest_2eproto(); - friend void protobuf_AssignDesc_audio_5fprocessing_5funittest_2eproto(); - friend void protobuf_ShutdownFile_audio_5fprocessing_5funittest_2eproto(); - - void InitAsDefaultInstance(); - static Test_EchoMetrics* default_instance_; -}; -// ------------------------------------------------------------------- - -class Test : public ::google::protobuf::MessageLite { - public: - Test(); - virtual ~Test(); - - Test(const Test& from); - - inline Test& operator=(const Test& from) { - CopyFrom(from); - return *this; - } - - static const Test& default_instance(); - - void Swap(Test* other); - - // implements Message ---------------------------------------------- - - Test* New() const; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); - void CopyFrom(const Test& from); - void MergeFrom(const Test& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::std::string GetTypeName() const; - - // nested types ---------------------------------------------------- - - typedef Test_Frame Frame; - typedef Test_Statistic Statistic; - typedef Test_EchoMetrics EchoMetrics; - - // accessors ------------------------------------------------------- - - // optional int32 num_reverse_channels = 1; - inline bool has_num_reverse_channels() const; - inline void clear_num_reverse_channels(); - static const int kNumReverseChannelsFieldNumber = 1; - inline ::google::protobuf::int32 num_reverse_channels() const; - inline void set_num_reverse_channels(::google::protobuf::int32 value); - - // optional int32 num_input_channels = 2; - inline bool has_num_input_channels() const; - inline void clear_num_input_channels(); - static const int kNumInputChannelsFieldNumber = 2; - inline ::google::protobuf::int32 num_input_channels() const; - inline void set_num_input_channels(::google::protobuf::int32 value); - - // optional int32 num_output_channels = 3; - inline bool has_num_output_channels() const; - inline void clear_num_output_channels(); - static const int kNumOutputChannelsFieldNumber = 3; - inline ::google::protobuf::int32 num_output_channels() const; - inline void set_num_output_channels(::google::protobuf::int32 value); - - // optional int32 sample_rate = 4; - inline bool has_sample_rate() const; - inline void clear_sample_rate(); - static const int kSampleRateFieldNumber = 4; - inline ::google::protobuf::int32 sample_rate() const; - inline void set_sample_rate(::google::protobuf::int32 value); - - // repeated .audio_processing_unittest.Test.Frame frame = 5; - inline int frame_size() const; - inline void clear_frame(); - static const int kFrameFieldNumber = 5; - inline const ::audio_processing_unittest::Test_Frame& frame(int index) const; - inline ::audio_processing_unittest::Test_Frame* mutable_frame(int index); - inline ::audio_processing_unittest::Test_Frame* add_frame(); - inline const ::google::protobuf::RepeatedPtrField< ::audio_processing_unittest::Test_Frame >& - frame() const; - inline ::google::protobuf::RepeatedPtrField< ::audio_processing_unittest::Test_Frame >* - mutable_frame(); - - // optional int32 analog_level_average = 6; - inline bool has_analog_level_average() const; - inline void clear_analog_level_average(); - static const int kAnalogLevelAverageFieldNumber = 6; - inline ::google::protobuf::int32 analog_level_average() const; - inline void set_analog_level_average(::google::protobuf::int32 value); - - // optional int32 max_output_average = 7; - inline bool has_max_output_average() const; - inline void clear_max_output_average(); - static const int kMaxOutputAverageFieldNumber = 7; - inline ::google::protobuf::int32 max_output_average() const; - inline void set_max_output_average(::google::protobuf::int32 value); - - // optional int32 has_echo_count = 8; - inline bool has_has_echo_count() const; - inline void clear_has_echo_count(); - static const int kHasEchoCountFieldNumber = 8; - inline ::google::protobuf::int32 has_echo_count() const; - inline void set_has_echo_count(::google::protobuf::int32 value); - - // optional int32 has_voice_count = 9; - inline bool has_has_voice_count() const; - inline void clear_has_voice_count(); - static const int kHasVoiceCountFieldNumber = 9; - inline ::google::protobuf::int32 has_voice_count() const; - inline void set_has_voice_count(::google::protobuf::int32 value); - - // optional int32 is_saturated_count = 10; - inline bool has_is_saturated_count() const; - inline void clear_is_saturated_count(); - static const int kIsSaturatedCountFieldNumber = 10; - inline ::google::protobuf::int32 is_saturated_count() const; - inline void set_is_saturated_count(::google::protobuf::int32 value); - - // optional .audio_processing_unittest.Test.EchoMetrics echo_metrics = 11; - inline bool has_echo_metrics() const; - inline void clear_echo_metrics(); - static const int kEchoMetricsFieldNumber = 11; - inline const ::audio_processing_unittest::Test_EchoMetrics& echo_metrics() const; - inline ::audio_processing_unittest::Test_EchoMetrics* mutable_echo_metrics(); - inline ::audio_processing_unittest::Test_EchoMetrics* release_echo_metrics(); - - // @@protoc_insertion_point(class_scope:audio_processing_unittest.Test) - private: - inline void set_has_num_reverse_channels(); - inline void clear_has_num_reverse_channels(); - inline void set_has_num_input_channels(); - inline void clear_has_num_input_channels(); - inline void set_has_num_output_channels(); - inline void clear_has_num_output_channels(); - inline void set_has_sample_rate(); - inline void clear_has_sample_rate(); - inline void set_has_analog_level_average(); - inline void clear_has_analog_level_average(); - inline void set_has_max_output_average(); - inline void clear_has_max_output_average(); - inline void set_has_has_echo_count(); - inline void clear_has_has_echo_count(); - inline void set_has_has_voice_count(); - inline void clear_has_has_voice_count(); - inline void set_has_is_saturated_count(); - inline void clear_has_is_saturated_count(); - inline void set_has_echo_metrics(); - inline void clear_has_echo_metrics(); - - ::google::protobuf::int32 num_reverse_channels_; - ::google::protobuf::int32 num_input_channels_; - ::google::protobuf::int32 num_output_channels_; - ::google::protobuf::int32 sample_rate_; - ::google::protobuf::RepeatedPtrField< ::audio_processing_unittest::Test_Frame > frame_; - ::google::protobuf::int32 analog_level_average_; - ::google::protobuf::int32 max_output_average_; - ::google::protobuf::int32 has_echo_count_; - ::google::protobuf::int32 has_voice_count_; - ::audio_processing_unittest::Test_EchoMetrics* echo_metrics_; - ::google::protobuf::int32 is_saturated_count_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(11 + 31) / 32]; - - friend void protobuf_AddDesc_audio_5fprocessing_5funittest_2eproto(); - friend void protobuf_AssignDesc_audio_5fprocessing_5funittest_2eproto(); - friend void protobuf_ShutdownFile_audio_5fprocessing_5funittest_2eproto(); - - void InitAsDefaultInstance(); - static Test* default_instance_; -}; -// ------------------------------------------------------------------- - -class OutputData : public ::google::protobuf::MessageLite { - public: - OutputData(); - virtual ~OutputData(); - - OutputData(const OutputData& from); - - inline OutputData& operator=(const OutputData& from) { - CopyFrom(from); - return *this; - } - - static const OutputData& default_instance(); - - void Swap(OutputData* other); - - // implements Message ---------------------------------------------- - - OutputData* New() const; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); - void CopyFrom(const OutputData& from); - void MergeFrom(const OutputData& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::std::string GetTypeName() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // repeated .audio_processing_unittest.Test test = 1; - inline int test_size() const; - inline void clear_test(); - static const int kTestFieldNumber = 1; - inline const ::audio_processing_unittest::Test& test(int index) const; - inline ::audio_processing_unittest::Test* mutable_test(int index); - inline ::audio_processing_unittest::Test* add_test(); - inline const ::google::protobuf::RepeatedPtrField< ::audio_processing_unittest::Test >& - test() const; - inline ::google::protobuf::RepeatedPtrField< ::audio_processing_unittest::Test >* - mutable_test(); - - // @@protoc_insertion_point(class_scope:audio_processing_unittest.OutputData) - private: - - ::google::protobuf::RepeatedPtrField< ::audio_processing_unittest::Test > test_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; - - friend void protobuf_AddDesc_audio_5fprocessing_5funittest_2eproto(); - friend void protobuf_AssignDesc_audio_5fprocessing_5funittest_2eproto(); - friend void protobuf_ShutdownFile_audio_5fprocessing_5funittest_2eproto(); - - void InitAsDefaultInstance(); - static OutputData* default_instance_; -}; -// =================================================================== - - -// =================================================================== - -// Test_Frame - -// ------------------------------------------------------------------- - -// Test_Statistic - -// optional int32 instant = 1; -inline bool Test_Statistic::has_instant() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void Test_Statistic::set_has_instant() { - _has_bits_[0] |= 0x00000001u; -} -inline void Test_Statistic::clear_has_instant() { - _has_bits_[0] &= ~0x00000001u; -} -inline void Test_Statistic::clear_instant() { - instant_ = 0; - clear_has_instant(); -} -inline ::google::protobuf::int32 Test_Statistic::instant() const { - return instant_; -} -inline void Test_Statistic::set_instant(::google::protobuf::int32 value) { - set_has_instant(); - instant_ = value; -} - -// optional int32 average = 2; -inline bool Test_Statistic::has_average() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void Test_Statistic::set_has_average() { - _has_bits_[0] |= 0x00000002u; -} -inline void Test_Statistic::clear_has_average() { - _has_bits_[0] &= ~0x00000002u; -} -inline void Test_Statistic::clear_average() { - average_ = 0; - clear_has_average(); -} -inline ::google::protobuf::int32 Test_Statistic::average() const { - return average_; -} -inline void Test_Statistic::set_average(::google::protobuf::int32 value) { - set_has_average(); - average_ = value; -} - -// optional int32 maximum = 3; -inline bool Test_Statistic::has_maximum() const { - return (_has_bits_[0] & 0x00000004u) != 0; -} -inline void Test_Statistic::set_has_maximum() { - _has_bits_[0] |= 0x00000004u; -} -inline void Test_Statistic::clear_has_maximum() { - _has_bits_[0] &= ~0x00000004u; -} -inline void Test_Statistic::clear_maximum() { - maximum_ = 0; - clear_has_maximum(); -} -inline ::google::protobuf::int32 Test_Statistic::maximum() const { - return maximum_; -} -inline void Test_Statistic::set_maximum(::google::protobuf::int32 value) { - set_has_maximum(); - maximum_ = value; -} - -// optional int32 minimum = 4; -inline bool Test_Statistic::has_minimum() const { - return (_has_bits_[0] & 0x00000008u) != 0; -} -inline void Test_Statistic::set_has_minimum() { - _has_bits_[0] |= 0x00000008u; -} -inline void Test_Statistic::clear_has_minimum() { - _has_bits_[0] &= ~0x00000008u; -} -inline void Test_Statistic::clear_minimum() { - minimum_ = 0; - clear_has_minimum(); -} -inline ::google::protobuf::int32 Test_Statistic::minimum() const { - return minimum_; -} -inline void Test_Statistic::set_minimum(::google::protobuf::int32 value) { - set_has_minimum(); - minimum_ = value; -} - -// ------------------------------------------------------------------- - -// Test_EchoMetrics - -// optional .audio_processing_unittest.Test.Statistic residual_echo_return_loss = 1; -inline bool Test_EchoMetrics::has_residual_echo_return_loss() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void Test_EchoMetrics::set_has_residual_echo_return_loss() { - _has_bits_[0] |= 0x00000001u; -} -inline void Test_EchoMetrics::clear_has_residual_echo_return_loss() { - _has_bits_[0] &= ~0x00000001u; -} -inline void Test_EchoMetrics::clear_residual_echo_return_loss() { - if (residual_echo_return_loss_ != NULL) residual_echo_return_loss_->::audio_processing_unittest::Test_Statistic::Clear(); - clear_has_residual_echo_return_loss(); -} -inline const ::audio_processing_unittest::Test_Statistic& Test_EchoMetrics::residual_echo_return_loss() const { - return residual_echo_return_loss_ != NULL ? *residual_echo_return_loss_ : *default_instance_->residual_echo_return_loss_; -} -inline ::audio_processing_unittest::Test_Statistic* Test_EchoMetrics::mutable_residual_echo_return_loss() { - set_has_residual_echo_return_loss(); - if (residual_echo_return_loss_ == NULL) residual_echo_return_loss_ = new ::audio_processing_unittest::Test_Statistic; - return residual_echo_return_loss_; -} -inline ::audio_processing_unittest::Test_Statistic* Test_EchoMetrics::release_residual_echo_return_loss() { - clear_has_residual_echo_return_loss(); - ::audio_processing_unittest::Test_Statistic* temp = residual_echo_return_loss_; - residual_echo_return_loss_ = NULL; - return temp; -} - -// optional .audio_processing_unittest.Test.Statistic echo_return_loss = 2; -inline bool Test_EchoMetrics::has_echo_return_loss() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void Test_EchoMetrics::set_has_echo_return_loss() { - _has_bits_[0] |= 0x00000002u; -} -inline void Test_EchoMetrics::clear_has_echo_return_loss() { - _has_bits_[0] &= ~0x00000002u; -} -inline void Test_EchoMetrics::clear_echo_return_loss() { - if (echo_return_loss_ != NULL) echo_return_loss_->::audio_processing_unittest::Test_Statistic::Clear(); - clear_has_echo_return_loss(); -} -inline const ::audio_processing_unittest::Test_Statistic& Test_EchoMetrics::echo_return_loss() const { - return echo_return_loss_ != NULL ? *echo_return_loss_ : *default_instance_->echo_return_loss_; -} -inline ::audio_processing_unittest::Test_Statistic* Test_EchoMetrics::mutable_echo_return_loss() { - set_has_echo_return_loss(); - if (echo_return_loss_ == NULL) echo_return_loss_ = new ::audio_processing_unittest::Test_Statistic; - return echo_return_loss_; -} -inline ::audio_processing_unittest::Test_Statistic* Test_EchoMetrics::release_echo_return_loss() { - clear_has_echo_return_loss(); - ::audio_processing_unittest::Test_Statistic* temp = echo_return_loss_; - echo_return_loss_ = NULL; - return temp; -} - -// optional .audio_processing_unittest.Test.Statistic echo_return_loss_enhancement = 3; -inline bool Test_EchoMetrics::has_echo_return_loss_enhancement() const { - return (_has_bits_[0] & 0x00000004u) != 0; -} -inline void Test_EchoMetrics::set_has_echo_return_loss_enhancement() { - _has_bits_[0] |= 0x00000004u; -} -inline void Test_EchoMetrics::clear_has_echo_return_loss_enhancement() { - _has_bits_[0] &= ~0x00000004u; -} -inline void Test_EchoMetrics::clear_echo_return_loss_enhancement() { - if (echo_return_loss_enhancement_ != NULL) echo_return_loss_enhancement_->::audio_processing_unittest::Test_Statistic::Clear(); - clear_has_echo_return_loss_enhancement(); -} -inline const ::audio_processing_unittest::Test_Statistic& Test_EchoMetrics::echo_return_loss_enhancement() const { - return echo_return_loss_enhancement_ != NULL ? *echo_return_loss_enhancement_ : *default_instance_->echo_return_loss_enhancement_; -} -inline ::audio_processing_unittest::Test_Statistic* Test_EchoMetrics::mutable_echo_return_loss_enhancement() { - set_has_echo_return_loss_enhancement(); - if (echo_return_loss_enhancement_ == NULL) echo_return_loss_enhancement_ = new ::audio_processing_unittest::Test_Statistic; - return echo_return_loss_enhancement_; -} -inline ::audio_processing_unittest::Test_Statistic* Test_EchoMetrics::release_echo_return_loss_enhancement() { - clear_has_echo_return_loss_enhancement(); - ::audio_processing_unittest::Test_Statistic* temp = echo_return_loss_enhancement_; - echo_return_loss_enhancement_ = NULL; - return temp; -} - -// optional .audio_processing_unittest.Test.Statistic a_nlp = 4; -inline bool Test_EchoMetrics::has_a_nlp() const { - return (_has_bits_[0] & 0x00000008u) != 0; -} -inline void Test_EchoMetrics::set_has_a_nlp() { - _has_bits_[0] |= 0x00000008u; -} -inline void Test_EchoMetrics::clear_has_a_nlp() { - _has_bits_[0] &= ~0x00000008u; -} -inline void Test_EchoMetrics::clear_a_nlp() { - if (a_nlp_ != NULL) a_nlp_->::audio_processing_unittest::Test_Statistic::Clear(); - clear_has_a_nlp(); -} -inline const ::audio_processing_unittest::Test_Statistic& Test_EchoMetrics::a_nlp() const { - return a_nlp_ != NULL ? *a_nlp_ : *default_instance_->a_nlp_; -} -inline ::audio_processing_unittest::Test_Statistic* Test_EchoMetrics::mutable_a_nlp() { - set_has_a_nlp(); - if (a_nlp_ == NULL) a_nlp_ = new ::audio_processing_unittest::Test_Statistic; - return a_nlp_; -} -inline ::audio_processing_unittest::Test_Statistic* Test_EchoMetrics::release_a_nlp() { - clear_has_a_nlp(); - ::audio_processing_unittest::Test_Statistic* temp = a_nlp_; - a_nlp_ = NULL; - return temp; -} - -// ------------------------------------------------------------------- - -// Test - -// optional int32 num_reverse_channels = 1; -inline bool Test::has_num_reverse_channels() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void Test::set_has_num_reverse_channels() { - _has_bits_[0] |= 0x00000001u; -} -inline void Test::clear_has_num_reverse_channels() { - _has_bits_[0] &= ~0x00000001u; -} -inline void Test::clear_num_reverse_channels() { - num_reverse_channels_ = 0; - clear_has_num_reverse_channels(); -} -inline ::google::protobuf::int32 Test::num_reverse_channels() const { - return num_reverse_channels_; -} -inline void Test::set_num_reverse_channels(::google::protobuf::int32 value) { - set_has_num_reverse_channels(); - num_reverse_channels_ = value; -} - -// optional int32 num_input_channels = 2; -inline bool Test::has_num_input_channels() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void Test::set_has_num_input_channels() { - _has_bits_[0] |= 0x00000002u; -} -inline void Test::clear_has_num_input_channels() { - _has_bits_[0] &= ~0x00000002u; -} -inline void Test::clear_num_input_channels() { - num_input_channels_ = 0; - clear_has_num_input_channels(); -} -inline ::google::protobuf::int32 Test::num_input_channels() const { - return num_input_channels_; -} -inline void Test::set_num_input_channels(::google::protobuf::int32 value) { - set_has_num_input_channels(); - num_input_channels_ = value; -} - -// optional int32 num_output_channels = 3; -inline bool Test::has_num_output_channels() const { - return (_has_bits_[0] & 0x00000004u) != 0; -} -inline void Test::set_has_num_output_channels() { - _has_bits_[0] |= 0x00000004u; -} -inline void Test::clear_has_num_output_channels() { - _has_bits_[0] &= ~0x00000004u; -} -inline void Test::clear_num_output_channels() { - num_output_channels_ = 0; - clear_has_num_output_channels(); -} -inline ::google::protobuf::int32 Test::num_output_channels() const { - return num_output_channels_; -} -inline void Test::set_num_output_channels(::google::protobuf::int32 value) { - set_has_num_output_channels(); - num_output_channels_ = value; -} - -// optional int32 sample_rate = 4; -inline bool Test::has_sample_rate() const { - return (_has_bits_[0] & 0x00000008u) != 0; -} -inline void Test::set_has_sample_rate() { - _has_bits_[0] |= 0x00000008u; -} -inline void Test::clear_has_sample_rate() { - _has_bits_[0] &= ~0x00000008u; -} -inline void Test::clear_sample_rate() { - sample_rate_ = 0; - clear_has_sample_rate(); -} -inline ::google::protobuf::int32 Test::sample_rate() const { - return sample_rate_; -} -inline void Test::set_sample_rate(::google::protobuf::int32 value) { - set_has_sample_rate(); - sample_rate_ = value; -} - -// repeated .audio_processing_unittest.Test.Frame frame = 5; -inline int Test::frame_size() const { - return frame_.size(); -} -inline void Test::clear_frame() { - frame_.Clear(); -} -inline const ::audio_processing_unittest::Test_Frame& Test::frame(int index) const { - return frame_.Get(index); -} -inline ::audio_processing_unittest::Test_Frame* Test::mutable_frame(int index) { - return frame_.Mutable(index); -} -inline ::audio_processing_unittest::Test_Frame* Test::add_frame() { - return frame_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::audio_processing_unittest::Test_Frame >& -Test::frame() const { - return frame_; -} -inline ::google::protobuf::RepeatedPtrField< ::audio_processing_unittest::Test_Frame >* -Test::mutable_frame() { - return &frame_; -} - -// optional int32 analog_level_average = 6; -inline bool Test::has_analog_level_average() const { - return (_has_bits_[0] & 0x00000020u) != 0; -} -inline void Test::set_has_analog_level_average() { - _has_bits_[0] |= 0x00000020u; -} -inline void Test::clear_has_analog_level_average() { - _has_bits_[0] &= ~0x00000020u; -} -inline void Test::clear_analog_level_average() { - analog_level_average_ = 0; - clear_has_analog_level_average(); -} -inline ::google::protobuf::int32 Test::analog_level_average() const { - return analog_level_average_; -} -inline void Test::set_analog_level_average(::google::protobuf::int32 value) { - set_has_analog_level_average(); - analog_level_average_ = value; -} - -// optional int32 max_output_average = 7; -inline bool Test::has_max_output_average() const { - return (_has_bits_[0] & 0x00000040u) != 0; -} -inline void Test::set_has_max_output_average() { - _has_bits_[0] |= 0x00000040u; -} -inline void Test::clear_has_max_output_average() { - _has_bits_[0] &= ~0x00000040u; -} -inline void Test::clear_max_output_average() { - max_output_average_ = 0; - clear_has_max_output_average(); -} -inline ::google::protobuf::int32 Test::max_output_average() const { - return max_output_average_; -} -inline void Test::set_max_output_average(::google::protobuf::int32 value) { - set_has_max_output_average(); - max_output_average_ = value; -} - -// optional int32 has_echo_count = 8; -inline bool Test::has_has_echo_count() const { - return (_has_bits_[0] & 0x00000080u) != 0; -} -inline void Test::set_has_has_echo_count() { - _has_bits_[0] |= 0x00000080u; -} -inline void Test::clear_has_has_echo_count() { - _has_bits_[0] &= ~0x00000080u; -} -inline void Test::clear_has_echo_count() { - has_echo_count_ = 0; - clear_has_has_echo_count(); -} -inline ::google::protobuf::int32 Test::has_echo_count() const { - return has_echo_count_; -} -inline void Test::set_has_echo_count(::google::protobuf::int32 value) { - set_has_has_echo_count(); - has_echo_count_ = value; -} - -// optional int32 has_voice_count = 9; -inline bool Test::has_has_voice_count() const { - return (_has_bits_[0] & 0x00000100u) != 0; -} -inline void Test::set_has_has_voice_count() { - _has_bits_[0] |= 0x00000100u; -} -inline void Test::clear_has_has_voice_count() { - _has_bits_[0] &= ~0x00000100u; -} -inline void Test::clear_has_voice_count() { - has_voice_count_ = 0; - clear_has_has_voice_count(); -} -inline ::google::protobuf::int32 Test::has_voice_count() const { - return has_voice_count_; -} -inline void Test::set_has_voice_count(::google::protobuf::int32 value) { - set_has_has_voice_count(); - has_voice_count_ = value; -} - -// optional int32 is_saturated_count = 10; -inline bool Test::has_is_saturated_count() const { - return (_has_bits_[0] & 0x00000200u) != 0; -} -inline void Test::set_has_is_saturated_count() { - _has_bits_[0] |= 0x00000200u; -} -inline void Test::clear_has_is_saturated_count() { - _has_bits_[0] &= ~0x00000200u; -} -inline void Test::clear_is_saturated_count() { - is_saturated_count_ = 0; - clear_has_is_saturated_count(); -} -inline ::google::protobuf::int32 Test::is_saturated_count() const { - return is_saturated_count_; -} -inline void Test::set_is_saturated_count(::google::protobuf::int32 value) { - set_has_is_saturated_count(); - is_saturated_count_ = value; -} - -// optional .audio_processing_unittest.Test.EchoMetrics echo_metrics = 11; -inline bool Test::has_echo_metrics() const { - return (_has_bits_[0] & 0x00000400u) != 0; -} -inline void Test::set_has_echo_metrics() { - _has_bits_[0] |= 0x00000400u; -} -inline void Test::clear_has_echo_metrics() { - _has_bits_[0] &= ~0x00000400u; -} -inline void Test::clear_echo_metrics() { - if (echo_metrics_ != NULL) echo_metrics_->::audio_processing_unittest::Test_EchoMetrics::Clear(); - clear_has_echo_metrics(); -} -inline const ::audio_processing_unittest::Test_EchoMetrics& Test::echo_metrics() const { - return echo_metrics_ != NULL ? *echo_metrics_ : *default_instance_->echo_metrics_; -} -inline ::audio_processing_unittest::Test_EchoMetrics* Test::mutable_echo_metrics() { - set_has_echo_metrics(); - if (echo_metrics_ == NULL) echo_metrics_ = new ::audio_processing_unittest::Test_EchoMetrics; - return echo_metrics_; -} -inline ::audio_processing_unittest::Test_EchoMetrics* Test::release_echo_metrics() { - clear_has_echo_metrics(); - ::audio_processing_unittest::Test_EchoMetrics* temp = echo_metrics_; - echo_metrics_ = NULL; - return temp; -} - -// ------------------------------------------------------------------- - -// OutputData - -// repeated .audio_processing_unittest.Test test = 1; -inline int OutputData::test_size() const { - return test_.size(); -} -inline void OutputData::clear_test() { - test_.Clear(); -} -inline const ::audio_processing_unittest::Test& OutputData::test(int index) const { - return test_.Get(index); -} -inline ::audio_processing_unittest::Test* OutputData::mutable_test(int index) { - return test_.Mutable(index); -} -inline ::audio_processing_unittest::Test* OutputData::add_test() { - return test_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::audio_processing_unittest::Test >& -OutputData::test() const { - return test_; -} -inline ::google::protobuf::RepeatedPtrField< ::audio_processing_unittest::Test >* -OutputData::mutable_test() { - return &test_; -} - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace audio_processing_unittest - -// @@protoc_insertion_point(global_scope) - -#endif // PROTOBUF_audio_5fprocessing_5funittest_2eproto__INCLUDED