2016-05-02 18:16:26 -07:00
|
|
|
#include "amuse/AudioGroupData.hpp"
|
|
|
|
|
2018-12-07 21:20:09 -08:00
|
|
|
namespace amuse {
|
2016-05-02 18:16:26 -07:00
|
|
|
|
2018-12-07 21:20:09 -08:00
|
|
|
IntrusiveAudioGroupData::~IntrusiveAudioGroupData() {
|
|
|
|
if (m_owns) {
|
|
|
|
delete[] m_pool;
|
|
|
|
delete[] m_proj;
|
|
|
|
delete[] m_sdir;
|
|
|
|
delete[] m_samp;
|
|
|
|
}
|
2016-05-17 17:59:44 -07:00
|
|
|
}
|
|
|
|
|
2016-12-10 17:52:42 -08:00
|
|
|
IntrusiveAudioGroupData::IntrusiveAudioGroupData(IntrusiveAudioGroupData&& other) noexcept
|
2016-07-13 21:54:46 -07: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-07 21:20:09 -08:00
|
|
|
other.m_sampSz, other.m_fmt, other.m_absOffs) {
|
|
|
|
m_owns = other.m_owns;
|
|
|
|
other.m_owns = false;
|
2016-05-17 17:59:44 -07:00
|
|
|
}
|
|
|
|
|
2018-12-07 21:20:09 -08:00
|
|
|
IntrusiveAudioGroupData& IntrusiveAudioGroupData::operator=(IntrusiveAudioGroupData&& other) noexcept {
|
|
|
|
if (m_owns) {
|
|
|
|
delete[] m_pool;
|
|
|
|
delete[] m_proj;
|
|
|
|
delete[] m_sdir;
|
|
|
|
delete[] m_samp;
|
|
|
|
}
|
2016-05-17 18:01:37 -07:00
|
|
|
|
2018-12-07 21:20:09 -08:00
|
|
|
m_owns = other.m_owns;
|
|
|
|
other.m_owns = false;
|
2016-05-17 17:59:44 -07:00
|
|
|
|
2018-12-07 21:20:09 -08: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;
|
2016-05-17 17:59:44 -07:00
|
|
|
|
2018-12-07 21:20:09 -08:00
|
|
|
return *this;
|
2016-05-02 18:16:26 -07:00
|
|
|
}
|
2018-12-07 21:20:09 -08:00
|
|
|
} // namespace amuse
|