mirror of
https://github.com/thestk/stk
synced 2026-01-18 23:21:53 +00:00
Version 2.01
This commit is contained in:
committed by
Stephen Sinclair
parent
6485746ee9
commit
ea749b71d2
46
MatWvOut.h
Normal file
46
MatWvOut.h
Normal 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)
|
||||
Reference in New Issue
Block a user