00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef AUDIOLOADREQUEST_H
00016 #define AUDIOLOADREQUEST_H
00017
00018 #include "pandabase.h"
00019
00020 #include "asyncTask.h"
00021 #include "audioManager.h"
00022 #include "audioSound.h"
00023 #include "pointerTo.h"
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 class EXPCL_PANDA_AUDIO AudioLoadRequest : public AsyncTask {
00035 public:
00036 ALLOC_DELETED_CHAIN(AudioLoadRequest);
00037
00038 PUBLISHED:
00039 INLINE AudioLoadRequest(AudioManager *audio_manager, const string &filename,
00040 bool positional);
00041
00042 INLINE AudioManager *get_audio_manager() const;
00043 INLINE const string &get_filename() const;
00044 INLINE bool get_positional() const;
00045
00046 INLINE bool is_ready() const;
00047 INLINE AudioSound *get_sound() const;
00048
00049 protected:
00050 virtual DoneStatus do_task();
00051
00052 private:
00053 PT(AudioManager) _audio_manager;
00054 string _filename;
00055 bool _positional;
00056
00057 bool _is_ready;
00058 PT(AudioSound) _sound;
00059
00060 public:
00061 static TypeHandle get_class_type() {
00062 return _type_handle;
00063 }
00064 static void init_type() {
00065 AsyncTask::init_type();
00066 register_type(_type_handle, "AudioLoadRequest",
00067 AsyncTask::get_class_type());
00068 }
00069 virtual TypeHandle get_type() const {
00070 return get_class_type();
00071 }
00072 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00073
00074 private:
00075 static TypeHandle _type_handle;
00076 };
00077
00078 #include "audioLoadRequest.I"
00079
00080 #endif
00081