CppSound.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef CSND_CPPSOUND_H
00023 #define CSND_CPPSOUND_H
00024
00025 #ifndef __MYFLT_DEF
00026 #define __MYFLT_DEF
00027 #ifdef USE_DOUBLE
00028 #define MYFLT double
00029 #else
00030 #define MYFLT float
00031 #endif
00032 #endif
00033
00034 #ifdef SWIG
00035 %module csnd
00036 %include "std_string.i"
00037 %include "std_vector.i"
00038 %{
00039 #include "csound.hpp"
00040 #include "CsoundFile.hpp"
00041 #include <string>
00042 #include <vector>
00043 %}
00044 %template(MyfltVector) std::vector<MYFLT>;
00045 #else
00046 #include "csound.hpp"
00047 #include "CsoundFile.hpp"
00048 #include <string>
00049 #include <vector>
00050 #endif
00051
00052 class PUBLIC CppSound : public Csound, public CsoundFile
00053 {
00054 bool go;
00055 bool isCompiled;
00056 bool isPerforming;
00057 size_t spoutSize;
00058 std::string renderedSoundfile;
00059 public:
00060 CppSound();
00061 virtual ~CppSound();
00062 virtual CSOUND *getCsound();
00063 virtual long getThis();
00064 virtual CsoundFile *getCsoundFile();
00065 virtual int compile(int argc, char **argv);
00066 virtual int compile();
00067 virtual size_t getSpoutSize() const;
00068 virtual std::string getOutputSoundfileName() const;
00069 virtual int perform(int argc, char **argv);
00070 virtual int perform();
00071 virtual int performKsmps(bool absolute);
00072 virtual void cleanup();
00073 virtual void inputMessage(const char *istatement);
00074 virtual void write(const char *text);
00075 virtual bool getIsCompiled() const;
00076 virtual void setIsPerforming(bool isPerforming);
00077 virtual bool getIsPerforming() const;
00078 virtual bool getIsGo();
00079 virtual void stop();
00080 virtual void setPythonMessageCallback();
00081 };
00082
00083 #endif
00084