Currently when a SOFA file fails to load, there is only an error message printed but the caller is not informed of the failure in any way, which makes it impossible to know programmatically that something went wrong.
|
std::cout << "Could not load the SOFA HRTF." << std::endl; |
When the caller continues with the processing as it does not know about the error, the program crashes or aborts with the following assertion:
Assertion failed: (gains.size() == m_nCh), function calculateGains, file DirectSpeakersGainCalc.cpp, line 112.
Currently when a SOFA file fails to load, there is only an error message printed but the caller is not informed of the failure in any way, which makes it impossible to know programmatically that something went wrong.
libspatialaudio/source/hrtf/sofa_hrtf.cpp
Line 23 in 7946d98
When the caller continues with the processing as it does not know about the error, the program crashes or aborts with the following assertion: