| 23 | namespace api { |
| 24 | |
| 25 | CImpulseResponse::CImpulseResponse(CContext* context, const IPLImpulseResponseSettings* settings) |
| 26 | { |
| 27 | if (!context || !settings) |
| 28 | throw Exception(Status::Failure); |
| 29 | |
| 30 | auto _context = context->mHandle.get(); |
| 31 | auto _duration = settings->duration; |
| 32 | auto _order = settings->order; |
| 33 | auto _samplingRate = settings->samplingRate; |
| 34 | |
| 35 | if (!_context) |
| 36 | throw Exception(Status::Failure); |
| 37 | |
| 38 | new (&mHandle) Handle<ImpulseResponse>(ipl::make_shared<ImpulseResponse>(_duration, _order, _samplingRate), _context); |
| 39 | } |
| 40 | |
| 41 | IImpulseResponse* CImpulseResponse::retain() |
| 42 | { |