I'm getting pretty annoyed with this cache-release bug :P

This commit is contained in:
Bill Currie 2007-03-27 03:42:11 +00:00 committed by Jeff Teunissen
parent 3bc7921a99
commit e994e622b5

View file

@ -108,8 +108,14 @@ SND_CacheRelease (sfx_t *sfx)
block->buffer = 0;
// due to the possibly asynchronous nature of the mixer, the cache
// may have been flushed behind our backs
if (block->cache.data)
if (block->cache.data) {
if (!Cache_ReadLock (&bloc->cache)) {
Sys_Printf ("WARNING: taniwha screwed up in the sound engine: %s\n",
sfx->name);
return;
}
Cache_Release (&block->cache);
}
}
sfxbuffer_t *