~ubuntu-branches/ubuntu/feisty/muse/feisty

« back to all changes in this revision

Viewing changes to synti/stklib/RtDuplex.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2002-04-23 17:28:23 UTC
  • Revision ID: james.westby@ubuntu.com-20020423172823-w8yplzr81a759xa3
Tags: upstream-0.5.2
ImportĀ upstreamĀ versionĀ 0.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*******************************************/
 
2
/*  Real-Time Duplex Input/Output Class,   */
 
3
/*  by Gary P. Scavone, 1999               */
 
4
/*                                         */
 
5
/*  This object opens the sound i/o        */
 
6
/*  device, reads buffers in from it, and  */
 
7
/*  pokes buffers of samples out to it.    */
 
8
/*                                         */
 
9
/*  At the moment, duplex mode is possible */
 
10
/*  only on Linux (OSS), IRIX, and         */
 
11
/*  Windows95/98 platforms.                */
 
12
/*******************************************/
 
13
 
 
14
#if !defined(__RtDuplex_h)
 
15
#define __RtDuplex_h
 
16
 
 
17
#include "Object.h"
 
18
#include "RtAudio.h"
 
19
 
 
20
class RtDuplex : public Object
 
21
{
 
22
 protected:
 
23
        RtAudio *sound_dev;
 
24
  INT16 *indata;
 
25
  INT16 *outdata;
 
26
  long data_length;
 
27
  long readCounter;
 
28
  long writeCounter;
 
29
  int channels;
 
30
  MY_FLOAT gain;
 
31
  MY_FLOAT *insamples;
 
32
 public:
 
33
  RtDuplex(int chans = 1, MY_FLOAT srate = SRATE, int device = -1);
 
34
  ~RtDuplex();
 
35
  MY_FLOAT tick(MY_FLOAT outsample);
 
36
  MY_MULTI mtick(MY_MULTI outsamples);
 
37
};
 
38
 
 
39
#endif // defined(__RtDuplex_h)