~ubuntu-branches/ubuntu/quantal/linpsk/quantal

« back to all changes in this revision

Viewing changes to linpsk/csound.h

  • Committer: Bazaar Package Importer
  • Author(s): Bruce Walker
  • Date: 2002-02-06 11:43:38 UTC
  • Revision ID: james.westby@ubuntu.com-20020206114338-xqmjmhh01lpjm0g4
Tags: upstream-0.6.2
ImportĀ upstreamĀ versionĀ 0.6.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
                          csound.h  -  description
 
3
                             -------------------
 
4
    begin                : Wed Apr 5 2000
 
5
    copyright            : (C) 2000 by Volker Schroer
 
6
    email                : DL1KSV@gmx.de
 
7
 ***************************************************************************/
 
8
 
 
9
/***************************************************************************
 
10
 *                                                                         *
 
11
 *   This program is free software; you can redistribute it and/or modify  *
 
12
 *   it under the terms of the GNU General Public License as published by  *
 
13
 *   the Free Software Foundation; either version 2 of the License, or     *
 
14
 *   (at your option) any later version.                                   *
 
15
 *   based on the work of Moe Wheatley, AE4JY                              *
 
16
 ***************************************************************************/
 
17
 
 
18
#ifndef CSOUND_H
 
19
#define CSOUND_H
 
20
#include <sys/soundcard.h>
 
21
#include <sys/ioctl.h>
 
22
#include <unistd.h>
 
23
#include <fcntl.h>
 
24
#include <sys/types.h>
 
25
#include <sys/stat.h>
 
26
 
 
27
 
 
28
#include <qobject.h>
 
29
 
 
30
#include "input.h"
 
31
#include "constants.h"
 
32
/**Class for operating on SoundCard
 
33
  *@author Volker Schroer
 
34
  */
 
35
 
 
36
class CSound :public Input
 
37
{
 
38
public: 
 
39
        CSound(int ptt);
 
40
        ~CSound();
 
41
        bool open_Device_write(QString Device);
 
42
        bool close_Device();
 
43
        bool setParams(QString *errorstring);
 
44
  int getSamples(double *,int);                         // Reading Samples from Soundcard
 
45
        int putSamples(double *,int);
 
46
        void PTT(bool);
 
47
 
 
48
 
 
49
private: // Private attributes
 
50
  /** Type of Operation Mono/Stereo */
 
51
  int mode;
 
52
  /** Audio Format **/
 
53
        int audioformat;
 
54
  /** Sampling rate */
 
55
   int speed;
 
56
        /** Fragmentsize for Soundcard IO */
 
57
        int fragsize;
 
58
        bool started;
 
59
//      int debug;
 
60
  audio_buf_info info;
 
61
};
 
62
 
 
63
#endif