File: waveinput.h

package info (click to toggle)
linpsk 1.2.5~rc1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,072 kB
  • ctags: 1,216
  • sloc: cpp: 10,306; xml: 31; makefile: 7
file content (61 lines) | stat: -rw-r--r-- 2,069 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/***************************************************************************
                          waveinput.h  -  description
                             -------------------
    begin                : Sat May 5 2001
    copyright            : (C) 2001 by Volker Schroer
    email                : DL1KSV@gmx.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 ***************************************************************************/

#ifndef WAVEINPUT_H
#define WAVEINPUT_H

#include "input.h"
#include <stdlib.h>

/**Implementation of the Input Class for wave - files
The implementation is simplified . But it can process the two sample files
for mfsk16 and psk31.
The class doesn't produce output at the moment
  *@author Volker Schroer
  */

class WaveInput : public Input
{
Q_OBJECT
  public:
    WaveInput ( int ptt = -1 );
    ~WaveInput();
    /** Opens the Device for writting **/
    bool open_Device_write ( QString * );
    /** Opens the Device for reading **/
    bool open_Device_read ( QString * );
    /** Close the Device **/
    virtual bool close_Device();
    /** gets the samples from the device */
    int getSamples ( double *sample, int anzahl );
    /** puts the Samples onto the Device, for a Textmode Device nothing happens */
    int putSamples ( double *sample, int anzahl );
    /** Dummy */
    void PTT ( bool mode );
    /** Dummy */
    bool setParams ( QString *errorstring );
  signals:
//    void samplesAvailable();

  private:

    int offset;
    unsigned long int Length, Bytesread;
    bool EightBits;
    int fd;
};

#endif