mirror of https://github.com/bjornbytes/lovr.git
Hold lock when changing geometry (prevents crash, see issue #403)
This commit is contained in:
parent
fa47ecbdd3
commit
d558996206
|
@ -393,7 +393,10 @@ void lovrAudioSetPose(float position[4], float orientation[4]) {
|
|||
}
|
||||
|
||||
bool lovrAudioSetGeometry(float* vertices, uint32_t* indices, uint32_t vertexCount, uint32_t indexCount, AudioMaterial material) {
|
||||
return state.spatializer->setGeometry(vertices, indices, vertexCount, indexCount, material);
|
||||
ma_mutex_lock(&state.lock);
|
||||
bool success = state.spatializer->setGeometry(vertices, indices, vertexCount, indexCount, material);
|
||||
ma_mutex_unlock(&state.lock);
|
||||
return success;
|
||||
}
|
||||
|
||||
const char* lovrAudioGetSpatializer() {
|
||||
|
|
Loading…
Reference in New Issue