~ubuntu-branches/ubuntu/quantal/muse/quantal

« back to all changes in this revision

Viewing changes to driver/audiodev.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2005-08-23 17:19:39 UTC
  • mto: (4.1.1 breezy) (1.1.9) (10.1.6 sid)
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: james.westby@ubuntu.com-20050823171939-hd8fgzokb4dbj007
Tags: upstream-0.7.1+0.7.2pre2
ImportĀ upstreamĀ versionĀ 0.7.1+0.7.2pre2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//=========================================================
2
 
//  MusE
3
 
//  Linux Music Editor
4
 
//  $Id: audiodev.h,v 1.1.1.1 2003/10/29 10:06:13 wschweer Exp $
5
 
//
6
 
//  (C) Copyright 1999/2000 Werner Schweer (ws@seh.de)
7
 
//=========================================================
8
 
 
9
 
#ifndef __AUDIODEV_H__
10
 
#define __AUDIODEV_H__
11
 
 
12
 
#include <qstring.h>
13
 
#include <list>
14
 
 
15
 
//---------------------------------------------------------
16
 
//   AudioDevice
17
 
//---------------------------------------------------------
18
 
 
19
 
class AudioDevice {
20
 
   protected:
21
 
      QString _inputPort;
22
 
      QString _outputPort;
23
 
      QString _state;
24
 
 
25
 
   public:
26
 
      AudioDevice() {}
27
 
      virtual ~AudioDevice() {}
28
 
 
29
 
      QString state() const { return _state; }
30
 
      void setState(const QString& s)  { _state = s; }
31
 
      virtual void read(int, unsigned long, float**) = 0;
32
 
      virtual void write(int, unsigned long, float**) {}
33
 
      virtual bool getWriteBuffer(int, unsigned long, float**) { return false; }
34
 
 
35
 
      virtual void start() = 0;
36
 
      virtual void stop () = 0;
37
 
      virtual int curPlayPos() const = 0;
38
 
      virtual std::list<QString> outputPorts() = 0;
39
 
      virtual std::list<QString> inputPorts() = 0;
40
 
      virtual QString inputPort() const { return _inputPort; }
41
 
      virtual QString outputPort() const { return _outputPort; }
42
 
      virtual void setInputPort(const QString&) = 0;
43
 
      virtual void setOutputPort(const QString&) = 0;
44
 
      virtual void activate(bool) = 0;
45
 
      };
46
 
 
47
 
#endif
48