Browse Source

Audio: don't crash when asking for HRTF specifier string.

The ALC_SOFTX_HRTF extension apparently doesn't have this query yet so
it returns nullptr.
pull/231/head
Vladimír Vondruš 8 years ago
parent
commit
afe4f4dd28
  1. 3
      src/Magnum/Audio/Context.cpp

3
src/Magnum/Audio/Context.cpp

@ -193,7 +193,8 @@ Context::HrtfStatus Context::hrtfStatus() const {
}
std::string Context::hrtfSpecifier() const {
return alcGetString(_device, ALC_HRTF_SPECIFIER_SOFT);
/* Returns a string on ALC_SOFT_HRTF, nullptr on ALC_SOFTX_HRTF */
return Utility::String::fromArray(alcGetString(_device, ALC_HRTF_SPECIFIER_SOFT));
}
std::string Context::deviceSpecifierString() const {

Loading…
Cancel
Save