| 25 | namespace api { |
| 26 | |
| 27 | CReconstructor::CReconstructor(CContext* context, const IPLReconstructorSettings* settings) |
| 28 | { |
| 29 | if (!context || !settings) |
| 30 | throw Exception(Status::Failure); |
| 31 | |
| 32 | auto _context = context->mHandle.get(); |
| 33 | auto _maxDuration = settings->maxDuration; |
| 34 | auto _maxOrder = settings->maxOrder; |
| 35 | auto _samplingRate = settings->samplingRate; |
| 36 | |
| 37 | if (!_context) |
| 38 | throw Exception(Status::Failure); |
| 39 | |
| 40 | new (&mHandle) Handle<Reconstructor>(ipl::make_shared<Reconstructor>(_maxDuration, _maxOrder, _samplingRate), _context); |
| 41 | new (&mTempEnergyFields) vector<const EnergyField*>(); |
| 42 | new (&mTempDistanceAttenuation) vector<const float*>(); |
| 43 | new (&mTempAirAbsorption) vector<AirAbsorptionModel*>(); |
| 44 | new (&mTempImpulseResponses) vector<ImpulseResponse*>(); |
| 45 | } |
| 46 | |
| 47 | CReconstructor* CReconstructor::retain() |
| 48 | { |