mirror of
https://github.com/thestk/stk
synced 2026-02-07 17:56:16 +00:00
Version 3.0
This commit is contained in:
committed by
Stephen Sinclair
parent
7c0ee03d60
commit
868787a5f9
38
STK/RTDuplex.h
Normal file
38
STK/RTDuplex.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/*******************************************/
|
||||
/* Real-Time Duplex Input/Output Class, */
|
||||
/* by Gary P. Scavone, 1999 */
|
||||
/* */
|
||||
/* This object opens the sound i/o */
|
||||
/* device, reads buffers in from it, and */
|
||||
/* pokes buffers of samples out to it. */
|
||||
/* */
|
||||
/* At the moment, duplex mode is possible */
|
||||
/* only on Linux (OSS), IRIX, and */
|
||||
/* Windows95/98 platforms. */
|
||||
/*******************************************/
|
||||
|
||||
#if !defined(__RTDuplex_h)
|
||||
#define __RTDuplex_h
|
||||
|
||||
#include "Object.h"
|
||||
#include "RTSoundIO.h"
|
||||
|
||||
class RTDuplex : public Object
|
||||
{
|
||||
protected:
|
||||
RTSoundIO *soundIO;
|
||||
short indata[RT_BUFFER_SIZE];
|
||||
short outdata[RT_BUFFER_SIZE];
|
||||
long readCounter;
|
||||
long writeCounter;
|
||||
int channels;
|
||||
MY_FLOAT gain;
|
||||
MY_FLOAT *insamples;
|
||||
public:
|
||||
RTDuplex(MY_FLOAT srate, int chans);
|
||||
~RTDuplex();
|
||||
MY_FLOAT tick(MY_FLOAT outsample);
|
||||
MY_MULTI mtick(MY_MULTI outsamples);
|
||||
};
|
||||
|
||||
#endif // defined(__RTDuplex_h)
|
||||
Reference in New Issue
Block a user