still tracking

This commit is contained in:
Cary Sandvig 2000-11-10 07:01:29 +00:00
parent a8f2403049
commit 0c29448ee1
3 changed files with 13 additions and 2 deletions

View File

@ -7,13 +7,19 @@
#define __AUDIO_SOUND_H__
#include "audio_trait.h"
/*
#include "typedReferenceCount.h"
*/
#include "typeHandle.h"
#include "namable.h"
class AudioPool;
class AudioManager;
/*
class EXPCL_PANDA AudioSound : public TypedReferenceCount, public Namable {
*/
class EXPCL_PANDA AudioSound : public TypedObject, public Namable {
private:
AudioTraits::SoundClass *_sound;
AudioTraits::PlayingClass *_state;
@ -47,9 +53,14 @@ public:
return _type_handle;
}
static void init_type(void) {
/*
TypedReferenceCount::init_type();
register_type(_type_handle, "AudioSound",
TypedReferenceCount::get_class_type());
*/
TypedObject::init_type();
register_type(_type_handle, "AudioSound",
TypedObject::get_class_type());
}
virtual TypeHandle get_type(void) const {
return get_class_type();

View File

@ -17,6 +17,7 @@ main(int argc, char* argv[]) {
exit(-1);
}
/*
if (! AudioPool::verify_sound("test.mp3")) {
audio_cat->fatal() << "could not locate 'test.mp3'" << endl;
exit(-1);
@ -43,5 +44,6 @@ main(int argc, char* argv[]) {
AudioManager::update();
ipc_traits::sleep(0, 1000000);
}
*/
return 0;
}

View File

@ -507,7 +507,6 @@ AudioTraits::SoundClass* AudioLoadMp3(Filename) {
EXPCL_MISC AudioTraits::SoundClass* AudioLoadMp3(Filename filename) {
unsigned char* buf;
unsigned long len;
filename.resolve_filename(get_sound_path());
read_file(filename, &buf, len);
if (buf != (unsigned char*)0L) {
return WinSample::load_raw(buf, len);
@ -522,7 +521,6 @@ EXPCL_MISC AudioTraits::SoundClass* AudioLoadMp3(Filename filename) {
AudioTraits::SoundClass* AudioLoadMp3(Filename filename) {
unsigned char* buf;
unsigned long len;
filename.resolve_filename(get_sound_path());
read_file(filename, &buf, len);
if (buf != (unsigned char*)0L) {
return LinuxSample::load_raw(buf, len);