Blender V2.61 - r43446

AUD_SequencerFactory.h

Go to the documentation of this file.
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_SEQUENCERFACTORY
00031 #define AUD_SEQUENCERFACTORY
00032 
00033 #include "AUD_IFactory.h"
00034 #include "AUD_AnimateableProperty.h"
00035 
00036 #include <list>
00037 #include <pthread.h>
00038 
00039 class AUD_SequencerEntry;
00040 
00044 class AUD_SequencerFactory : public AUD_IFactory
00045 {
00046     friend class AUD_SequencerReader;
00047 private:
00049     AUD_Specs m_specs;
00050 
00052     int m_status;
00053 
00055     int m_entry_status;
00056 
00058     int m_id;
00059 
00061     std::list<AUD_Reference<AUD_SequencerEntry> > m_entries;
00062 
00064     bool m_muted;
00065 
00067     float m_fps;
00068 
00070     float m_speed_of_sound;
00071 
00073     float m_doppler_factor;
00074 
00076     AUD_DistanceModel m_distance_model;
00077 
00079     AUD_AnimateableProperty m_volume;
00080 
00082     AUD_AnimateableProperty m_location;
00083 
00085     AUD_AnimateableProperty m_orientation;
00086 
00088     pthread_mutex_t m_mutex;
00089 
00090     // hide copy constructor and operator=
00091     AUD_SequencerFactory(const AUD_SequencerFactory&);
00092     AUD_SequencerFactory& operator=(const AUD_SequencerFactory&);
00093 
00094 public:
00101     AUD_SequencerFactory(AUD_Specs specs, float fps, bool muted);
00102     ~AUD_SequencerFactory();
00103 
00107     void lock();
00108 
00112     void unlock();
00113 
00118     void setSpecs(AUD_Specs specs);
00119 
00124     void setFPS(float fps);
00125 
00130     void mute(bool muted);
00131 
00136     bool getMute() const;
00137 
00143     float getSpeedOfSound() const;
00144 
00150     void setSpeedOfSound(float speed);
00151 
00158     float getDopplerFactor() const;
00159 
00166     void setDopplerFactor(float factor);
00167 
00172     AUD_DistanceModel getDistanceModel() const;
00173 
00178     void setDistanceModel(AUD_DistanceModel model);
00179 
00186     AUD_AnimateableProperty* getAnimProperty(AUD_AnimateablePropertyType type);
00187 
00196     AUD_Reference<AUD_SequencerEntry> add(AUD_Reference<AUD_IFactory> sound, float begin, float end, float skip);
00197 
00202     void remove(AUD_Reference<AUD_SequencerEntry> entry);
00203 
00208     AUD_Reference<AUD_IReader> createQualityReader();
00209 
00210     virtual AUD_Reference<AUD_IReader> createReader();
00211 };
00212 
00213 #endif //AUD_SEQUENCERFACTORY