ISoundElement.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002  * ISoundElement.h (JackFX) 
00003  ******************************************************************************/
00004 
00005 #ifndef _I_SOUND_ELEMENT_H_
00006 #define _I_SOUND_ELEMENT_H_
00007 
00008 #include "common.h"
00009 #include "SoundFrame.h"
00010 
00014 class ISoundElement 
00015 {
00016     friend class JackClient;
00017     friend class Lock;
00018     public:
00019         class Lock
00020         {
00021             public:
00022                 Lock(ISoundElement* e);
00023                 ~Lock();
00024             private:
00025                 ISoundElement* m_element;
00026         };
00027 
00030         ISoundElement();
00031         
00034         virtual ~ISoundElement();
00035 
00036         void AddInput(ISoundElement* element);
00037         void RemoveInput(ISoundElement* element);
00038 
00039         void SetParameter(const string& pname, ISoundElement* e);
00040         ISoundElement* GetParameter(const string& pname);
00041         void DelParameter(const string& pname);
00042 
00043         SoundFrame& GetPipe();
00044     protected:
00045         virtual void Process(jack_nframes_t count);
00046 
00047         list<ISoundElement*> m_inputs;
00048     private:
00049         map<string, ISoundElement*> m_parameters;
00050         void _Update(unsigned int tickid, jack_nframes_t count);
00051         bool _Updatable(unsigned int tickid);
00052         bool _Ready(unsigned int tickid);
00053 
00054         pthread_mutex_t m_mtx;
00055         SoundFrame m_pipe;
00056         unsigned int m_lasttickid;
00057 };
00058 
00062 class ISoundSource : public ISoundElement
00063 {
00064     public:
00067         ISoundSource();
00068         
00071         virtual ~ISoundSource();
00072 
00073     protected:
00074         virtual void Process(jack_nframes_t count);
00075     private:
00076 };
00077 
00078 #endif

Get JackFX at SourceForge.net. Fast, secure and Free Open Source software downloads
Generated for JackFX by  doxygen