Panda3D
|
00001 // Filename: movieAudio.h 00002 // Created by: jyelon (02Jul07) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef MOVIEAUDIO_H 00016 #define MOVIEAUDIO_H 00017 00018 #include "pandabase.h" 00019 #include "namable.h" 00020 #include "pointerTo.h" 00021 #include "typedWritableReferenceCount.h" 00022 class MovieAudioCursor; 00023 00024 00025 #ifdef NOTIFY_DEBUG //[ 00026 // Non-release build: 00027 #define movies_debug(msg) \ 00028 if (movies_cat.is_debug()) { \ 00029 movies_cat->debug() << msg << endl; \ 00030 } else {} 00031 #else //][ 00032 // Release build: 00033 #define movies_debug(msg) ((void)0); 00034 #endif //] 00035 00036 00037 //////////////////////////////////////////////////////////////////// 00038 // Class : MovieAudio 00039 // Description : A MovieAudio is actually any source that provides 00040 // a sequence of audio samples. That could include an 00041 // AVI file, a microphone, or an internet TV station. 00042 // 00043 // The difference between a MovieAudio and a 00044 // MovieAudioCursor is like the difference between a 00045 // filename and a file handle. The MovieAudio just 00046 // indicates a particular movie. The MovieAudioCursor 00047 // is what allows access. 00048 //////////////////////////////////////////////////////////////////// 00049 class EXPCL_PANDA_MOVIES MovieAudio : public TypedWritableReferenceCount, public Namable { 00050 00051 PUBLISHED: 00052 MovieAudio(const string &name = "Blank Audio"); 00053 virtual ~MovieAudio(); 00054 virtual PT(MovieAudioCursor) open(); 00055 static PT(MovieAudio) get(const Filename &name); 00056 INLINE const Filename &get_filename() const; 00057 00058 protected: 00059 Filename _filename; 00060 00061 public: 00062 static TypeHandle get_class_type() { 00063 return _type_handle; 00064 } 00065 static void init_type() { 00066 TypedWritableReferenceCount::init_type(); 00067 register_type(_type_handle, "MovieAudio", 00068 TypedWritableReferenceCount::get_class_type()); 00069 } 00070 virtual TypeHandle get_type() const { 00071 return get_class_type(); 00072 } 00073 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00074 00075 private: 00076 static TypeHandle _type_handle; 00077 }; 00078 00079 /* okcircular */ 00080 #include "movieAudioCursor.h" 00081 00082 #include "movieAudio.I" 00083 00084 #endif