Version 2.01

This commit is contained in:
Gary Scavone
2013-09-25 11:17:56 +02:00
committed by Stephen Sinclair
parent 6485746ee9
commit ea749b71d2
223 changed files with 12125 additions and 4552 deletions

46
MatWvOut.h Normal file
View File

@@ -0,0 +1,46 @@
/*******************************************/
/* Matlab MAT File Output Class, */
/* by Gary P. Scavone, 1998. */
/* This object creates a Matlab MAT-file */
/* structure and fills it with buffers of */
/* samples (doubles). */
/* */
/* The Matlab MAT-file format is not */
/* available to the general public. I */
/* spent several days reverse-engineering */
/* the file format to create this class. */
/* I couldn't figure out what a few of */
/* the header fields correspond to, but */
/* for the purposes of STK, this */
/* shouldn't create any problems. */
/*******************************************/
#include "Object.h"
#include "WvOut.h"
#if !defined(__MatWvOut_h)
#define __MatWvOut_h
#define MAT_BUFFER_SIZE 1024
class MatWvOut : public WvOut
{
protected:
FILE *fd;
double data[MAT_BUFFER_SIZE]; /* not MY_FLOAT because MAT uses doubles */
long counter;
long totalCount;
int chans;
MY_FLOAT pan;
public:
MatWvOut(char *infileName);
MatWvOut(int channels, char *infileName);
~MatWvOut();
long getCounter();
MY_FLOAT getTime();
void setMonoPan(MY_FLOAT aPan);
void tick(MY_FLOAT sample);
void tick(MY_FLOAT lsamp, MY_FLOAT rsamp);
};
#endif // defined(__MatWvOut_h)