NullAudioManager/Sound should have a TypeHandle
This commit is contained in:
parent
2b6df64ac1
commit
bebd388711
|
|
@ -20,6 +20,8 @@
|
|||
#include "dconfig.h"
|
||||
#include "audioManager.h"
|
||||
#include "audioSound.h"
|
||||
#include "nullAudioManager.h"
|
||||
#include "nullAudioSound.h"
|
||||
|
||||
Configure(config_audio);
|
||||
NotifyCategoryDef(audio, "");
|
||||
|
|
@ -89,6 +91,8 @@ ConfigureFn(config_audio) {
|
|||
AudioManager::init_type();
|
||||
AudioSound::init_type();
|
||||
AudioDSP::init_type();
|
||||
NullAudioManager::init_type();
|
||||
NullAudioSound::init_type();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include "nullAudioManager.h"
|
||||
|
||||
TypeHandle NullAudioManager::_type_handle;
|
||||
|
||||
//namespace {
|
||||
//static const string blank="";
|
||||
|
|
|
|||
|
|
@ -76,6 +76,23 @@ public:
|
|||
virtual void audio_3d_set_drop_off_factor(float factor);
|
||||
virtual float audio_3d_get_drop_off_factor() const;
|
||||
|
||||
|
||||
public:
|
||||
static TypeHandle get_class_type() {
|
||||
return _type_handle;
|
||||
}
|
||||
static void init_type() {
|
||||
AudioManager::init_type();
|
||||
register_type(_type_handle, "NullAudioManager",
|
||||
AudioManager::get_class_type());
|
||||
}
|
||||
virtual TypeHandle get_type() const {
|
||||
return get_class_type();
|
||||
}
|
||||
virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
|
||||
|
||||
private:
|
||||
static TypeHandle _type_handle;
|
||||
};
|
||||
|
||||
#endif /* __NULL_AUDIO_MANAGER_H__ */
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include "nullAudioSound.h"
|
||||
|
||||
TypeHandle NullAudioSound::_type_handle;
|
||||
|
||||
namespace {
|
||||
static const string blank="";
|
||||
|
|
|
|||
|
|
@ -78,6 +78,23 @@ public:
|
|||
//protected:
|
||||
NullAudioSound();
|
||||
|
||||
public:
|
||||
static TypeHandle get_class_type() {
|
||||
return _type_handle;
|
||||
}
|
||||
static void init_type() {
|
||||
AudioSound::init_type();
|
||||
register_type(_type_handle, "NullAudioSound",
|
||||
AudioSound::get_class_type());
|
||||
}
|
||||
virtual TypeHandle get_type() const {
|
||||
return get_class_type();
|
||||
}
|
||||
virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
|
||||
|
||||
private:
|
||||
static TypeHandle _type_handle;
|
||||
|
||||
friend class NullAudioManager;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue