NullAudioManager/Sound should have a TypeHandle

This commit is contained in:
David Rose 2006-06-09 20:42:03 +00:00
parent 2b6df64ac1
commit bebd388711
5 changed files with 40 additions and 0 deletions

View File

@ -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();
}

View File

@ -19,6 +19,7 @@
#include "nullAudioManager.h"
TypeHandle NullAudioManager::_type_handle;
//namespace {
//static const string blank="";

View File

@ -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__ */

View File

@ -19,6 +19,7 @@
#include "nullAudioSound.h"
TypeHandle NullAudioSound::_type_handle;
namespace {
static const string blank="";

View File

@ -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;
};