From 9815096db22c73cacdbb65512d1b61d633db7fa8 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Mon, 2 Dec 2002 19:21:08 +0000 Subject: "version 0.1.1" svn path=/trunk/; revision=267 --- externals/grill/vasp/source/main.h | 83 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 externals/grill/vasp/source/main.h (limited to 'externals/grill/vasp/source/main.h') diff --git a/externals/grill/vasp/source/main.h b/externals/grill/vasp/source/main.h new file mode 100644 index 00000000..53d732c2 --- /dev/null +++ b/externals/grill/vasp/source/main.h @@ -0,0 +1,83 @@ +/* + +VASP modular - vector assembling signal processor / objects for Max/MSP and PD + +Copyright (c) 2002 Thomas Grill (xovo@gmx.net) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. + +*/ + +#ifndef __VASP_H +#define __VASP_H + +#include + +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400) +#error You need at least flext version 0.4.0 +#endif + + +#include +#include + +class complex; +class vector; + +#if 0 + #define I int + #define L long + #define UL unsigned long + #define F float + #define D double + #define C char + #define BL bool + #define V void + #define S t_sample // type for samples + #define R double // type for internal calculations + #define CX complex + #define VX vector +#else + typedef int I; + typedef long L; + typedef unsigned long UL; + typedef float F; + typedef double D; + typedef char C; + typedef bool BL; + typedef void V; + typedef t_sample S; // type for samples + typedef double R; // type for internal calculations + typedef complex CX; + typedef vector VX; +#endif + +#ifdef PD +// buffers are never interleaved - special optimizations may occur +// attention: possibly obsolete when immediate file access is implemented +#define VASP_CHN1 +#endif + +class complex +{ +public: + complex() {} + complex(F re,F im = 0): real(re),imag(im) {} + + F real,imag; +}; + +class vector +{ +public: + vector(): dim(0),data(NULL) {} + ~vector() { if(data) delete[] data; } + + I Dim() const { return dim; } + F *Data() { return data; } + const F *Data() const { return data; } +protected: + I dim; F *data; +}; + +#endif -- cgit v1.2.1