16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-20 03:19:19 +02:00

audio source reinitialization fix, sound volume level tweaks

This commit is contained in:
tmj-fstate
2017-11-30 16:37:25 +01:00
parent ef2195fbcc
commit 34f96595fd
9 changed files with 222 additions and 160 deletions

View File

@@ -128,7 +128,18 @@ buffer_manager::create( std::string const &Filename ) {
return emplace( filelookup );
}
}
// if dynamic-specific lookup finds nothing, try the default sound folder
if( filename.find( '/' ) != std::string::npos ) {
// if the filename includes path, try to use it directly
lookup = find_buffer( filename );
if( lookup != null_handle ) {
return lookup;
}
filelookup = find_file( filename );
if( false == filelookup.empty() ) {
return emplace( filelookup );
}
}
// if dynamic-specific and/or direct lookups find nothing, try the default sound folder
lookup = find_buffer( szSoundPath + filename );
if( lookup != null_handle ) {
return lookup;