| VRS - The Virtual Rendering System |
| version 3.3 |
00001 /****************************************************************************** 00002 * VRS - The Virtual Rendering System 00003 * Copyright (C) 2000-2004 Computer Graphics Systems Group at the 00004 * Hasso-Plattner-Institute (HPI), Potsdam, Germany. 00005 * 00006 * This library is free software; you can redistribute it and/or modify it 00007 * under the terms of the GNU Lesser General Public License as published by 00008 * the Free Software Foundation; either version 2.1 of the License, or (at 00009 * your option) any later version. This library is distributed in the hope 00010 * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 00011 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Lesser General Public License for more details. You should have received 00013 * a copy of the GNU Lesser+ General Public License along with this library; if 00014 * not, write to the FreeSoftware Foundation, Inc., 59 Temple Place, Suite 330, 00015 * Boston, MA, 02111-1307, USA. 00016 ******************************************************************************/ 00017 00018 #ifndef VRS_SOUND_BUFFERAL_H 00019 #define VRS_SOUND_BUFFERAL_H 00020 00021 // 00022 // VRS 00023 // 00024 #include <vrs/sharedobj.h> 00025 00026 // 00027 // SOUND 00028 // 00029 #include <vrs/openal/bufferdataal.h> 00030 00031 00032 namespace VRS 00033 { 00034 namespace SOUND 00035 { 00036 class VRS_OPENAL_API BufferAL : public SharedObj 00037 { 00038 public: 00039 00040 BufferAL(void); 00041 00042 BufferAL(const SO<BufferDataAL>& bufferData); 00043 virtual ~BufferAL(void); 00044 00066 void setBufferData(const SO<BufferDataAL>& bufferData); 00067 inline const SO<BufferDataAL>& getBufferData(void) const 00068 { 00069 return this->bufferData_; 00070 } 00071 00072 /* Returns the frequency of the buffer in samples per second, 00073 i.e. units of Hertz [Hz]. By default, OpenAL uses seconds 00074 and Hertz as units for time and frequency, respectively. A 00075 float or integral value of one for a variable that specifies 00076 quantities like duration, latency, delay, or any other parameter 00077 measured as time, specifies 1 second. For frequency, the basic 00078 unit is 1/second, or Hertz. In other words, sample frequencies 00079 and frequency cut-offs or filter parameters specifying frequencies 00080 are expressed in units of Hertz. */ 00081 unsigned int getFrequency(void) const; 00082 00084 unsigned int getSize(void) const; 00085 00088 unsigned int getBits(void) const; 00089 00092 unsigned int getChannels(void) const; 00093 00095 bool isValid(void) const; 00096 00098 virtual unsigned int getName(void) 00099 { 00100 return this->name_; 00101 } 00102 00104 bool getModified(void) const 00105 { 00106 return this->modified_; 00107 } 00108 00109 virtual void modified(void); 00110 00111 00112 VRS_TYPEINFO(BufferAL, SharedObj); 00113 VRS_SERIALIZABLE(BufferAL); 00114 00115 protected: 00116 00117 void setName(unsigned int name); 00118 00119 void setModified(bool modified); 00120 00121 private: 00122 00123 unsigned int name_; 00124 SO<BufferDataAL> bufferData_; 00125 bool modified_; 00126 00127 };//endclass BufferAL 00128 00129 };//endnamespace SOUND 00130 00131 };//endnamespace VRS 00132 00133 #endif //VRS_SOUND_BUFFERAL_H