mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-20 02:09:19 +02:00
audio source reinitialization fix, sound volume level tweaks
This commit is contained in:
13
audio.cpp
13
audio.cpp
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user