Skip to content

Throw when unable to initialize mysofa#89

Open
ePirat wants to merge 1 commit intovideolan:masterfrom
ePirat:epirat-fix-missing-hrtf-crash
Open

Throw when unable to initialize mysofa#89
ePirat wants to merge 1 commit intovideolan: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
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

1 participant