Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

/root/src/subsynth/syn/Module/MixerModule.h

Go to the documentation of this file.
00001 
00002 /****************** <SYN heading BEGIN do not edit this line> *****************
00003  *
00004  * subsynth - modular audio synthesizer
00005  * subsynth is (C) Copyright 2001-2002 by Kevin Meinert
00006  *
00007  * Original Author: Kevin Meinert
00008  *
00009  * This library is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU Library General Public
00011  * License as published by the Free Software Foundation; either
00012  * version 2 of the License, or (at your option) any later version.
00013  *
00014  * This library is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017  * Library General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU Library General Public
00020  * License along with this library; if not, write to the
00021  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00022  * Boston, MA 02111-1307, USA.
00023  *
00024  * -----------------------------------------------------------------
00025  * File:          $RCSfile: MixerModule.h,v $
00026  * Date modified: $Date: 2002/04/15 07:28:46 $
00027  * Version:       $Revision: 1.20 $
00028  * -----------------------------------------------------------------
00029  *
00030  ****************** <SYN heading END do not edit this line> ******************/
00031 /* Generated by Together */
00032 
00033 #ifndef MIXER_MODULE
00034 #define MIXER_MODULE
00035 
00036 #include "syn/Core/SampleBufferQueue.h"
00037 #include "syn/Core/SampleBufferQueuePtr.h"
00038 #include "syn/Core/Module.h"
00039 
00040 namespace syn
00041 {
00046    class MixerModule : public Module
00047    {
00048    public:
00049       MixerModule();
00050       virtual ~MixerModule() {};
00051       virtual void update();
00052       
00053       virtual bool open();
00054       virtual bool isOpen() { return mIsOpen; }
00055       void close();
00056             
00058       virtual Module* clone() const
00059       {
00060          MixerModule* mod = new MixerModule;
00061          return mod;
00062       }
00063       
00067       virtual void getParam( const std::string& key, MultivariateType& value )
00068       {
00069       }
00070 
00072       virtual void setParam( const std::string& key, const MultivariateType& value )
00073       {
00074       }
00076    private:
00077       bool areInputsDone();
00078       bool needToWait();
00079       
00084       void accumulateToFloat( const AudioFormat& source_format, const char* source_data, float* dest_data,
00085                                        unsigned int samps_to_copy, bool init = false );
00089       void copyFromFloat( const AudioFormat& dest_format, const float* float_data, char* dest_data, unsigned int samps_to_copy );
00090    
00091       std::vector<float> mInputConvertTempBuffer, mOutputConvertTempBuffer;
00092       TerminalPtr mTerminal;
00093       
00094       void copyDoneState();
00095       
00096       bool mIsOpen;
00097       SampleBuffer1f* mWriteBuf;
00099       /*#  Terminal lnkTerminal; */
00100 
00102       /*#  Terminal lnkTerminal; */
00103    };
00104 
00105 }
00106 
00107 #endif //SPLITTER_MODULE

Generated at Mon Apr 15 09:26:07 2002 for subsynth by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001