mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
if mgr invalid, return nullsound
This commit is contained in:
parent
1cf37a11c5
commit
87fd0601c9
@ -26,6 +26,7 @@
|
|||||||
#include "config_util.h"
|
#include "config_util.h"
|
||||||
#include "config_express.h"
|
#include "config_express.h"
|
||||||
#include "virtualFileSystem.h"
|
#include "virtualFileSystem.h"
|
||||||
|
#include "nullAudioSound.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
int MilesAudioManager::_active_managers = 0;
|
int MilesAudioManager::_active_managers = 0;
|
||||||
@ -256,6 +257,12 @@ load(Filename file_name) {
|
|||||||
PT(AudioSound) MilesAudioManager::
|
PT(AudioSound) MilesAudioManager::
|
||||||
get_sound(const string& file_name) {
|
get_sound(const string& file_name) {
|
||||||
audio_debug("MilesAudioManager::get_sound(file_name=\""<<file_name<<"\")");
|
audio_debug("MilesAudioManager::get_sound(file_name=\""<<file_name<<"\")");
|
||||||
|
|
||||||
|
if(!is_valid()) {
|
||||||
|
audio_debug("invalid MilesAudioManager returning NullSound");
|
||||||
|
return new NullAudioSound();
|
||||||
|
}
|
||||||
|
|
||||||
assert(is_valid());
|
assert(is_valid());
|
||||||
Filename path = file_name;
|
Filename path = file_name;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user