Skip to content

Throw when unable to initialize mysofa#89

Merged
jbkempf merged 1 commit into
videolan:masterfrom
ePirat:epirat-fix-missing-hrtf-crash
May 7, 2026
Merged

Throw when unable to initialize mysofa#89
jbkempf merged 1 commit into
videolan:masterfrom
ePirat:epirat-fix-missing-hrtf-crash

Conversation

@ePirat
Copy link
Copy Markdown
Collaborator

@ePirat ePirat commented May 6, 2026

Do not silently create a unusable SOFA_HRTF object, instead throw an exception when mysofa did not initialize properly, like when provided with no or a unusable/bogus HRTF file.

That way the caller can properly handle this error condition instead of crashing later due to the nullptr.

While this technically breaks the API contract, as this did not throw before, this is clearly a better outcome than not handling the error.

Fix #88

Do not silently create a unusable SOFA_HRTF object, instead throw an
exception when mysofa did not initialize properly, like when provided
with no or a unusable/bogus HRTF file.

That way the caller can properly handle this error condition instead of
crashing later due to the nullptr.

While this technically breaks the API contract, as this did not throw
before, this is clearly a better outcome than not handling the error.
@ePirat ePirat self-assigned this May 6, 2026
@ePirat ePirat added this to the v0.4.1 Release milestone May 6, 2026
@jbkempf jbkempf merged commit 5dda58e into videolan:master May 7, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Actually handle failure to load SOFA file

2 participants