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

« back to all changes in this revision

Viewing changes to synti/stklib/RtWvIn.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
/*  RtWvIn Input Class,                    */
 
3
/*  by Gary P. Scavone, 1999-2000          */
 
4
/*                                         */
 
5
/*  This object inherits from WvIn and is  */
 
6
/*  used to read in realtime 16-bit data   */
 
7
/*  from a computer's audio port.          */
 
8
/*                                         */
 
9
/*  NOTE: This object is NOT intended for  */
 
10
/*  use in achieving simultaneous realtime */
 
11
/*  audio input/output (together with      */
 
12
/*  RtWvOut). Under certain circumstances  */
 
13
/*  such a scheme is possible, though you  */
 
14
/*  should definitely know what you are    */
 
15
/*  doing before trying.  For safer "full- */
 
16
/*  duplex" operation, use the RtDuplex    */
 
17
/*  class.                                 */
 
18
/*******************************************/
 
19
 
 
20
#if !defined(__RtWvIn_h)
 
21
#define __RtWvIn_h
 
22
 
 
23
#include "Object.h"
 
24
#include "RtAudio.h"
 
25
#include "WvIn.h"
 
26
 
 
27
class RtWvIn : public WvIn
 
28
{
 
29
protected:
 
30
        RtAudio *sound_dev;
 
31
  INT16 *rtdata;
 
32
  INT16 *lastSamples;
 
33
  MY_FLOAT gain;
 
34
  void getData(long index);
 
35
public:
 
36
  RtWvIn(int chans = 1, MY_FLOAT srate = SRATE, int device = -1);
 
37
  ~RtWvIn();
 
38
  void setRate(MY_FLOAT aRate);
 
39
  void addTime(MY_FLOAT aTime);
 
40
  void setLooping(int aLoopStatus);
 
41
  long getSize();
 
42
  int informTick();
 
43
};
 
44
 
 
45
#endif