// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: waveform.proto

#include "waveform.pb.h"

#include <algorithm>

#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>

PROTOBUF_PRAGMA_INIT_SEG

namespace _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = _pb::internal;

namespace mixxx {
namespace track {
namespace io {
PROTOBUF_CONSTEXPR Waveform_Signal::Waveform_Signal(
    ::_pbi::ConstantInitialized)
  : value_()
  , units_(0)

  , max_value_(0)
  , min_value_(0)
  , channels_(2){}
struct Waveform_SignalDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Waveform_SignalDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~Waveform_SignalDefaultTypeInternal() {}
  union {
    Waveform_Signal _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Waveform_SignalDefaultTypeInternal _Waveform_Signal_default_instance_;
PROTOBUF_CONSTEXPR Waveform_FilteredSignal::Waveform_FilteredSignal(
    ::_pbi::ConstantInitialized)
  : low_(nullptr)
  , mid_(nullptr)
  , high_(nullptr)
  , low_cutoff_frequency_(0)
  , mid_low_cutoff_frequency_(0)
  , mid_high_cutoff_frequency_(0)
  , high_cutoff_frequency_(0){}
struct Waveform_FilteredSignalDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Waveform_FilteredSignalDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~Waveform_FilteredSignalDefaultTypeInternal() {}
  union {
    Waveform_FilteredSignal _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Waveform_FilteredSignalDefaultTypeInternal _Waveform_FilteredSignal_default_instance_;
PROTOBUF_CONSTEXPR Waveform::Waveform(
    ::_pbi::ConstantInitialized)
  : signal_all_(nullptr)
  , signal_filtered_(nullptr)
  , visual_sample_rate_(0)
  , audio_visual_ratio_(0){}
struct WaveformDefaultTypeInternal {
  PROTOBUF_CONSTEXPR WaveformDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~WaveformDefaultTypeInternal() {}
  union {
    Waveform _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WaveformDefaultTypeInternal _Waveform_default_instance_;
}  // namespace io
}  // namespace track
}  // namespace mixxx
namespace mixxx {
namespace track {
namespace io {
bool Waveform_Units_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> Waveform_Units_strings[2] = {};

static const char Waveform_Units_names[] =
  "AMPLITUDE"
  "RMS";

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Waveform_Units_entries[] = {
  { {Waveform_Units_names + 0, 9}, 1 },
  { {Waveform_Units_names + 9, 3}, 0 },
};

static const int Waveform_Units_entries_by_number[] = {
  1, // 0 -> RMS
  0, // 1 -> AMPLITUDE
};

const std::string& Waveform_Units_Name(
    Waveform_Units value) {
  static const bool dummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Waveform_Units_entries,
          Waveform_Units_entries_by_number,
          2, Waveform_Units_strings);
  (void) dummy;
  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Waveform_Units_entries,
      Waveform_Units_entries_by_number,
      2, value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
                     Waveform_Units_strings[idx].get();
}
bool Waveform_Units_Parse(
    ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Waveform_Units* value) {
  int int_value;
  bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
      Waveform_Units_entries, 2, name, &int_value);
  if (success) {
    *value = static_cast<Waveform_Units>(int_value);
  }
  return success;
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr Waveform_Units Waveform::RMS;
constexpr Waveform_Units Waveform::AMPLITUDE;
constexpr Waveform_Units Waveform::Units_MIN;
constexpr Waveform_Units Waveform::Units_MAX;
constexpr int Waveform::Units_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))

// ===================================================================

class Waveform_Signal::_Internal {
 public:
  using HasBits = decltype(std::declval<Waveform_Signal>()._has_bits_);
  static void set_has_channels(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_units(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_max_value(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_min_value(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
};

Waveform_Signal::Waveform_Signal(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned),
  value_(arena) {
  SharedCtor();
  // @@protoc_insertion_point(arena_constructor:mixxx.track.io.Waveform.Signal)
}
Waveform_Signal::Waveform_Signal(const Waveform_Signal& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_),
      value_(from.value_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  ::memcpy(&units_, &from.units_,
    static_cast<size_t>(reinterpret_cast<char*>(&channels_) -
    reinterpret_cast<char*>(&units_)) + sizeof(channels_));
  // @@protoc_insertion_point(copy_constructor:mixxx.track.io.Waveform.Signal)
}

inline void Waveform_Signal::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&units_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&min_value_) -
    reinterpret_cast<char*>(&units_)) + sizeof(min_value_));
channels_ = 2;
}

Waveform_Signal::~Waveform_Signal() {
  // @@protoc_insertion_point(destructor:mixxx.track.io.Waveform.Signal)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Waveform_Signal::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void Waveform_Signal::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void Waveform_Signal::Clear() {
// @@protoc_insertion_point(message_clear_start:mixxx.track.io.Waveform.Signal)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  value_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    ::memset(&units_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&min_value_) -
        reinterpret_cast<char*>(&units_)) + sizeof(min_value_));
    channels_ = 2;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* Waveform_Signal::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated int32 value = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<8>(ptr));
        } else if (static_cast<uint8_t>(tag) == 10) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_value(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 channels = 2 [default = 2];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_channels(&has_bits);
          channels_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .mixxx.track.io.Waveform.Units units = 3 [default = RMS];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::mixxx::track::io::Waveform_Units_IsValid(val))) {
            _internal_set_units(static_cast<::mixxx::track::io::Waveform_Units>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional int32 max_value = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_max_value(&has_bits);
          max_value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 min_value = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_min_value(&has_bits);
          min_value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* Waveform_Signal::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:mixxx.track.io.Waveform.Signal)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated int32 value = 1;
  for (int i = 0, n = this->_internal_value_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_value(i), target);
  }

  cached_has_bits = _has_bits_[0];
  // optional int32 channels = 2 [default = 2];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_channels(), target);
  }

  // optional .mixxx.track.io.Waveform.Units units = 3 [default = RMS];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      3, this->_internal_units(), target);
  }

  // optional int32 max_value = 4;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_max_value(), target);
  }

  // optional int32 min_value = 5;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_min_value(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:mixxx.track.io.Waveform.Signal)
  return target;
}

size_t Waveform_Signal::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:mixxx.track.io.Waveform.Signal)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated int32 value = 1;
  {
    size_t data_size = ::_pbi::WireFormatLite::
      Int32Size(this->value_);
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_value_size());
    total_size += data_size;
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    // optional .mixxx.track.io.Waveform.Units units = 3 [default = RMS];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_units());
    }

    // optional int32 max_value = 4;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_max_value());
    }

    // optional int32 min_value = 5;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_min_value());
    }

    // optional int32 channels = 2 [default = 2];
    if (cached_has_bits & 0x00000008u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_channels());
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void Waveform_Signal::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Waveform_Signal*>(
      &from));
}

void Waveform_Signal::MergeFrom(const Waveform_Signal& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:mixxx.track.io.Waveform.Signal)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  value_.MergeFrom(from.value_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      units_ = from.units_;
    }
    if (cached_has_bits & 0x00000002u) {
      max_value_ = from.max_value_;
    }
    if (cached_has_bits & 0x00000004u) {
      min_value_ = from.min_value_;
    }
    if (cached_has_bits & 0x00000008u) {
      channels_ = from.channels_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Waveform_Signal::CopyFrom(const Waveform_Signal& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:mixxx.track.io.Waveform.Signal)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Waveform_Signal::IsInitialized() const {
  return true;
}

void Waveform_Signal::InternalSwap(Waveform_Signal* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  value_.InternalSwap(&other->value_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Waveform_Signal, min_value_)
      + sizeof(Waveform_Signal::min_value_)
      - PROTOBUF_FIELD_OFFSET(Waveform_Signal, units_)>(
          reinterpret_cast<char*>(&units_),
          reinterpret_cast<char*>(&other->units_));
  swap(channels_, other->channels_);
}

std::string Waveform_Signal::GetTypeName() const {
  return "mixxx.track.io.Waveform.Signal";
}


// ===================================================================

class Waveform_FilteredSignal::_Internal {
 public:
  using HasBits = decltype(std::declval<Waveform_FilteredSignal>()._has_bits_);
  static const ::mixxx::track::io::Waveform_Signal& low(const Waveform_FilteredSignal* msg);
  static void set_has_low(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::mixxx::track::io::Waveform_Signal& mid(const Waveform_FilteredSignal* msg);
  static void set_has_mid(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::mixxx::track::io::Waveform_Signal& high(const Waveform_FilteredSignal* msg);
  static void set_has_high(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_low_cutoff_frequency(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_mid_low_cutoff_frequency(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_mid_high_cutoff_frequency(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_high_cutoff_frequency(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
};

const ::mixxx::track::io::Waveform_Signal&
Waveform_FilteredSignal::_Internal::low(const Waveform_FilteredSignal* msg) {
  return *msg->low_;
}
const ::mixxx::track::io::Waveform_Signal&
Waveform_FilteredSignal::_Internal::mid(const Waveform_FilteredSignal* msg) {
  return *msg->mid_;
}
const ::mixxx::track::io::Waveform_Signal&
Waveform_FilteredSignal::_Internal::high(const Waveform_FilteredSignal* msg) {
  return *msg->high_;
}
Waveform_FilteredSignal::Waveform_FilteredSignal(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
  SharedCtor();
  // @@protoc_insertion_point(arena_constructor:mixxx.track.io.Waveform.FilteredSignal)
}
Waveform_FilteredSignal::Waveform_FilteredSignal(const Waveform_FilteredSignal& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if (from._internal_has_low()) {
    low_ = new ::mixxx::track::io::Waveform_Signal(*from.low_);
  } else {
    low_ = nullptr;
  }
  if (from._internal_has_mid()) {
    mid_ = new ::mixxx::track::io::Waveform_Signal(*from.mid_);
  } else {
    mid_ = nullptr;
  }
  if (from._internal_has_high()) {
    high_ = new ::mixxx::track::io::Waveform_Signal(*from.high_);
  } else {
    high_ = nullptr;
  }
  ::memcpy(&low_cutoff_frequency_, &from.low_cutoff_frequency_,
    static_cast<size_t>(reinterpret_cast<char*>(&high_cutoff_frequency_) -
    reinterpret_cast<char*>(&low_cutoff_frequency_)) + sizeof(high_cutoff_frequency_));
  // @@protoc_insertion_point(copy_constructor:mixxx.track.io.Waveform.FilteredSignal)
}

inline void Waveform_FilteredSignal::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&low_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&high_cutoff_frequency_) -
    reinterpret_cast<char*>(&low_)) + sizeof(high_cutoff_frequency_));
}

Waveform_FilteredSignal::~Waveform_FilteredSignal() {
  // @@protoc_insertion_point(destructor:mixxx.track.io.Waveform.FilteredSignal)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Waveform_FilteredSignal::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete low_;
  if (this != internal_default_instance()) delete mid_;
  if (this != internal_default_instance()) delete high_;
}

void Waveform_FilteredSignal::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void Waveform_FilteredSignal::Clear() {
// @@protoc_insertion_point(message_clear_start:mixxx.track.io.Waveform.FilteredSignal)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(low_ != nullptr);
      low_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(mid_ != nullptr);
      mid_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      GOOGLE_DCHECK(high_ != nullptr);
      high_->Clear();
    }
  }
  if (cached_has_bits & 0x00000078u) {
    ::memset(&low_cutoff_frequency_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&high_cutoff_frequency_) -
        reinterpret_cast<char*>(&low_cutoff_frequency_)) + sizeof(high_cutoff_frequency_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* Waveform_FilteredSignal::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .mixxx.track.io.Waveform.Signal low = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_low(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .mixxx.track.io.Waveform.Signal mid = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_mid(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .mixxx.track.io.Waveform.Signal high = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_high(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional double low_cutoff_frequency = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 33)) {
          _Internal::set_has_low_cutoff_frequency(&has_bits);
          low_cutoff_frequency_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      // optional double mid_low_cutoff_frequency = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 41)) {
          _Internal::set_has_mid_low_cutoff_frequency(&has_bits);
          mid_low_cutoff_frequency_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      // optional double mid_high_cutoff_frequency = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 49)) {
          _Internal::set_has_mid_high_cutoff_frequency(&has_bits);
          mid_high_cutoff_frequency_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      // optional double high_cutoff_frequency = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 57)) {
          _Internal::set_has_high_cutoff_frequency(&has_bits);
          high_cutoff_frequency_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* Waveform_FilteredSignal::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:mixxx.track.io.Waveform.FilteredSignal)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .mixxx.track.io.Waveform.Signal low = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::low(this),
        _Internal::low(this).GetCachedSize(), target, stream);
  }

  // optional .mixxx.track.io.Waveform.Signal mid = 2;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::mid(this),
        _Internal::mid(this).GetCachedSize(), target, stream);
  }

  // optional .mixxx.track.io.Waveform.Signal high = 3;
  if (cached_has_bits & 0x00000004u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(3, _Internal::high(this),
        _Internal::high(this).GetCachedSize(), target, stream);
  }

  // optional double low_cutoff_frequency = 4;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteDoubleToArray(4, this->_internal_low_cutoff_frequency(), target);
  }

  // optional double mid_low_cutoff_frequency = 5;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteDoubleToArray(5, this->_internal_mid_low_cutoff_frequency(), target);
  }

  // optional double mid_high_cutoff_frequency = 6;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteDoubleToArray(6, this->_internal_mid_high_cutoff_frequency(), target);
  }

  // optional double high_cutoff_frequency = 7;
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteDoubleToArray(7, this->_internal_high_cutoff_frequency(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:mixxx.track.io.Waveform.FilteredSignal)
  return target;
}

size_t Waveform_FilteredSignal::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:mixxx.track.io.Waveform.FilteredSignal)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000007fu) {
    // optional .mixxx.track.io.Waveform.Signal low = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *low_);
    }

    // optional .mixxx.track.io.Waveform.Signal mid = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *mid_);
    }

    // optional .mixxx.track.io.Waveform.Signal high = 3;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *high_);
    }

    // optional double low_cutoff_frequency = 4;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 + 8;
    }

    // optional double mid_low_cutoff_frequency = 5;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 + 8;
    }

    // optional double mid_high_cutoff_frequency = 6;
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 + 8;
    }

    // optional double high_cutoff_frequency = 7;
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 + 8;
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void Waveform_FilteredSignal::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Waveform_FilteredSignal*>(
      &from));
}

void Waveform_FilteredSignal::MergeFrom(const Waveform_FilteredSignal& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:mixxx.track.io.Waveform.FilteredSignal)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000007fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_low()->::mixxx::track::io::Waveform_Signal::MergeFrom(from._internal_low());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_mid()->::mixxx::track::io::Waveform_Signal::MergeFrom(from._internal_mid());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_mutable_high()->::mixxx::track::io::Waveform_Signal::MergeFrom(from._internal_high());
    }
    if (cached_has_bits & 0x00000008u) {
      low_cutoff_frequency_ = from.low_cutoff_frequency_;
    }
    if (cached_has_bits & 0x00000010u) {
      mid_low_cutoff_frequency_ = from.mid_low_cutoff_frequency_;
    }
    if (cached_has_bits & 0x00000020u) {
      mid_high_cutoff_frequency_ = from.mid_high_cutoff_frequency_;
    }
    if (cached_has_bits & 0x00000040u) {
      high_cutoff_frequency_ = from.high_cutoff_frequency_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Waveform_FilteredSignal::CopyFrom(const Waveform_FilteredSignal& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:mixxx.track.io.Waveform.FilteredSignal)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Waveform_FilteredSignal::IsInitialized() const {
  return true;
}

void Waveform_FilteredSignal::InternalSwap(Waveform_FilteredSignal* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Waveform_FilteredSignal, high_cutoff_frequency_)
      + sizeof(Waveform_FilteredSignal::high_cutoff_frequency_)
      - PROTOBUF_FIELD_OFFSET(Waveform_FilteredSignal, low_)>(
          reinterpret_cast<char*>(&low_),
          reinterpret_cast<char*>(&other->low_));
}

std::string Waveform_FilteredSignal::GetTypeName() const {
  return "mixxx.track.io.Waveform.FilteredSignal";
}


// ===================================================================

class Waveform::_Internal {
 public:
  using HasBits = decltype(std::declval<Waveform>()._has_bits_);
  static void set_has_visual_sample_rate(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_audio_visual_ratio(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static const ::mixxx::track::io::Waveform_Signal& signal_all(const Waveform* msg);
  static void set_has_signal_all(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::mixxx::track::io::Waveform_FilteredSignal& signal_filtered(const Waveform* msg);
  static void set_has_signal_filtered(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::mixxx::track::io::Waveform_Signal&
Waveform::_Internal::signal_all(const Waveform* msg) {
  return *msg->signal_all_;
}
const ::mixxx::track::io::Waveform_FilteredSignal&
Waveform::_Internal::signal_filtered(const Waveform* msg) {
  return *msg->signal_filtered_;
}
Waveform::Waveform(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
  SharedCtor();
  // @@protoc_insertion_point(arena_constructor:mixxx.track.io.Waveform)
}
Waveform::Waveform(const Waveform& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if (from._internal_has_signal_all()) {
    signal_all_ = new ::mixxx::track::io::Waveform_Signal(*from.signal_all_);
  } else {
    signal_all_ = nullptr;
  }
  if (from._internal_has_signal_filtered()) {
    signal_filtered_ = new ::mixxx::track::io::Waveform_FilteredSignal(*from.signal_filtered_);
  } else {
    signal_filtered_ = nullptr;
  }
  ::memcpy(&visual_sample_rate_, &from.visual_sample_rate_,
    static_cast<size_t>(reinterpret_cast<char*>(&audio_visual_ratio_) -
    reinterpret_cast<char*>(&visual_sample_rate_)) + sizeof(audio_visual_ratio_));
  // @@protoc_insertion_point(copy_constructor:mixxx.track.io.Waveform)
}

inline void Waveform::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&signal_all_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&audio_visual_ratio_) -
    reinterpret_cast<char*>(&signal_all_)) + sizeof(audio_visual_ratio_));
}

Waveform::~Waveform() {
  // @@protoc_insertion_point(destructor:mixxx.track.io.Waveform)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Waveform::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete signal_all_;
  if (this != internal_default_instance()) delete signal_filtered_;
}

void Waveform::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void Waveform::Clear() {
// @@protoc_insertion_point(message_clear_start:mixxx.track.io.Waveform)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(signal_all_ != nullptr);
      signal_all_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(signal_filtered_ != nullptr);
      signal_filtered_->Clear();
    }
  }
  if (cached_has_bits & 0x0000000cu) {
    ::memset(&visual_sample_rate_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&audio_visual_ratio_) -
        reinterpret_cast<char*>(&visual_sample_rate_)) + sizeof(audio_visual_ratio_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* Waveform::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional double visual_sample_rate = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 9)) {
          _Internal::set_has_visual_sample_rate(&has_bits);
          visual_sample_rate_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      // optional double audio_visual_ratio = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 17)) {
          _Internal::set_has_audio_visual_ratio(&has_bits);
          audio_visual_ratio_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      // optional .mixxx.track.io.Waveform.Signal signal_all = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_signal_all(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .mixxx.track.io.Waveform.FilteredSignal signal_filtered = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_signal_filtered(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* Waveform::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:mixxx.track.io.Waveform)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional double visual_sample_rate = 1;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteDoubleToArray(1, this->_internal_visual_sample_rate(), target);
  }

  // optional double audio_visual_ratio = 2;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteDoubleToArray(2, this->_internal_audio_visual_ratio(), target);
  }

  // optional .mixxx.track.io.Waveform.Signal signal_all = 3;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(3, _Internal::signal_all(this),
        _Internal::signal_all(this).GetCachedSize(), target, stream);
  }

  // optional .mixxx.track.io.Waveform.FilteredSignal signal_filtered = 4;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(4, _Internal::signal_filtered(this),
        _Internal::signal_filtered(this).GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:mixxx.track.io.Waveform)
  return target;
}

size_t Waveform::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:mixxx.track.io.Waveform)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    // optional .mixxx.track.io.Waveform.Signal signal_all = 3;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *signal_all_);
    }

    // optional .mixxx.track.io.Waveform.FilteredSignal signal_filtered = 4;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *signal_filtered_);
    }

    // optional double visual_sample_rate = 1;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 + 8;
    }

    // optional double audio_visual_ratio = 2;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 + 8;
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
  }
  int cached_size = ::_pbi::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void Waveform::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Waveform*>(
      &from));
}

void Waveform::MergeFrom(const Waveform& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:mixxx.track.io.Waveform)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_signal_all()->::mixxx::track::io::Waveform_Signal::MergeFrom(from._internal_signal_all());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_signal_filtered()->::mixxx::track::io::Waveform_FilteredSignal::MergeFrom(from._internal_signal_filtered());
    }
    if (cached_has_bits & 0x00000004u) {
      visual_sample_rate_ = from.visual_sample_rate_;
    }
    if (cached_has_bits & 0x00000008u) {
      audio_visual_ratio_ = from.audio_visual_ratio_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Waveform::CopyFrom(const Waveform& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:mixxx.track.io.Waveform)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Waveform::IsInitialized() const {
  return true;
}

void Waveform::InternalSwap(Waveform* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Waveform, audio_visual_ratio_)
      + sizeof(Waveform::audio_visual_ratio_)
      - PROTOBUF_FIELD_OFFSET(Waveform, signal_all_)>(
          reinterpret_cast<char*>(&signal_all_),
          reinterpret_cast<char*>(&other->signal_all_));
}

std::string Waveform::GetTypeName() const {
  return "mixxx.track.io.Waveform";
}


// @@protoc_insertion_point(namespace_scope)
}  // namespace io
}  // namespace track
}  // namespace mixxx
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::mixxx::track::io::Waveform_Signal*
Arena::CreateMaybeMessage< ::mixxx::track::io::Waveform_Signal >(Arena* arena) {
  return Arena::CreateMessageInternal< ::mixxx::track::io::Waveform_Signal >(arena);
}
template<> PROTOBUF_NOINLINE ::mixxx::track::io::Waveform_FilteredSignal*
Arena::CreateMaybeMessage< ::mixxx::track::io::Waveform_FilteredSignal >(Arena* arena) {
  return Arena::CreateMessageInternal< ::mixxx::track::io::Waveform_FilteredSignal >(arena);
}
template<> PROTOBUF_NOINLINE ::mixxx::track::io::Waveform*
Arena::CreateMaybeMessage< ::mixxx::track::io::Waveform >(Arena* arena) {
  return Arena::CreateMessageInternal< ::mixxx::track::io::Waveform >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
