|
|
@@ -534,6 +534,9 @@ uncache_sound(const Filename &file_name) {
|
|
|
vfs->resolve_filename(path, get_model_path());
|
|
|
|
|
|
SampleCache::iterator sci = _sample_cache.find(path);
|
|
|
+ if (sci == _sample_cache.end()) {
|
|
|
+ sci = _sample_cache.find(file_name);
|
|
|
+ }
|
|
|
if (sci != _sample_cache.end()) {
|
|
|
SoundData *sd = (*sci).second;
|
|
|
if (sd->_client_count == 0) {
|
|
|
@@ -542,6 +545,19 @@ uncache_sound(const Filename &file_name) {
|
|
|
delete sd;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ ExpirationQueue::iterator exqi;
|
|
|
+ for (exqi = _expiring_streams.begin(); exqi != _expiring_streams.end();) {
|
|
|
+ SoundData *sd = (SoundData *)(*exqi);
|
|
|
+ if (sd->_client_count == 0) {
|
|
|
+ if (sd->_movie->get_filename() == path ||
|
|
|
+ sd->_movie->get_filename() == file_name) {
|
|
|
+ exqi = _expiring_streams.erase(exqi);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ++exqi;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|