Blender V2.61 - r43446
|
00001 /* 00002 * ***** BEGIN GPL LICENSE BLOCK ***** 00003 * 00004 * Copyright 2009-2011 Jörg Hermann Müller 00005 * 00006 * This file is part of AudaSpace. 00007 * 00008 * Audaspace is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * AudaSpace is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with Audaspace; if not, write to the Free Software Foundation, 00020 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00021 * 00022 * ***** END GPL LICENSE BLOCK ***** 00023 */ 00024 00030 #ifndef AUD_SEQUENCERENTRY 00031 #define AUD_SEQUENCERENTRY 00032 00033 #include "AUD_Reference.h" 00034 #include "AUD_AnimateableProperty.h" 00035 #include "AUD_IFactory.h" 00036 00037 #include <pthread.h> 00038 00042 class AUD_SequencerEntry 00043 { 00044 friend class AUD_SequencerHandle; 00045 private: 00047 int m_status; 00048 00050 int m_pos_status; 00051 00053 int m_sound_status; 00054 00056 int m_id; 00057 00059 AUD_Reference<AUD_IFactory> m_sound; 00060 00062 float m_begin; 00063 00065 float m_end; 00066 00068 float m_skip; 00069 00071 bool m_muted; 00072 00074 bool m_relative; 00075 00077 float m_volume_max; 00078 00080 float m_volume_min; 00081 00083 float m_distance_max; 00084 00086 float m_distance_reference; 00087 00089 float m_attenuation; 00090 00092 float m_cone_angle_outer; 00093 00095 float m_cone_angle_inner; 00096 00098 float m_cone_volume_outer; 00099 00101 pthread_mutex_t m_mutex; 00102 00104 AUD_AnimateableProperty m_volume; 00105 00107 AUD_AnimateableProperty m_panning; 00108 00110 AUD_AnimateableProperty m_pitch; 00111 00113 AUD_AnimateableProperty m_location; 00114 00116 AUD_AnimateableProperty m_orientation; 00117 00118 public: 00127 AUD_SequencerEntry(AUD_Reference<AUD_IFactory> sound, float begin, float end, float skip, int id); 00128 virtual ~AUD_SequencerEntry(); 00129 00133 void lock(); 00134 00138 void unlock(); 00139 00144 void setSound(AUD_Reference<AUD_IFactory> sound); 00145 00152 void move(float begin, float end, float skip); 00153 00158 void mute(bool mute); 00159 00164 int getID() const; 00165 00172 AUD_AnimateableProperty* getAnimProperty(AUD_AnimateablePropertyType type); 00173 00185 void updateAll(float volume_max, float volume_min, float distance_max, 00186 float distance_reference, float attenuation, float cone_angle_outer, 00187 float cone_angle_inner, float cone_volume_outer); 00188 00194 bool isRelative(); 00195 00202 void setRelative(bool relative); 00203 00208 float getVolumeMaximum(); 00209 00215 void setVolumeMaximum(float volume); 00216 00221 float getVolumeMinimum(); 00222 00228 void setVolumeMinimum(float volume); 00229 00236 float getDistanceMaximum(); 00237 00245 void setDistanceMaximum(float distance); 00246 00251 float getDistanceReference(); 00252 00258 void setDistanceReference(float distance); 00259 00264 float getAttenuation(); 00265 00272 void setAttenuation(float factor); 00273 00278 float getConeAngleOuter(); 00279 00285 void setConeAngleOuter(float angle); 00286 00291 float getConeAngleInner(); 00292 00298 void setConeAngleInner(float angle); 00299 00306 float getConeVolumeOuter(); 00307 00315 void setConeVolumeOuter(float volume); 00316 }; 00317 00318 #endif //AUD_SEQUENCERENTRY