| 53 | } |
| 54 | |
| 55 | CPathEffect::CPathEffect(CContext* context, |
| 56 | IPLAudioSettings* audioSettings, |
| 57 | IPLPathEffectSettings* effectSettings) |
| 58 | { |
| 59 | auto _context = context->mHandle.get(); |
| 60 | if (!_context) |
| 61 | throw Exception(Status::Failure); |
| 62 | |
| 63 | AudioSettings _audioSettings{}; |
| 64 | _audioSettings.samplingRate = audioSettings->samplingRate; |
| 65 | _audioSettings.frameSize = audioSettings->frameSize; |
| 66 | |
| 67 | SpeakerLayout _speakerLayout{}; |
| 68 | |
| 69 | PathEffectSettings _effectSettings{}; |
| 70 | _effectSettings.maxOrder = effectSettings->maxOrder; |
| 71 | |
| 72 | if (Context::isCallerAPIVersionAtLeast(4, 4)) |
| 73 | { |
| 74 | _effectSettings.spatialize = (effectSettings->spatialize == IPL_TRUE); |
| 75 | |
| 76 | _speakerLayout = SpeakerLayout(static_cast<SpeakerLayoutType>(effectSettings->speakerLayout.type), |
| 77 | effectSettings->speakerLayout.numSpeakers, |
| 78 | reinterpret_cast<Vector3f*>(effectSettings->speakerLayout.speakers)); |
| 79 | |
| 80 | _effectSettings.speakerLayout = &_speakerLayout; |
| 81 | |
| 82 | _effectSettings.hrtf = effectSettings->hrtf ? reinterpret_cast<CHRTF*>(effectSettings->hrtf)->mHandle.get().get() : nullptr; |
| 83 | } |
| 84 | |
| 85 | new (&mHandle) Handle<PathEffect>(ipl::make_shared<PathEffect>(_audioSettings, _effectSettings), _context); |
| 86 | } |
| 87 | |
| 88 | IPathEffect* CPathEffect::retain() |
| 89 | { |
nothing calls this directly
no test coverage detected