amuse/lib/AudioGroupData.cpp

42 lines
999 B
C++
Raw Normal View History

#include "amuse/AudioGroupData.hpp"
2018-12-08 05:20:09 +00:00
namespace amuse {
2018-12-08 05:20:09 +00:00
IntrusiveAudioGroupData::~IntrusiveAudioGroupData() {
if (m_owns) {
delete[] m_pool;
delete[] m_proj;
delete[] m_sdir;
delete[] m_samp;
}
}
2016-12-11 01:52:42 +00:00
IntrusiveAudioGroupData::IntrusiveAudioGroupData(IntrusiveAudioGroupData&& other) noexcept
2016-07-14 04:54:46 +00:00
: AudioGroupData(other.m_proj, other.m_projSz, other.m_pool, other.m_poolSz, other.m_sdir, other.m_sdirSz, other.m_samp,
2018-12-08 05:20:09 +00:00
other.m_sampSz, other.m_fmt, other.m_absOffs) {
m_owns = other.m_owns;
other.m_owns = false;
}
2018-12-08 05:20:09 +00:00
IntrusiveAudioGroupData& IntrusiveAudioGroupData::operator=(IntrusiveAudioGroupData&& other) noexcept {
if (m_owns) {
delete[] m_pool;
delete[] m_proj;
delete[] m_sdir;
delete[] m_samp;
}
2016-05-18 01:01:37 +00:00
2018-12-08 05:20:09 +00:00
m_owns = other.m_owns;
other.m_owns = false;
2018-12-08 05:20:09 +00:00
m_proj = other.m_proj;
m_pool = other.m_pool;
m_sdir = other.m_sdir;
m_samp = other.m_samp;
m_fmt = other.m_fmt;
m_absOffs = other.m_absOffs;
2018-12-08 05:20:09 +00:00
return *this;
}
2018-12-08 05:20:09 +00:00
} // namespace amuse