forked from ElvishArtisan/rivendell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdriver_hpi.h
85 lines (77 loc) · 2.94 KB
/
driver_hpi.h
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// driver_hpi.h
//
// caed(8) driver for AudioScience HPI audio devices.
//
// (C) Copyright 2021-2023 Fred Gleason <[email protected]>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
#ifndef DRIVER_HPI_H
#define DRIVER_HPI_H
#include <rdconfig.h>
#include "driver.h"
#ifdef HPI
#include <rdhpisoundcard.h>
#include <rdhpiplaystream.h>
#include <rdhpirecordstream.h>
#endif // HPI
class DriverHpi : public Driver
{
Q_OBJECT
public:
DriverHpi(QObject *parent=0);
~DriverHpi();
QString version() const;
bool initialize(unsigned *next_cardnum);
int inputPortQuantity(int card) const;
int outputPortQuantity(int card) const;
void updateMeters();
bool loadPlayback(int card,QString wavename,int *stream);
bool unloadPlayback(int card,int stream);
bool playbackPosition(int card,int stream,unsigned pos);
bool play(int card,int stream,int length,int speed,bool pitch,
bool rates);
bool stopPlayback(int card,int stream);
bool timescaleSupported(int card);
bool loadRecord(int card,int port,int coding,int chans,int samprate,
int bitrate,QString wavename);
bool unloadRecord(int card,int port,unsigned *len_frames);
bool record(int card,int port,int length,int thres);
bool stopRecord(int card,int port);
bool setClockSource(int card,int src);
bool setInputVolume(int card,int stream,int level);
bool setOutputVolume(int card,int stream,int port,int level);
bool fadeOutputVolume(int card,int stream,int port,int level,
int length);
bool setInputLevel(int card,int port,int level);
bool setOutputLevel(int card,int port,int level);
bool setInputMode(int card,int stream,int mode);
bool setOutputMode(int card,int stream,int mode);
bool setInputVoxLevel(int card,int stream,int level);
bool setInputType(int card,int port,int type);
bool getInputStatus(int card,int port);
bool getInputMeters(int card,int port,short levels[2]);
bool getOutputMeters(int card,int port,short levels[2]);
bool getStreamOutputMeters(int card,int stream,short levels[2]);
bool setPassthroughLevel(int card,int in_port,int out_port,
int level);
void getOutputPosition(int card,unsigned *pos);
private:
#ifdef HPI
RDHPISoundCard *d_sound_card;
RDHPIRecordStream *d_record_streams[RD_MAX_CARDS][RD_MAX_STREAMS];
RDHPIPlayStream *d_play_streams[RD_MAX_CARDS][RD_MAX_STREAMS];
#endif // HPI
};
#endif // DRIVER_HPI_H