2021-08-20 Fred Gleason <fredg@paravelsystems.com>

* Renamed audio driver components in caed(8).

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2021-08-20 10:18:05 -04:00
parent 5a9f59ec62
commit 7f1d18ae62
12 changed files with 217 additions and 215 deletions

View File

@@ -22314,3 +22314,5 @@
* Refactored the JACK driver in caed(8) to use virtual inheritance. * Refactored the JACK driver in caed(8) to use virtual inheritance.
2021-08-20 Fred Gleason <fredg@paravelsystems.com> 2021-08-20 Fred Gleason <fredg@paravelsystems.com>
* Cleaned up code in 'cae/'. * Cleaned up code in 'cae/'.
2021-08-20 Fred Gleason <fredg@paravelsystems.com>
* Renamed audio driver components in caed(8).

View File

@@ -29,19 +29,19 @@ moc_%.cpp: %.h
sbin_PROGRAMS = caed sbin_PROGRAMS = caed
dist_caed_SOURCES = alsadriver.cpp alsadriver.h\ dist_caed_SOURCES = cae.cpp cae.h\
cae.cpp cae.h\
cae_server.cpp cae_server.h\ cae_server.cpp cae_server.h\
caedriver.cpp caedriver.h\ driver.cpp driver.h\
hpidriver.cpp hpidriver.h\ driver_alsa.cpp driver_alsa.h\
jackdriver.cpp jackdriver.h driver_hpi.cpp driver_hpi.h\
driver_jack.cpp driver_jack.h
nodist_caed_SOURCES = moc_alsadriver.cpp\ nodist_caed_SOURCES = moc_cae.cpp\
moc_cae.cpp\
moc_cae_server.cpp\ moc_cae_server.cpp\
moc_caedriver.cpp\ moc_driver.cpp\
moc_hpidriver.cpp\ moc_driver_alsa.cpp\
moc_jackdriver.cpp moc_driver_hpi.cpp\
moc_driver_jack.cpp
caed_LDADD = @LIB_RDLIBS@\ caed_LDADD = @LIB_RDLIBS@\
@LIBALSA@\ @LIBALSA@\

View File

@@ -45,10 +45,10 @@
#include <rdsvc.h> #include <rdsvc.h>
#include <rdsystem.h> #include <rdsystem.h>
#include "alsadriver.h"
#include "cae.h" #include "cae.h"
#include "hpidriver.h" #include "driver_alsa.h"
#include "jackdriver.h" #include "driver_hpi.h"
#include "driver_jack.h"
volatile bool exiting=false; volatile bool exiting=false;
#ifdef JACK #ifdef JACK
@@ -341,7 +341,7 @@ void MainObject::loadPlaybackData(int id,unsigned card,const QString &name)
QString wavename; QString wavename;
int new_stream=-1; int new_stream=-1;
int handle; int handle;
CaeDriver *dvr=GetDriver(card); Driver *dvr=GetDriver(card);
if(dvr==NULL) { if(dvr==NULL) {
cae_server-> cae_server->
@@ -385,7 +385,7 @@ void MainObject::unloadPlaybackData(int id,unsigned handle)
{ {
int card=play_handle[handle].card; int card=play_handle[handle].card;
int stream=play_handle[handle].stream; int stream=play_handle[handle].stream;
CaeDriver *dvr=GetDriver(card); Driver *dvr=GetDriver(card);
if(dvr==NULL) { if(dvr==NULL) {
cae_server->sendCommand(id,QString().sprintf("UP %d -!",handle)); cae_server->sendCommand(id,QString().sprintf("UP %d -!",handle));
@@ -416,7 +416,7 @@ void MainObject::playPositionData(int id,unsigned handle,unsigned pos)
{ {
int card=play_handle[handle].card; int card=play_handle[handle].card;
int stream=play_handle[handle].stream; int stream=play_handle[handle].stream;
CaeDriver *dvr=GetDriver(card); Driver *dvr=GetDriver(card);
if(dvr==NULL) { if(dvr==NULL) {
cae_server->sendCommand(id,QString().sprintf("PP %d %d -!",handle,pos)); cae_server->sendCommand(id,QString().sprintf("PP %d %d -!",handle,pos));
@@ -443,7 +443,7 @@ void MainObject::playData(int id,unsigned handle,unsigned length,unsigned speed,
{ {
int card=play_handle[handle].card; int card=play_handle[handle].card;
int stream=play_handle[handle].stream; int stream=play_handle[handle].stream;
CaeDriver *dvr=GetDriver(card); Driver *dvr=GetDriver(card);
if(dvr==NULL) { if(dvr==NULL) {
cae_server-> cae_server->
@@ -494,7 +494,7 @@ void MainObject::stopPlaybackData(int id,unsigned handle)
{ {
int card=play_handle[handle].card; int card=play_handle[handle].card;
int stream=play_handle[handle].stream; int stream=play_handle[handle].stream;
CaeDriver *dvr=GetDriver(card); Driver *dvr=GetDriver(card);
if(dvr==NULL) { if(dvr==NULL) {
cae_server->sendCommand(id,QString().sprintf("SP %u -!",handle)); cae_server->sendCommand(id,QString().sprintf("SP %u -!",handle));
@@ -517,7 +517,7 @@ void MainObject::stopPlaybackData(int id,unsigned handle)
void MainObject::timescalingSupportData(int id,unsigned card) void MainObject::timescalingSupportData(int id,unsigned card)
{ {
bool state=false; bool state=false;
CaeDriver *dvr=GetDriver(card); Driver *dvr=GetDriver(card);
if(dvr==NULL) { if(dvr==NULL) {
return; return;
@@ -538,7 +538,7 @@ void MainObject::loadRecordingData(int id,unsigned card,unsigned port,
const QString &name) const QString &name)
{ {
QString wavename; QString wavename;
CaeDriver *dvr=GetDriver(card); Driver *dvr=GetDriver(card);
if(dvr==NULL) { if(dvr==NULL) {
cae_server-> cae_server->
@@ -579,7 +579,7 @@ void MainObject::loadRecordingData(int id,unsigned card,unsigned port,
void MainObject::unloadRecordingData(int id,unsigned card,unsigned stream) void MainObject::unloadRecordingData(int id,unsigned card,unsigned stream)
{ {
CaeDriver *dvr=GetDriver(card); Driver *dvr=GetDriver(card);
if(dvr==NULL) { if(dvr==NULL) {
cae_server->sendCommand(id,QString().sprintf("UR %u %u -!",card,stream)); cae_server->sendCommand(id,QString().sprintf("UR %u %u -!",card,stream));
@@ -610,7 +610,7 @@ void MainObject::unloadRecordingData(int id,unsigned card,unsigned stream)
void MainObject::recordData(int id,unsigned card,unsigned stream,unsigned len, void MainObject::recordData(int id,unsigned card,unsigned stream,unsigned len,
int threshold_level) int threshold_level)
{ {
CaeDriver *dvr=GetDriver(card); Driver *dvr=GetDriver(card);
if(dvr==NULL) { if(dvr==NULL) {
cae_server-> cae_server->
@@ -643,7 +643,7 @@ void MainObject::recordData(int id,unsigned card,unsigned stream,unsigned len,
void MainObject::stopRecordingData(int id,unsigned card,unsigned stream) void MainObject::stopRecordingData(int id,unsigned card,unsigned stream)
{ {
CaeDriver *dvr=GetDriver(card); Driver *dvr=GetDriver(card);
if(dvr==NULL) { if(dvr==NULL) {
cae_server->sendCommand(id,QString().sprintf("SR %u %u -!",card,stream)); cae_server->sendCommand(id,QString().sprintf("SR %u %u -!",card,stream));
@@ -661,7 +661,7 @@ void MainObject::stopRecordingData(int id,unsigned card,unsigned stream)
void MainObject::setInputVolumeData(int id,unsigned card,unsigned stream, void MainObject::setInputVolumeData(int id,unsigned card,unsigned stream,
int level) int level)
{ {
CaeDriver *dvr=GetDriver(card); Driver *dvr=GetDriver(card);
if(dvr==NULL) { if(dvr==NULL) {
cae_server-> cae_server->
@@ -686,7 +686,7 @@ void MainObject::setInputVolumeData(int id,unsigned card,unsigned stream,
void MainObject::setOutputVolumeData(int id,unsigned card,unsigned stream, void MainObject::setOutputVolumeData(int id,unsigned card,unsigned stream,
unsigned port,int level) unsigned port,int level)
{ {
CaeDriver *dvr=GetDriver(card); Driver *dvr=GetDriver(card);
if(dvr==NULL) { if(dvr==NULL) {
cae_server->sendCommand(id,QString().sprintf("OV %u %u %u %d -!", cae_server->sendCommand(id,QString().sprintf("OV %u %u %u %d -!",
@@ -711,7 +711,7 @@ void MainObject::setOutputVolumeData(int id,unsigned card,unsigned stream,
void MainObject::fadeOutputVolumeData(int id,unsigned card,unsigned stream, void MainObject::fadeOutputVolumeData(int id,unsigned card,unsigned stream,
unsigned port,int level,unsigned length) unsigned port,int level,unsigned length)
{ {
CaeDriver *dvr=GetDriver(card); Driver *dvr=GetDriver(card);
if(dvr==NULL) { if(dvr==NULL) {
cae_server-> cae_server->
@@ -739,7 +739,7 @@ void MainObject::fadeOutputVolumeData(int id,unsigned card,unsigned stream,
void MainObject::setInputLevelData(int id,unsigned card,unsigned port, void MainObject::setInputLevelData(int id,unsigned card,unsigned port,
int level) int level)
{ {
CaeDriver *dvr=GetDriver(card); Driver *dvr=GetDriver(card);
if(dvr==NULL) { if(dvr==NULL) {
cae_server->sendCommand(id,QString().sprintf("IL %u %u %d -!", cae_server->sendCommand(id,QString().sprintf("IL %u %u %d -!",
@@ -765,7 +765,7 @@ void MainObject::setInputLevelData(int id,unsigned card,unsigned port,
void MainObject::setOutputLevelData(int id,unsigned card,unsigned port, void MainObject::setOutputLevelData(int id,unsigned card,unsigned port,
int level) int level)
{ {
CaeDriver *dvr=GetDriver(card); Driver *dvr=GetDriver(card);
if(dvr==NULL) { if(dvr==NULL) {
cae_server->sendCommand(id,QString().sprintf("OL %u %u %d -!", cae_server->sendCommand(id,QString().sprintf("OL %u %u %d -!",
@@ -790,7 +790,7 @@ void MainObject::setOutputLevelData(int id,unsigned card,unsigned port,
void MainObject::setInputModeData(int id,unsigned card,unsigned stream, void MainObject::setInputModeData(int id,unsigned card,unsigned stream,
unsigned mode) unsigned mode)
{ {
CaeDriver *dvr=GetDriver(card); Driver *dvr=GetDriver(card);
if(dvr==NULL) { if(dvr==NULL) {
cae_server->sendCommand(id,QString().sprintf("IM %u %u %u -!", cae_server->sendCommand(id,QString().sprintf("IM %u %u %u -!",
@@ -815,7 +815,7 @@ void MainObject::setInputModeData(int id,unsigned card,unsigned stream,
void MainObject::setOutputModeData(int id,unsigned card,unsigned stream, void MainObject::setOutputModeData(int id,unsigned card,unsigned stream,
unsigned mode) unsigned mode)
{ {
CaeDriver *dvr=GetDriver(card); Driver *dvr=GetDriver(card);
if(dvr==NULL) { if(dvr==NULL) {
cae_server->sendCommand(id,QString().sprintf("OM %u %u %u -!", cae_server->sendCommand(id,QString().sprintf("OM %u %u %u -!",
@@ -840,7 +840,7 @@ void MainObject::setOutputModeData(int id,unsigned card,unsigned stream,
void MainObject::setInputVoxLevelData(int id,unsigned card,unsigned stream, void MainObject::setInputVoxLevelData(int id,unsigned card,unsigned stream,
int level) int level)
{ {
CaeDriver *dvr=GetDriver(card); Driver *dvr=GetDriver(card);
if(dvr==NULL) { if(dvr==NULL) {
cae_server->sendCommand(id,QString().sprintf("IX %u %u %d -!", cae_server->sendCommand(id,QString().sprintf("IX %u %u %d -!",
@@ -865,7 +865,7 @@ void MainObject::setInputVoxLevelData(int id,unsigned card,unsigned stream,
void MainObject::setInputTypeData(int id,unsigned card,unsigned port, void MainObject::setInputTypeData(int id,unsigned card,unsigned port,
unsigned type) unsigned type)
{ {
CaeDriver *dvr=GetDriver(card); Driver *dvr=GetDriver(card);
if(dvr==NULL) { if(dvr==NULL) {
cae_server->sendCommand(id,QString().sprintf("IT %u %u %u -!", cae_server->sendCommand(id,QString().sprintf("IT %u %u %u -!",
@@ -889,7 +889,7 @@ void MainObject::setInputTypeData(int id,unsigned card,unsigned port,
void MainObject::getInputStatusData(int id,unsigned card,unsigned port) void MainObject::getInputStatusData(int id,unsigned card,unsigned port)
{ {
CaeDriver *dvr=GetDriver(card); Driver *dvr=GetDriver(card);
if(dvr==NULL) { if(dvr==NULL) {
return; return;
@@ -909,7 +909,7 @@ void MainObject::setAudioPassthroughLevelData(int id,unsigned card,
unsigned input,unsigned output, unsigned input,unsigned output,
int level) int level)
{ {
CaeDriver *dvr=GetDriver(card); Driver *dvr=GetDriver(card);
if(dvr==NULL) { if(dvr==NULL) {
cae_server->sendCommand(id,QString().sprintf("AL %u %u %u %d -!", cae_server->sendCommand(id,QString().sprintf("AL %u %u %u %d -!",
@@ -937,7 +937,7 @@ void MainObject::setClockSourceData(int id,unsigned card,int input)
cae_server->sendCommand(id,QString().sprintf("CS %u %u -!",card,input)); cae_server->sendCommand(id,QString().sprintf("CS %u %u -!",card,input));
return; return;
} }
CaeDriver *dvr=GetDriver(card); Driver *dvr=GetDriver(card);
if(dvr==NULL) { if(dvr==NULL) {
cae_server->sendCommand(id,QString().sprintf("CS %u %u +!",card,input)); cae_server->sendCommand(id,QString().sprintf("CS %u %u +!",card,input));
@@ -1093,7 +1093,7 @@ void MainObject::updateMeters()
} }
for(int i=0;i<RD_MAX_CARDS;i++) { for(int i=0;i<RD_MAX_CARDS;i++) {
CaeDriver *dvr=GetDriver(i); Driver *dvr=GetDriver(i);
if(dvr!=NULL) { if(dvr!=NULL) {
for(int j=0;j<RD_MAX_PORTS;j++) { for(int j=0;j<RD_MAX_PORTS;j++) {
if(dvr->getInputStatus(i,j)!=port_status[i][j]) { if(dvr->getInputStatus(i,j)!=port_status[i][j]) {
@@ -1194,7 +1194,7 @@ void MainObject::InitMixers()
{ {
for(int i=0;i<RD_MAX_CARDS;i++) { for(int i=0;i<RD_MAX_CARDS;i++) {
RDAudioPort *port=new RDAudioPort(rda->config()->stationName(),i); RDAudioPort *port=new RDAudioPort(rda->config()->stationName(),i);
CaeDriver *dvr=GetDriver(i); Driver *dvr=GetDriver(i);
if(dvr!=NULL) { if(dvr!=NULL) {
dvr->setClockSource(i,port->clockSource()); dvr->setClockSource(i,port->clockSource());
@@ -1221,7 +1221,7 @@ void MainObject::InitMixers()
void MainObject::KillSocket(int ch) void MainObject::KillSocket(int ch)
{ {
for(int i=0;i<RD_MAX_CARDS;i++) { for(int i=0;i<RD_MAX_CARDS;i++) {
CaeDriver *dvr=GetDriver(i); Driver *dvr=GetDriver(i);
for(int j=0;j<RD_MAX_STREAMS;j++) { for(int j=0;j<RD_MAX_STREAMS;j++) {
if(record_owner[i][j]==ch) { if(record_owner[i][j]==ch) {
rda->syslog(LOG_DEBUG,"force unloading record context for connection %s:%u: Card: %d Stream: %d Handle: %d", rda->syslog(LOG_DEBUG,"force unloading record context for connection %s:%u: Card: %d Stream: %d Handle: %d",
@@ -1623,7 +1623,7 @@ void MainObject::SendMeterUpdate(const QString &msg,int conn_id)
} }
CaeDriver *MainObject::GetDriver(unsigned card) const Driver *MainObject::GetDriver(unsigned card) const
{ {
for(int i=0;i<d_drivers.size();i++) { for(int i=0;i<d_drivers.size();i++) {
if(d_drivers.at(i)->hasCard(card)) { if(d_drivers.at(i)->hasCard(card)) {
@@ -1636,12 +1636,12 @@ CaeDriver *MainObject::GetDriver(unsigned card) const
void MainObject::MakeDriver(unsigned *next_card,RDStation::AudioDriver type) void MainObject::MakeDriver(unsigned *next_card,RDStation::AudioDriver type)
{ {
CaeDriver *dvr=NULL; Driver *dvr=NULL;
switch(type) { switch(type) {
case RDStation::Hpi: case RDStation::Hpi:
#ifdef HPI #ifdef HPI
dvr=new HpiDriver(this); dvr=new DriverHpi(this);
rda->station()->setDriverVersion(RDStation::Hpi,"v"+dvr->version()); rda->station()->setDriverVersion(RDStation::Hpi,"v"+dvr->version());
#else #else
rda->station()->setDriverVersion(RDStation::Hpi,"[not enabled]"); rda->station()->setDriverVersion(RDStation::Hpi,"[not enabled]");
@@ -1650,7 +1650,7 @@ void MainObject::MakeDriver(unsigned *next_card,RDStation::AudioDriver type)
case RDStation::Alsa: case RDStation::Alsa:
#ifdef ALSA #ifdef ALSA
dvr=new AlsaDriver(this); dvr=new DriverAlsa(this);
rda->station()->setDriverVersion(RDStation::Alsa,"v"+dvr->version()); rda->station()->setDriverVersion(RDStation::Alsa,"v"+dvr->version());
#else #else
rda->station()->setDriverVersion(RDStation::Alsa,"[not enabled]"); rda->station()->setDriverVersion(RDStation::Alsa,"[not enabled]");
@@ -1659,7 +1659,7 @@ void MainObject::MakeDriver(unsigned *next_card,RDStation::AudioDriver type)
case RDStation::Jack: case RDStation::Jack:
#ifdef JACK #ifdef JACK
dvr=new JackDriver(this); dvr=new DriverJack(this);
rda->station()->setDriverVersion(RDStation::Jack,"v"+dvr->version()); rda->station()->setDriverVersion(RDStation::Jack,"v"+dvr->version());
#else #else
rda->station()->setDriverVersion(RDStation::Jack,"[not enabled]"); rda->station()->setDriverVersion(RDStation::Jack,"[not enabled]");

View File

@@ -49,7 +49,7 @@
#include <rdconfig.h> #include <rdconfig.h>
#include <rdstation.h> #include <rdstation.h>
#include "caedriver.h" #include "driver.h"
#include "cae_server.h" #include "cae_server.h"
#ifndef HAVE_SRC_CONV #ifndef HAVE_SRC_CONV
@@ -136,9 +136,9 @@ class MainObject : public QObject
void SendMeterOutputStatusUpdate(); void SendMeterOutputStatusUpdate();
void SendMeterOutputStatusUpdate(int card,int port,int stream); void SendMeterOutputStatusUpdate(int card,int port,int stream);
void SendMeterUpdate(const QString &msg,int conn_id); void SendMeterUpdate(const QString &msg,int conn_id);
CaeDriver *GetDriver(unsigned card) const; Driver *GetDriver(unsigned card) const;
void MakeDriver(unsigned *next_card,RDStation::AudioDriver type); void MakeDriver(unsigned *next_card,RDStation::AudioDriver type);
QList<CaeDriver *> d_drivers; QList<Driver *> d_drivers;
bool debug; bool debug;
unsigned system_sample_rate; unsigned system_sample_rate;
CaeServer *cae_server; CaeServer *cae_server;

View File

@@ -20,9 +20,9 @@
#include <dlfcn.h> #include <dlfcn.h>
#include "caedriver.h" #include "driver.h"
CaeDriver::CaeDriver(RDStation::AudioDriver type,QObject *parent) Driver::Driver(RDStation::AudioDriver type,QObject *parent)
: QObject(parent) : QObject(parent)
{ {
d_driver_type=type; d_driver_type=type;
@@ -32,36 +32,36 @@ CaeDriver::CaeDriver(RDStation::AudioDriver type,QObject *parent)
} }
RDStation::AudioDriver CaeDriver::driverType() const RDStation::AudioDriver Driver::driverType() const
{ {
return d_driver_type; return d_driver_type;
} }
bool CaeDriver::hasCard(int cardnum) const bool Driver::hasCard(int cardnum) const
{ {
return d_cards.contains(cardnum); return d_cards.contains(cardnum);
} }
void CaeDriver::processBuffers() void Driver::processBuffers()
{ {
} }
void CaeDriver::statePlayUpdate(int card,int stream,int state) void Driver::statePlayUpdate(int card,int stream,int state)
{ {
emit playStateChanged(card,stream,state); emit playStateChanged(card,stream,state);
} }
void CaeDriver::stateRecordUpdate(int card,int stream,int state) void Driver::stateRecordUpdate(int card,int stream,int state)
{ {
emit recordStateChanged(card,stream,state); emit recordStateChanged(card,stream,state);
} }
void CaeDriver::addCard(unsigned cardnum) void Driver::addCard(unsigned cardnum)
{ {
if(d_cards.contains(cardnum)) { if(d_cards.contains(cardnum)) {
rda->syslog(LOG_WARNING, rda->syslog(LOG_WARNING,
@@ -75,13 +75,13 @@ void CaeDriver::addCard(unsigned cardnum)
} }
unsigned CaeDriver::systemSampleRate() const unsigned Driver::systemSampleRate() const
{ {
return d_system_sample_rate; return d_system_sample_rate;
} }
bool CaeDriver::LoadTwoLame() bool Driver::LoadTwoLame()
{ {
#ifdef HAVE_TWOLAME #ifdef HAVE_TWOLAME
if((twolame_handle=dlopen("libtwolame.so.0",RTLD_NOW))==NULL) { if((twolame_handle=dlopen("libtwolame.so.0",RTLD_NOW))==NULL) {
@@ -121,7 +121,7 @@ bool CaeDriver::LoadTwoLame()
} }
bool CaeDriver::InitTwoLameEncoder(int card,int stream,int chans,int samprate, bool Driver::InitTwoLameEncoder(int card,int stream,int chans,int samprate,
int bitrate) int bitrate)
{ {
if(twolame_handle==NULL) { if(twolame_handle==NULL) {
@@ -165,7 +165,7 @@ bool CaeDriver::InitTwoLameEncoder(int card,int stream,int chans,int samprate,
} }
void CaeDriver::FreeTwoLameEncoder(int card,int stream) void Driver::FreeTwoLameEncoder(int card,int stream)
{ {
#ifdef HAVE_TWOLAME #ifdef HAVE_TWOLAME
if(twolame_lameopts[card][stream]!=NULL) { if(twolame_lameopts[card][stream]!=NULL) {
@@ -176,7 +176,7 @@ void CaeDriver::FreeTwoLameEncoder(int card,int stream)
} }
bool CaeDriver::LoadMad() bool Driver::LoadMad()
{ {
#ifdef HAVE_MAD #ifdef HAVE_MAD
if((mad_handle=dlopen("libmad.so.0",RTLD_NOW))==NULL) { if((mad_handle=dlopen("libmad.so.0",RTLD_NOW))==NULL) {
@@ -210,7 +210,7 @@ bool CaeDriver::LoadMad()
} }
bool CaeDriver::InitMadDecoder(int card,int stream,RDWaveFile *wave) bool Driver::InitMadDecoder(int card,int stream,RDWaveFile *wave)
{ {
if(mad_handle==NULL) { if(mad_handle==NULL) {
rda->syslog(LOG_WARNING,"MPEG Layer 2 decode not available"); rda->syslog(LOG_WARNING,"MPEG Layer 2 decode not available");
@@ -233,7 +233,7 @@ bool CaeDriver::InitMadDecoder(int card,int stream,RDWaveFile *wave)
} }
void CaeDriver::FreeMadDecoder(int card,int stream) void Driver::FreeMadDecoder(int card,int stream)
{ {
#ifdef HAVE_MAD #ifdef HAVE_MAD
if(mad_active[card][stream]) { if(mad_active[card][stream]) {

View File

@@ -1,4 +1,4 @@
// caedriver.h // driver.h
// //
// Abstract base class for caed(8) audio driver implementations. // Abstract base class for caed(8) audio driver implementations.
// //
@@ -18,8 +18,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
#ifndef CAEDRIVER_H #ifndef DRIVER_H
#define CAEDRIVER_H #define DRIVER_H
#ifdef HAVE_TWOLAME #ifdef HAVE_TWOLAME
#include <twolame.h> #include <twolame.h>
@@ -39,11 +39,11 @@
extern void SigHandler(int signum); extern void SigHandler(int signum);
class CaeDriver : public QObject class Driver : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
CaeDriver(RDStation::AudioDriver type,QObject *parent=0); Driver(RDStation::AudioDriver type,QObject *parent=0);
RDStation::AudioDriver driverType() const; RDStation::AudioDriver driverType() const;
bool hasCard(int cardnum) const; bool hasCard(int cardnum) const;
virtual QString version() const=0; virtual QString version() const=0;
@@ -155,4 +155,4 @@ class CaeDriver : public QObject
}; };
#endif // CAEDRIVER_H #endif // DRIVER_H

View File

@@ -1,4 +1,4 @@
// alsadriver.cpp // driver_alsa.cpp
// //
// caed(8) driver for Advanced Linux Audio Architecture devices // caed(8) driver for Advanced Linux Audio Architecture devices
// //
@@ -24,7 +24,7 @@
#include <rdmeteraverage.h> #include <rdmeteraverage.h>
#include <rdringbuffer.h> #include <rdringbuffer.h>
#include "alsadriver.h" #include "driver_alsa.h"
#ifdef ALSA #ifdef ALSA
// //
@@ -526,7 +526,7 @@ void *AlsaPlayCallback(void *ptr)
} }
void AlsaDriver::AlsaInitCallback() void DriverAlsa::AlsaInitCallback()
{ {
int avg_periods= int avg_periods=
(330*systemSampleRate())/(1000*rda->config()->alsaPeriodSize()); (330*systemSampleRate())/(1000*rda->config()->alsaPeriodSize());
@@ -562,8 +562,8 @@ void AlsaDriver::AlsaInitCallback()
#endif // ALSA #endif // ALSA
AlsaDriver::AlsaDriver(QObject *parent) DriverAlsa::DriverAlsa(QObject *parent)
: CaeDriver(RDStation::Alsa,parent) : Driver(RDStation::Alsa,parent)
{ {
#ifdef ALSA #ifdef ALSA
// //
@@ -628,7 +628,7 @@ AlsaDriver::AlsaDriver(QObject *parent)
} }
AlsaDriver::~AlsaDriver() DriverAlsa::~DriverAlsa()
{ {
#ifdef ALSA #ifdef ALSA
for(int i=0;i<RD_MAX_CARDS;i++) { for(int i=0;i<RD_MAX_CARDS;i++) {
@@ -647,7 +647,7 @@ AlsaDriver::~AlsaDriver()
} }
QString AlsaDriver::version() const QString DriverAlsa::version() const
{ {
#ifdef ALSA #ifdef ALSA
return return
@@ -658,7 +658,7 @@ QString AlsaDriver::version() const
} }
bool AlsaDriver::initialize(unsigned *next_cardnum) bool DriverAlsa::initialize(unsigned *next_cardnum)
{ {
QString dev; QString dev;
snd_pcm_t *pcm_play_handle; snd_pcm_t *pcm_play_handle;
@@ -726,7 +726,7 @@ bool AlsaDriver::initialize(unsigned *next_cardnum)
} }
bool AlsaDriver::loadPlayback(int card,QString wavename,int *stream) bool DriverAlsa::loadPlayback(int card,QString wavename,int *stream)
{ {
#ifdef ALSA #ifdef ALSA
if(alsa_play_format[card].exiting||((*stream=GetAlsaOutputStream(card))<0)) { if(alsa_play_format[card].exiting||((*stream=GetAlsaOutputStream(card))<0)) {
@@ -786,7 +786,7 @@ bool AlsaDriver::loadPlayback(int card,QString wavename,int *stream)
} }
bool AlsaDriver::unloadPlayback(int card,int stream) bool DriverAlsa::unloadPlayback(int card,int stream)
{ {
#ifdef ALSA #ifdef ALSA
if(alsa_play_ring[card][stream]==NULL) { if(alsa_play_ring[card][stream]==NULL) {
@@ -809,7 +809,7 @@ bool AlsaDriver::unloadPlayback(int card,int stream)
} }
bool AlsaDriver::playbackPosition(int card,int stream,unsigned pos) bool DriverAlsa::playbackPosition(int card,int stream,unsigned pos)
{ {
#ifdef ALSA #ifdef ALSA
unsigned offset=0; unsigned offset=0;
@@ -860,7 +860,7 @@ bool AlsaDriver::playbackPosition(int card,int stream,unsigned pos)
} }
bool AlsaDriver::play(int card,int stream,int length,int speed,bool pitch, bool DriverAlsa::play(int card,int stream,int length,int speed,bool pitch,
bool rates) bool rates)
{ {
#ifdef ALSA #ifdef ALSA
@@ -880,7 +880,7 @@ bool AlsaDriver::play(int card,int stream,int length,int speed,bool pitch,
} }
bool AlsaDriver::stopPlayback(int card,int stream) bool DriverAlsa::stopPlayback(int card,int stream)
{ {
#ifdef ALSA #ifdef ALSA
if((alsa_play_ring[card][stream]==NULL)||(!alsa_playing[card][stream])) { if((alsa_play_ring[card][stream]==NULL)||(!alsa_playing[card][stream])) {
@@ -897,13 +897,13 @@ bool AlsaDriver::stopPlayback(int card,int stream)
} }
bool AlsaDriver::timescaleSupported(int card) bool DriverAlsa::timescaleSupported(int card)
{ {
return false; return false;
} }
bool AlsaDriver::loadRecord(int card,int port,int coding,int chans,int samprate, bool DriverAlsa::loadRecord(int card,int port,int coding,int chans,int samprate,
int bitrate,QString wavename) int bitrate,QString wavename)
{ {
#ifdef ALSA #ifdef ALSA
@@ -999,7 +999,7 @@ bool AlsaDriver::loadRecord(int card,int port,int coding,int chans,int samprate,
} }
bool AlsaDriver::unloadRecord(int card,int port,unsigned *len) bool DriverAlsa::unloadRecord(int card,int port,unsigned *len)
{ {
#ifdef ALSA #ifdef ALSA
alsa_recording[card][port]=false; alsa_recording[card][port]=false;
@@ -1020,7 +1020,7 @@ bool AlsaDriver::unloadRecord(int card,int port,unsigned *len)
} }
bool AlsaDriver::record(int card,int port,int length,int thres) bool DriverAlsa::record(int card,int port,int length,int thres)
{ {
#ifdef ALSA #ifdef ALSA
if(!alsa_ready[card][port]) { if(!alsa_ready[card][port]) {
@@ -1040,7 +1040,7 @@ bool AlsaDriver::record(int card,int port,int length,int thres)
} }
bool AlsaDriver::stopRecord(int card,int port) bool DriverAlsa::stopRecord(int card,int port)
{ {
#ifdef ALSA #ifdef ALSA
if(!alsa_recording[card][port]) { if(!alsa_recording[card][port]) {
@@ -1054,7 +1054,7 @@ bool AlsaDriver::stopRecord(int card,int port)
} }
bool AlsaDriver::setClockSource(int card,int src) bool DriverAlsa::setClockSource(int card,int src)
{ {
#ifdef ALSA #ifdef ALSA
return true; return true;
@@ -1064,7 +1064,7 @@ bool AlsaDriver::setClockSource(int card,int src)
} }
bool AlsaDriver::setInputVolume(int card,int stream,int level) bool DriverAlsa::setInputVolume(int card,int stream,int level)
{ {
#ifdef ALSA #ifdef ALSA
if(level>-10000) { if(level>-10000) {
@@ -1082,7 +1082,7 @@ bool AlsaDriver::setInputVolume(int card,int stream,int level)
} }
bool AlsaDriver::setOutputVolume(int card,int stream,int port,int level) bool DriverAlsa::setOutputVolume(int card,int stream,int port,int level)
{ {
#ifdef ALSA #ifdef ALSA
if(level>-10000) { if(level>-10000) {
@@ -1100,7 +1100,7 @@ bool AlsaDriver::setOutputVolume(int card,int stream,int port,int level)
} }
bool AlsaDriver::fadeOutputVolume(int card,int stream,int port,int level, bool DriverAlsa::fadeOutputVolume(int card,int stream,int port,int level,
int length) int length)
{ {
#ifdef ALSA #ifdef ALSA
@@ -1128,7 +1128,7 @@ bool AlsaDriver::fadeOutputVolume(int card,int stream,int port,int level,
} }
bool AlsaDriver::setInputLevel(int card,int port,int level) bool DriverAlsa::setInputLevel(int card,int port,int level)
{ {
#ifdef ALSA #ifdef ALSA
return true; return true;
@@ -1138,7 +1138,7 @@ bool AlsaDriver::setInputLevel(int card,int port,int level)
} }
bool AlsaDriver::setOutputLevel(int card,int port,int level) bool DriverAlsa::setOutputLevel(int card,int port,int level)
{ {
#ifdef ALSA #ifdef ALSA
return true; return true;
@@ -1148,7 +1148,7 @@ bool AlsaDriver::setOutputLevel(int card,int port,int level)
} }
bool AlsaDriver::setInputMode(int card,int stream,int mode) bool DriverAlsa::setInputMode(int card,int stream,int mode)
{ {
#ifdef ALSA #ifdef ALSA
return true; return true;
@@ -1158,7 +1158,7 @@ bool AlsaDriver::setInputMode(int card,int stream,int mode)
} }
bool AlsaDriver::setOutputMode(int card,int stream,int mode) bool DriverAlsa::setOutputMode(int card,int stream,int mode)
{ {
#ifdef ALSA #ifdef ALSA
return true; return true;
@@ -1168,7 +1168,7 @@ bool AlsaDriver::setOutputMode(int card,int stream,int mode)
} }
bool AlsaDriver::setInputVoxLevel(int card,int stream,int level) bool DriverAlsa::setInputVoxLevel(int card,int stream,int level)
{ {
#ifdef ALSA #ifdef ALSA
return true; return true;
@@ -1178,7 +1178,7 @@ bool AlsaDriver::setInputVoxLevel(int card,int stream,int level)
} }
bool AlsaDriver::setInputType(int card,int port,int type) bool DriverAlsa::setInputType(int card,int port,int type)
{ {
#ifdef ALSA #ifdef ALSA
return true; return true;
@@ -1188,7 +1188,7 @@ bool AlsaDriver::setInputType(int card,int port,int type)
} }
bool AlsaDriver::getInputStatus(int card,int port) bool DriverAlsa::getInputStatus(int card,int port)
{ {
#ifdef ALSA #ifdef ALSA
return true; return true;
@@ -1198,7 +1198,7 @@ bool AlsaDriver::getInputStatus(int card,int port)
} }
bool AlsaDriver::getInputMeters(int card,int port,short levels[2]) bool DriverAlsa::getInputMeters(int card,int port,short levels[2])
{ {
#ifdef ALSA #ifdef ALSA
double meter; double meter;
@@ -1223,7 +1223,7 @@ bool AlsaDriver::getInputMeters(int card,int port,short levels[2])
} }
bool AlsaDriver::getOutputMeters(int card,int port,short levels[2]) bool DriverAlsa::getOutputMeters(int card,int port,short levels[2])
{ {
#ifdef ALSA #ifdef ALSA
double meter; double meter;
@@ -1247,7 +1247,7 @@ bool AlsaDriver::getOutputMeters(int card,int port,short levels[2])
} }
bool AlsaDriver::getStreamOutputMeters(int card,int stream,short levels[2]) bool DriverAlsa::getStreamOutputMeters(int card,int stream,short levels[2])
{ {
#ifdef ALSA #ifdef ALSA
double meter; double meter;
@@ -1271,7 +1271,7 @@ bool AlsaDriver::getStreamOutputMeters(int card,int stream,short levels[2])
} }
bool AlsaDriver::setPassthroughLevel(int card,int in_port,int out_port, bool DriverAlsa::setPassthroughLevel(int card,int in_port,int out_port,
int level) int level)
{ {
#ifdef ALSA #ifdef ALSA
@@ -1291,7 +1291,7 @@ bool AlsaDriver::setPassthroughLevel(int card,int in_port,int out_port,
} }
void AlsaDriver::getOutputPosition(int card,unsigned *pos) void DriverAlsa::getOutputPosition(int card,unsigned *pos)
{// pos is in miliseconds {// pos is in miliseconds
#ifdef ALSA #ifdef ALSA
for(int i=0;i<RD_MAX_STREAMS;i++) { for(int i=0;i<RD_MAX_STREAMS;i++) {
@@ -1308,7 +1308,7 @@ void AlsaDriver::getOutputPosition(int card,unsigned *pos)
} }
void AlsaDriver::processBuffers() void DriverAlsa::processBuffers()
{ {
#ifdef ALSA #ifdef ALSA
for(int i=0;i<RD_MAX_CARDS;i++) { for(int i=0;i<RD_MAX_CARDS;i++) {
@@ -1335,7 +1335,7 @@ void AlsaDriver::processBuffers()
} }
void AlsaDriver::stopTimerData(int cardstream) void DriverAlsa::stopTimerData(int cardstream)
{ {
#ifdef ALSA #ifdef ALSA
int card=cardstream/RD_MAX_STREAMS; int card=cardstream/RD_MAX_STREAMS;
@@ -1346,7 +1346,7 @@ void AlsaDriver::stopTimerData(int cardstream)
} }
void AlsaDriver::fadeTimerData(int cardstream) void DriverAlsa::fadeTimerData(int cardstream)
{ {
#ifdef ALSA #ifdef ALSA
int card=cardstream/RD_MAX_STREAMS; int card=cardstream/RD_MAX_STREAMS;
@@ -1374,7 +1374,7 @@ void AlsaDriver::fadeTimerData(int cardstream)
} }
void AlsaDriver::recordTimerData(int cardport) void DriverAlsa::recordTimerData(int cardport)
{ {
#ifdef ALSA #ifdef ALSA
int card=cardport/RD_MAX_PORTS; int card=cardport/RD_MAX_PORTS;
@@ -1387,7 +1387,7 @@ void AlsaDriver::recordTimerData(int cardport)
#ifdef ALSA #ifdef ALSA
bool AlsaDriver::AlsaStartCaptureDevice(QString &dev,int card,snd_pcm_t *pcm) bool DriverAlsa::AlsaStartCaptureDevice(QString &dev,int card,snd_pcm_t *pcm)
{ {
snd_pcm_hw_params_t *hwparams; snd_pcm_hw_params_t *hwparams;
snd_pcm_sw_params_t *swparams; snd_pcm_sw_params_t *swparams;
@@ -1554,7 +1554,7 @@ bool AlsaDriver::AlsaStartCaptureDevice(QString &dev,int card,snd_pcm_t *pcm)
} }
bool AlsaDriver::AlsaStartPlayDevice(QString &dev,int card,snd_pcm_t *pcm) bool DriverAlsa::AlsaStartPlayDevice(QString &dev,int card,snd_pcm_t *pcm)
{ {
snd_pcm_hw_params_t *hwparams; snd_pcm_hw_params_t *hwparams;
snd_pcm_sw_params_t *swparams; snd_pcm_sw_params_t *swparams;
@@ -1712,7 +1712,7 @@ bool AlsaDriver::AlsaStartPlayDevice(QString &dev,int card,snd_pcm_t *pcm)
} }
int AlsaDriver::GetAlsaOutputStream(int card) int DriverAlsa::GetAlsaOutputStream(int card)
{ {
for(int i=0;i<RD_MAX_STREAMS;i++) { for(int i=0;i<RD_MAX_STREAMS;i++) {
if(alsa_play_ring[card][i]==NULL) { if(alsa_play_ring[card][i]==NULL) {
@@ -1724,14 +1724,14 @@ int AlsaDriver::GetAlsaOutputStream(int card)
} }
void AlsaDriver::FreeAlsaOutputStream(int card,int stream) void DriverAlsa::FreeAlsaOutputStream(int card,int stream)
{ {
delete alsa_play_ring[card][stream]; delete alsa_play_ring[card][stream];
alsa_play_ring[card][stream]=NULL; alsa_play_ring[card][stream]=NULL;
} }
void AlsaDriver::EmptyAlsaInputStream(int card,int stream) void DriverAlsa::EmptyAlsaInputStream(int card,int stream)
{ {
unsigned n=alsa_record_ring[card][stream]-> unsigned n=alsa_record_ring[card][stream]->
read((char *)alsa_wave_buffer,alsa_record_ring[card][stream]-> read((char *)alsa_wave_buffer,alsa_record_ring[card][stream]->
@@ -1740,7 +1740,7 @@ void AlsaDriver::EmptyAlsaInputStream(int card,int stream)
} }
void AlsaDriver::WriteAlsaBuffer(int card,int stream,int16_t *buffer,unsigned len) void DriverAlsa::WriteAlsaBuffer(int card,int stream,int16_t *buffer,unsigned len)
{ {
ssize_t s; ssize_t s;
unsigned char mpeg[2048]; unsigned char mpeg[2048];
@@ -1793,7 +1793,7 @@ void AlsaDriver::WriteAlsaBuffer(int card,int stream,int16_t *buffer,unsigned le
} }
void AlsaDriver::FillAlsaOutputStream(int card,int stream) void DriverAlsa::FillAlsaOutputStream(int card,int stream)
{ {
unsigned mpeg_frames=0; unsigned mpeg_frames=0;
unsigned frame_offset=0; unsigned frame_offset=0;
@@ -1904,7 +1904,7 @@ void AlsaDriver::FillAlsaOutputStream(int card,int stream)
#endif // ALSA #endif // ALSA
void AlsaDriver::AlsaClock() void DriverAlsa::AlsaClock()
{ {
#ifdef ALSA #ifdef ALSA
for(int i=0;i<RD_MAX_CARDS;i++) { for(int i=0;i<RD_MAX_CARDS;i++) {

View File

@@ -1,4 +1,4 @@
// alsadriver.h // driver_alsa.h
// //
// caed(8) driver for Advanced Linux Audio Architecture devices // caed(8) driver for Advanced Linux Audio Architecture devices
// //
@@ -18,13 +18,13 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
#ifndef ALSADRIVER_H #ifndef DRIVER_ALSA_H
#define ALSADRIVER_H #define DRIVER_ALSA_H
#include <rdconfig.h> #include <rdconfig.h>
#include <rdwavefile.h> #include <rdwavefile.h>
#include "caedriver.h" #include "driver.h"
#ifdef ALSA #ifdef ALSA
#include <alsa/asoundlib.h> #include <alsa/asoundlib.h>
@@ -45,12 +45,12 @@ struct alsa_format {
}; };
#endif // ALSA #endif // ALSA
class AlsaDriver : public CaeDriver class DriverAlsa : public Driver
{ {
Q_OBJECT Q_OBJECT
public: public:
AlsaDriver(QObject *parent=0); DriverAlsa(QObject *parent=0);
~AlsaDriver(); ~DriverAlsa();
QString version() const; QString version() const;
bool initialize(unsigned *next_cardnum); bool initialize(unsigned *next_cardnum);
bool loadPlayback(int card,QString wavename,int *stream); bool loadPlayback(int card,QString wavename,int *stream);
@@ -125,4 +125,4 @@ class AlsaDriver : public CaeDriver
}; };
#endif // ALSADRIVER_H #endif // DRIVER_ALSA_H

View File

@@ -1,4 +1,4 @@
// hpidriver.cpp // driver_hpi.cpp
// //
// caed(8) driver for AudioScience HPI audio devices. // caed(8) driver for AudioScience HPI audio devices.
// //
@@ -19,10 +19,10 @@
// //
#include <rdconf.h> #include <rdconf.h>
#include "hpidriver.h" #include "driver_hpi.h"
HpiDriver::HpiDriver(QObject *parent) DriverHpi::DriverHpi(QObject *parent)
: CaeDriver(RDStation::Hpi,parent) : Driver(RDStation::Hpi,parent)
{ {
#ifdef HPI #ifdef HPI
for(int i=0;i<RD_MAX_CARDS;i++) { for(int i=0;i<RD_MAX_CARDS;i++) {
@@ -36,7 +36,7 @@ HpiDriver::HpiDriver(QObject *parent)
} }
HpiDriver::~HpiDriver() DriverHpi::~DriverHpi()
{ {
#ifdef HPI #ifdef HPI
for(int i=0;i<RD_MAX_CARDS;i++) { for(int i=0;i<RD_MAX_CARDS;i++) {
@@ -54,7 +54,7 @@ HpiDriver::~HpiDriver()
} }
QString HpiDriver::version() const QString DriverHpi::version() const
{ {
#ifdef HPI #ifdef HPI
if(d_sound_card==NULL) { if(d_sound_card==NULL) {
@@ -72,7 +72,7 @@ QString HpiDriver::version() const
} }
bool HpiDriver::initialize(unsigned *next_cardnum) bool DriverHpi::initialize(unsigned *next_cardnum)
{ {
#ifdef HPI #ifdef HPI
d_sound_card->setFadeProfile(RD_FADE_TYPE); d_sound_card->setFadeProfile(RD_FADE_TYPE);
@@ -91,7 +91,7 @@ bool HpiDriver::initialize(unsigned *next_cardnum)
} }
bool HpiDriver::loadPlayback(int card,QString wavename,int *stream) bool DriverHpi::loadPlayback(int card,QString wavename,int *stream)
{ {
#ifdef HPI #ifdef HPI
RDHPIPlayStream *playstream=new RDHPIPlayStream(d_sound_card); RDHPIPlayStream *playstream=new RDHPIPlayStream(d_sound_card);
@@ -114,7 +114,7 @@ bool HpiDriver::loadPlayback(int card,QString wavename,int *stream)
} }
bool HpiDriver::unloadPlayback(int card,int stream) bool DriverHpi::unloadPlayback(int card,int stream)
{ {
#ifdef HPI #ifdef HPI
if(d_play_streams[card][stream]==NULL) { if(d_play_streams[card][stream]==NULL) {
@@ -135,7 +135,7 @@ bool HpiDriver::unloadPlayback(int card,int stream)
} }
bool HpiDriver::playbackPosition(int card,int stream,unsigned pos) bool DriverHpi::playbackPosition(int card,int stream,unsigned pos)
{ {
#ifdef HPI #ifdef HPI
if(d_play_streams[card][stream]==NULL) { if(d_play_streams[card][stream]==NULL) {
@@ -150,7 +150,7 @@ bool HpiDriver::playbackPosition(int card,int stream,unsigned pos)
} }
bool HpiDriver::play(int card,int stream,int length,int speed,bool pitch, bool DriverHpi::play(int card,int stream,int length,int speed,bool pitch,
bool rates) bool rates)
{ {
#ifdef HPI #ifdef HPI
@@ -168,7 +168,7 @@ bool HpiDriver::play(int card,int stream,int length,int speed,bool pitch,
} }
bool HpiDriver::stopPlayback(int card,int stream) bool DriverHpi::stopPlayback(int card,int stream)
{ {
#ifdef HPI #ifdef HPI
if(d_play_streams[card][stream]==NULL) { if(d_play_streams[card][stream]==NULL) {
@@ -183,7 +183,7 @@ bool HpiDriver::stopPlayback(int card,int stream)
} }
bool HpiDriver::timescaleSupported(int card) bool DriverHpi::timescaleSupported(int card)
{ {
#ifdef HPI #ifdef HPI
return d_sound_card->haveTimescaling(card); return d_sound_card->haveTimescaling(card);
@@ -193,7 +193,7 @@ bool HpiDriver::timescaleSupported(int card)
} }
bool HpiDriver::loadRecord(int card,int port,int coding,int chans,int samprate, bool DriverHpi::loadRecord(int card,int port,int coding,int chans,int samprate,
int bitrate,QString wavename) int bitrate,QString wavename)
{ {
#ifdef HPI #ifdef HPI
@@ -262,7 +262,7 @@ bool HpiDriver::loadRecord(int card,int port,int coding,int chans,int samprate,
} }
bool HpiDriver::unloadRecord(int card,int port,unsigned *len) bool DriverHpi::unloadRecord(int card,int port,unsigned *len)
{ {
#ifdef HPI #ifdef HPI
if(d_record_streams[card][port]==NULL) { if(d_record_streams[card][port]==NULL) {
@@ -284,7 +284,7 @@ bool HpiDriver::unloadRecord(int card,int port,unsigned *len)
} }
bool HpiDriver::record(int card,int port,int length,int thres) bool DriverHpi::record(int card,int port,int length,int thres)
{ {
#ifdef HPI #ifdef HPI
if(d_record_streams[card][port]==NULL) { if(d_record_streams[card][port]==NULL) {
@@ -308,7 +308,7 @@ bool HpiDriver::record(int card,int port,int length,int thres)
} }
bool HpiDriver::stopRecord(int card,int port) bool DriverHpi::stopRecord(int card,int port)
{ {
#ifdef HPI #ifdef HPI
if(d_record_streams[card][port]==NULL) { if(d_record_streams[card][port]==NULL) {
@@ -324,7 +324,7 @@ bool HpiDriver::stopRecord(int card,int port)
} }
bool HpiDriver::setClockSource(int card,int src) bool DriverHpi::setClockSource(int card,int src)
{ {
#ifdef HPI #ifdef HPI
return d_sound_card->setClockSource(card,(RDHPISoundCard::ClockSource)src); return d_sound_card->setClockSource(card,(RDHPISoundCard::ClockSource)src);
@@ -334,7 +334,7 @@ bool HpiDriver::setClockSource(int card,int src)
} }
bool HpiDriver::setInputVolume(int card,int stream,int level) bool DriverHpi::setInputVolume(int card,int stream,int level)
{ {
#ifdef HPI #ifdef HPI
d_sound_card->setInputVolume(card,stream,level); d_sound_card->setInputVolume(card,stream,level);
@@ -346,7 +346,7 @@ bool HpiDriver::setInputVolume(int card,int stream,int level)
} }
bool HpiDriver::setOutputVolume(int card,int stream,int port,int level) bool DriverHpi::setOutputVolume(int card,int stream,int port,int level)
{ {
#ifdef HPI #ifdef HPI
d_sound_card->setOutputVolume(card,stream,port,level); d_sound_card->setOutputVolume(card,stream,port,level);
@@ -358,7 +358,7 @@ bool HpiDriver::setOutputVolume(int card,int stream,int port,int level)
} }
bool HpiDriver::fadeOutputVolume(int card,int stream,int port,int level, bool DriverHpi::fadeOutputVolume(int card,int stream,int port,int level,
int length) int length)
{ {
#ifdef HPI #ifdef HPI
@@ -371,7 +371,7 @@ bool HpiDriver::fadeOutputVolume(int card,int stream,int port,int level,
} }
bool HpiDriver::setInputLevel(int card,int port,int level) bool DriverHpi::setInputLevel(int card,int port,int level)
{ {
#ifdef HPI #ifdef HPI
d_sound_card->setInputLevel(card,port,level); d_sound_card->setInputLevel(card,port,level);
@@ -383,7 +383,7 @@ bool HpiDriver::setInputLevel(int card,int port,int level)
} }
bool HpiDriver::setOutputLevel(int card,int port,int level) bool DriverHpi::setOutputLevel(int card,int port,int level)
{ {
#ifdef HPI #ifdef HPI
d_sound_card->setOutputLevel(card,port,level); d_sound_card->setOutputLevel(card,port,level);
@@ -395,7 +395,7 @@ bool HpiDriver::setOutputLevel(int card,int port,int level)
} }
bool HpiDriver::setInputMode(int card,int stream,int mode) bool DriverHpi::setInputMode(int card,int stream,int mode)
{ {
#ifdef HPI #ifdef HPI
switch(mode) { switch(mode) {
@@ -426,7 +426,7 @@ bool HpiDriver::setInputMode(int card,int stream,int mode)
} }
bool HpiDriver::setOutputMode(int card,int stream,int mode) bool DriverHpi::setOutputMode(int card,int stream,int mode)
{ {
#ifdef HPI #ifdef HPI
switch(mode) { switch(mode) {
@@ -457,7 +457,7 @@ bool HpiDriver::setOutputMode(int card,int stream,int mode)
} }
bool HpiDriver::setInputVoxLevel(int card,int stream,int level) bool DriverHpi::setInputVoxLevel(int card,int stream,int level)
{ {
#ifdef HPI #ifdef HPI
d_sound_card->setInputStreamVOX(card,stream,level); d_sound_card->setInputStreamVOX(card,stream,level);
@@ -469,7 +469,7 @@ bool HpiDriver::setInputVoxLevel(int card,int stream,int level)
} }
bool HpiDriver::setInputType(int card,int port,int type) bool DriverHpi::setInputType(int card,int port,int type)
{ {
#ifdef HPI #ifdef HPI
switch(type) { switch(type) {
@@ -492,7 +492,7 @@ bool HpiDriver::setInputType(int card,int port,int type)
} }
bool HpiDriver::getInputStatus(int card,int port) bool DriverHpi::getInputStatus(int card,int port)
{ {
#ifdef HPI #ifdef HPI
return d_sound_card->getInputPortError(card,port)==0; return d_sound_card->getInputPortError(card,port)==0;
@@ -502,7 +502,7 @@ bool HpiDriver::getInputStatus(int card,int port)
} }
bool HpiDriver::getInputMeters(int card,int port,short levels[2]) bool DriverHpi::getInputMeters(int card,int port,short levels[2])
{ {
#ifdef HPI #ifdef HPI
return d_sound_card->inputStreamMeter(card,port,levels); return d_sound_card->inputStreamMeter(card,port,levels);
@@ -512,7 +512,7 @@ bool HpiDriver::getInputMeters(int card,int port,short levels[2])
} }
bool HpiDriver::getOutputMeters(int card,int port,short levels[2]) bool DriverHpi::getOutputMeters(int card,int port,short levels[2])
{ {
#ifdef HPI #ifdef HPI
return d_sound_card->outputPortMeter(card,port,levels); return d_sound_card->outputPortMeter(card,port,levels);
@@ -522,7 +522,7 @@ bool HpiDriver::getOutputMeters(int card,int port,short levels[2])
} }
bool HpiDriver::getStreamOutputMeters(int card,int stream,short levels[2]) bool DriverHpi::getStreamOutputMeters(int card,int stream,short levels[2])
{ {
#ifdef HPI #ifdef HPI
return d_sound_card->outputStreamMeter(card,stream,levels); return d_sound_card->outputStreamMeter(card,stream,levels);
@@ -532,7 +532,7 @@ bool HpiDriver::getStreamOutputMeters(int card,int stream,short levels[2])
} }
bool HpiDriver::setPassthroughLevel(int card,int in_port,int out_port,int level) bool DriverHpi::setPassthroughLevel(int card,int in_port,int out_port,int level)
{ {
#ifdef HPI #ifdef HPI
return d_sound_card->setPassthroughVolume(card,in_port,out_port,level); return d_sound_card->setPassthroughVolume(card,in_port,out_port,level);
@@ -542,7 +542,7 @@ bool HpiDriver::setPassthroughLevel(int card,int in_port,int out_port,int level)
} }
void HpiDriver::getOutputPosition(int card,unsigned *pos) void DriverHpi::getOutputPosition(int card,unsigned *pos)
{ {
#ifdef HPI #ifdef HPI
for(int i=0;i<RD_MAX_STREAMS;i++) { for(int i=0;i<RD_MAX_STREAMS;i++) {

View File

@@ -1,4 +1,4 @@
// hpidriver.h // driver_hpi.h
// //
// caed(8) driver for AudioScience HPI audio devices. // caed(8) driver for AudioScience HPI audio devices.
// //
@@ -18,12 +18,12 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
#ifndef HPIDRIVER_H #ifndef DRIVER_HPI_H
#define HPIDRIVER_H #define DRIVER_HPI_H
#include <rdconfig.h> #include <rdconfig.h>
#include "caedriver.h" #include "driver.h"
#ifdef HPI #ifdef HPI
#include <rdhpisoundcard.h> #include <rdhpisoundcard.h>
@@ -31,12 +31,12 @@
#include <rdhpirecordstream.h> #include <rdhpirecordstream.h>
#endif // HPI #endif // HPI
class HpiDriver : public CaeDriver class DriverHpi : public Driver
{ {
Q_OBJECT Q_OBJECT
public: public:
HpiDriver(QObject *parent=0); DriverHpi(QObject *parent=0);
~HpiDriver(); ~DriverHpi();
QString version() const; QString version() const;
bool initialize(unsigned *next_cardnum); bool initialize(unsigned *next_cardnum);
void updateMeters(); void updateMeters();
@@ -80,4 +80,4 @@ class HpiDriver : public CaeDriver
}; };
#endif // HPIDRIVER_H #endif // DRIVER_HPI_H

View File

@@ -1,4 +1,4 @@
// jackdriver.cpp // driver_jack.cpp
// //
// caed(8) driver for Advanced Linux Audio Architecture devices // caed(8) driver for Advanced Linux Audio Architecture devices
// //
@@ -25,7 +25,7 @@
#include <rdescape_string.h> #include <rdescape_string.h>
#include <rdprofile.h> #include <rdprofile.h>
#include "jackdriver.h" #include "driver_jack.h"
#ifdef JACK #ifdef JACK
#endif // JACK #endif // JACK
@@ -382,8 +382,8 @@ void JackInitCallback()
JackDriver::JackDriver(QObject *parent) DriverJack::DriverJack(QObject *parent)
: CaeDriver(RDStation::Jack,parent) : Driver(RDStation::Jack,parent)
{ {
#ifdef JACK #ifdef JACK
jack_connected=false; jack_connected=false;
@@ -410,7 +410,7 @@ JackDriver::JackDriver(QObject *parent)
} }
JackDriver::~JackDriver() DriverJack::~DriverJack()
{ {
#ifdef JACK #ifdef JACK
for(int i=0;i<jack_clients.size();i++) { for(int i=0;i<jack_clients.size();i++) {
@@ -436,7 +436,7 @@ JackDriver::~JackDriver()
} }
QString JackDriver::version() const QString DriverJack::version() const
{ {
#ifdef JACK #ifdef JACK
return QString(jack_get_version_string()); return QString(jack_get_version_string());
@@ -446,7 +446,7 @@ QString JackDriver::version() const
} }
bool JackDriver::initialize(unsigned *next_cardnum) bool DriverJack::initialize(unsigned *next_cardnum)
{ {
#ifdef JACK #ifdef JACK
jack_options_t jackopts=JackNullOption; jack_options_t jackopts=JackNullOption;
@@ -702,7 +702,7 @@ bool JackDriver::initialize(unsigned *next_cardnum)
} }
bool JackDriver::loadPlayback(int card,QString wavename,int *stream) bool DriverJack::loadPlayback(int card,QString wavename,int *stream)
{ {
#ifdef JACK #ifdef JACK
if((*stream=GetJackOutputStream())<0) { if((*stream=GetJackOutputStream())<0) {
@@ -761,7 +761,7 @@ bool JackDriver::loadPlayback(int card,QString wavename,int *stream)
} }
bool JackDriver::unloadPlayback(int card,int stream) bool DriverJack::unloadPlayback(int card,int stream)
{ {
#ifdef JACK #ifdef JACK
if ((stream <0) || (stream >= RD_MAX_STREAMS)){ if ((stream <0) || (stream >= RD_MAX_STREAMS)){
@@ -787,7 +787,7 @@ bool JackDriver::unloadPlayback(int card,int stream)
} }
bool JackDriver::playbackPosition(int card,int stream,unsigned pos) bool DriverJack::playbackPosition(int card,int stream,unsigned pos)
{ {
#ifdef JACK #ifdef JACK
unsigned offset=0; unsigned offset=0;
@@ -837,7 +837,7 @@ bool JackDriver::playbackPosition(int card,int stream,unsigned pos)
} }
bool JackDriver::play(int card,int stream,int length,int speed,bool pitch, bool DriverJack::play(int card,int stream,int length,int speed,bool pitch,
bool rates) bool rates)
{ {
#ifdef JACK #ifdef JACK
@@ -863,7 +863,7 @@ bool JackDriver::play(int card,int stream,int length,int speed,bool pitch,
} }
bool JackDriver::stopPlayback(int card,int stream) bool DriverJack::stopPlayback(int card,int stream)
{ {
#ifdef JACK #ifdef JACK
if((stream <0) || (stream>=RD_MAX_STREAMS) || if((stream <0) || (stream>=RD_MAX_STREAMS) ||
@@ -880,7 +880,7 @@ bool JackDriver::stopPlayback(int card,int stream)
} }
bool JackDriver::timescaleSupported(int card) bool DriverJack::timescaleSupported(int card)
{ {
#ifdef JACK #ifdef JACK
return true; return true;
@@ -890,7 +890,7 @@ bool JackDriver::timescaleSupported(int card)
} }
bool JackDriver::loadRecord(int card,int port,int coding,int chans,int samprate, bool DriverJack::loadRecord(int card,int port,int coding,int chans,int samprate,
int bitrate,QString wavename) int bitrate,QString wavename)
{ {
#ifdef JACK #ifdef JACK
@@ -986,7 +986,7 @@ bool JackDriver::loadRecord(int card,int port,int coding,int chans,int samprate,
} }
bool JackDriver::unloadRecord(int card,int port,unsigned *len) bool DriverJack::unloadRecord(int card,int port,unsigned *len)
{ {
#ifdef JACK #ifdef JACK
if((port <0)||(port>=RD_MAX_PORTS)) { if((port <0)||(port>=RD_MAX_PORTS)) {
@@ -1010,7 +1010,7 @@ bool JackDriver::unloadRecord(int card,int port,unsigned *len)
} }
bool JackDriver::record(int card,int port,int length,int thres) bool DriverJack::record(int card,int port,int length,int thres)
{ {
#ifdef JACK #ifdef JACK
if((port<0)||(port>=RD_MAX_PORTS)) { if((port<0)||(port>=RD_MAX_PORTS)) {
@@ -1033,7 +1033,7 @@ bool JackDriver::record(int card,int port,int length,int thres)
} }
bool JackDriver::stopRecord(int card,int port) bool DriverJack::stopRecord(int card,int port)
{ {
#ifdef JACK #ifdef JACK
if((port<0)||(port>=RD_MAX_PORTS)) { if((port<0)||(port>=RD_MAX_PORTS)) {
@@ -1050,7 +1050,7 @@ bool JackDriver::stopRecord(int card,int port)
} }
bool JackDriver::setClockSource(int card,int src) bool DriverJack::setClockSource(int card,int src)
{ {
#ifdef JACK #ifdef JACK
return true; return true;
@@ -1060,7 +1060,7 @@ bool JackDriver::setClockSource(int card,int src)
} }
bool JackDriver::setInputVolume(int card,int stream,int level) bool DriverJack::setInputVolume(int card,int stream,int level)
{ {
#ifdef JACK #ifdef JACK
if((stream<0)||(stream>=RD_MAX_STREAMS)) { if((stream<0)||(stream>=RD_MAX_STREAMS)) {
@@ -1082,7 +1082,7 @@ bool JackDriver::setInputVolume(int card,int stream,int level)
} }
bool JackDriver::setOutputVolume(int card,int stream,int port,int level) bool DriverJack::setOutputVolume(int card,int stream,int port,int level)
{ {
#ifdef JACK #ifdef JACK
if((stream<0)||(stream>=RD_MAX_STREAMS)||(port<0)||(port>=RD_MAX_PORTS)) { if((stream<0)||(stream>=RD_MAX_STREAMS)||(port<0)||(port>=RD_MAX_PORTS)) {
@@ -1104,7 +1104,7 @@ bool JackDriver::setOutputVolume(int card,int stream,int port,int level)
} }
bool JackDriver::fadeOutputVolume(int card,int stream,int port,int level, bool DriverJack::fadeOutputVolume(int card,int stream,int port,int level,
int length) int length)
{ {
#ifdef JACK #ifdef JACK
@@ -1135,7 +1135,7 @@ bool JackDriver::fadeOutputVolume(int card,int stream,int port,int level,
} }
bool JackDriver::setInputLevel(int card,int port,int level) bool DriverJack::setInputLevel(int card,int port,int level)
{ {
#ifdef JACK #ifdef JACK
return true; return true;
@@ -1145,7 +1145,7 @@ bool JackDriver::setInputLevel(int card,int port,int level)
} }
bool JackDriver::setOutputLevel(int card,int port,int level) bool DriverJack::setOutputLevel(int card,int port,int level)
{ {
#ifdef JACK #ifdef JACK
return true; return true;
@@ -1155,7 +1155,7 @@ bool JackDriver::setOutputLevel(int card,int port,int level)
} }
bool JackDriver::setInputMode(int card,int stream,int mode) bool DriverJack::setInputMode(int card,int stream,int mode)
{ {
#ifdef JACK #ifdef JACK
jack_input_mode[card][stream]=mode; jack_input_mode[card][stream]=mode;
@@ -1166,7 +1166,7 @@ bool JackDriver::setInputMode(int card,int stream,int mode)
} }
bool JackDriver::setOutputMode(int card,int stream,int mode) bool DriverJack::setOutputMode(int card,int stream,int mode)
{ {
#ifdef JACK #ifdef JACK
return true; return true;
@@ -1176,7 +1176,7 @@ bool JackDriver::setOutputMode(int card,int stream,int mode)
} }
bool JackDriver::setInputVoxLevel(int card,int stream,int level) bool DriverJack::setInputVoxLevel(int card,int stream,int level)
{ {
#ifdef JACK #ifdef JACK
return true; return true;
@@ -1186,7 +1186,7 @@ bool JackDriver::setInputVoxLevel(int card,int stream,int level)
} }
bool JackDriver::setInputType(int card,int port,int type) bool DriverJack::setInputType(int card,int port,int type)
{ {
#ifdef JACK #ifdef JACK
return true; return true;
@@ -1196,7 +1196,7 @@ bool JackDriver::setInputType(int card,int port,int type)
} }
bool JackDriver::getInputStatus(int card,int port) bool DriverJack::getInputStatus(int card,int port)
{ {
#ifdef JACK #ifdef JACK
return true; return true;
@@ -1206,7 +1206,7 @@ bool JackDriver::getInputStatus(int card,int port)
} }
bool JackDriver::getInputMeters(int card,int port,short levels[2]) bool DriverJack::getInputMeters(int card,int port,short levels[2])
{ {
#ifdef JACK #ifdef JACK
jack_default_audio_sample_t meter; jack_default_audio_sample_t meter;
@@ -1232,7 +1232,7 @@ bool JackDriver::getInputMeters(int card,int port,short levels[2])
} }
bool JackDriver::getOutputMeters(int card,int port,short levels[2]) bool DriverJack::getOutputMeters(int card,int port,short levels[2])
{ {
#ifdef JACK #ifdef JACK
jack_default_audio_sample_t meter; jack_default_audio_sample_t meter;
@@ -1259,7 +1259,7 @@ bool JackDriver::getOutputMeters(int card,int port,short levels[2])
} }
bool JackDriver::getStreamOutputMeters(int card,int stream,short levels[2]) bool DriverJack::getStreamOutputMeters(int card,int stream,short levels[2])
{ {
#ifdef JACK #ifdef JACK
jack_default_audio_sample_t meter; jack_default_audio_sample_t meter;
@@ -1286,7 +1286,7 @@ bool JackDriver::getStreamOutputMeters(int card,int stream,short levels[2])
} }
bool JackDriver::setPassthroughLevel(int card,int in_port,int out_port, bool DriverJack::setPassthroughLevel(int card,int in_port,int out_port,
int level) int level)
{ {
#ifdef JACK #ifdef JACK
@@ -1310,7 +1310,7 @@ bool JackDriver::setPassthroughLevel(int card,int in_port,int out_port,
} }
void JackDriver::getOutputPosition(int card,unsigned *pos) void DriverJack::getOutputPosition(int card,unsigned *pos)
{ {
#ifdef JACK #ifdef JACK
for(int i=0;i<RD_MAX_STREAMS;i++) { for(int i=0;i<RD_MAX_STREAMS;i++) {
@@ -1326,7 +1326,7 @@ void JackDriver::getOutputPosition(int card,unsigned *pos)
} }
void JackDriver::processBuffers() void DriverJack::processBuffers()
{ {
#ifdef JACK #ifdef JACK
for(int i=0;i<RD_MAX_STREAMS;i++) { for(int i=0;i<RD_MAX_STREAMS;i++) {
@@ -1348,7 +1348,7 @@ void JackDriver::processBuffers()
} }
void JackDriver::stopTimerData(int stream) void DriverJack::stopTimerData(int stream)
{ {
#ifdef JACK #ifdef JACK
stopPlayback(jack_card,stream); stopPlayback(jack_card,stream);
@@ -1357,7 +1357,7 @@ void JackDriver::stopTimerData(int stream)
} }
void JackDriver::fadeTimerData(int stream) void DriverJack::fadeTimerData(int stream)
{ {
#ifdef JACK #ifdef JACK
int level; int level;
@@ -1382,7 +1382,7 @@ void JackDriver::fadeTimerData(int stream)
} }
void JackDriver::recordTimerData(int stream) void DriverJack::recordTimerData(int stream)
{ {
#ifdef JACK #ifdef JACK
stopRecord(jack_card,stream); stopRecord(jack_card,stream);
@@ -1391,7 +1391,7 @@ void JackDriver::recordTimerData(int stream)
} }
void JackDriver::clientStartData() void DriverJack::clientStartData()
{ {
#ifdef JACK #ifdef JACK
QString sql=QString("select ")+ QString sql=QString("select ")+
@@ -1426,7 +1426,7 @@ void JackDriver::clientStartData()
} }
int JackDriver::GetJackOutputStream() int DriverJack::GetJackOutputStream()
{ {
#ifdef JACK #ifdef JACK
for(int i=0;i<RD_MAX_STREAMS;i++) { for(int i=0;i<RD_MAX_STREAMS;i++) {
@@ -1442,7 +1442,7 @@ int JackDriver::GetJackOutputStream()
} }
void JackDriver::FreeJackOutputStream(int stream) void DriverJack::FreeJackOutputStream(int stream)
{ {
#ifdef JACK #ifdef JACK
if ((stream <0) || (stream >= RD_MAX_STREAMS)){ if ((stream <0) || (stream >= RD_MAX_STREAMS)){
@@ -1460,7 +1460,7 @@ void JackDriver::FreeJackOutputStream(int stream)
} }
void JackDriver::EmptyJackInputStream(int stream,bool done) void DriverJack::EmptyJackInputStream(int stream,bool done)
{ {
#ifdef JACK #ifdef JACK
if ((stream <0) || (stream >= RD_MAX_STREAMS)){ if ((stream <0) || (stream >= RD_MAX_STREAMS)){
@@ -1473,7 +1473,7 @@ void JackDriver::EmptyJackInputStream(int stream,bool done)
} }
#ifdef JACK #ifdef JACK
void JackDriver::WriteJackBuffer(int stream,jack_default_audio_sample_t *buffer, void DriverJack::WriteJackBuffer(int stream,jack_default_audio_sample_t *buffer,
unsigned len,bool done) unsigned len,bool done)
{ {
ssize_t s; ssize_t s;
@@ -1538,7 +1538,7 @@ void JackDriver::WriteJackBuffer(int stream,jack_default_audio_sample_t *buffer,
} }
#endif // JACK #endif // JACK
void JackDriver::FillJackOutputStream(int stream) void DriverJack::FillJackOutputStream(int stream)
{ {
#ifdef JACK #ifdef JACK
int n=0; int n=0;
@@ -1690,7 +1690,7 @@ void JackDriver::FillJackOutputStream(int stream)
} }
void JackDriver::JackClock() void DriverJack::JackClock()
{ {
#ifdef JACK #ifdef JACK
for(int i=0;i<RD_MAX_STREAMS;i++) { for(int i=0;i<RD_MAX_STREAMS;i++) {
@@ -1712,7 +1712,7 @@ void JackDriver::JackClock()
} }
void JackDriver::JackSessionSetup() void DriverJack::JackSessionSetup()
{ {
#ifdef JACK #ifdef JACK
int count=0; int count=0;

View File

@@ -1,4 +1,4 @@
// jackdriver.h // driver_jack.h
// //
// caed(8) driver for Advanced Linux Audio Architecture devices // caed(8) driver for Advanced Linux Audio Architecture devices
// //
@@ -18,8 +18,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
#ifndef JACKDRIVER_H #ifndef DRIVER_JACK_H
#define JACKDRIVER_H #define DRIVER_JACK_H
#include <QProcess> #include <QProcess>
@@ -29,18 +29,18 @@
#include <rdmeteraverage.h> #include <rdmeteraverage.h>
#include <rdwavefile.h> #include <rdwavefile.h>
#include "caedriver.h" #include "driver.h"
#ifdef JACK #ifdef JACK
#include <jack/jack.h> #include <jack/jack.h>
#endif // JACK #endif // JACK
class JackDriver : public CaeDriver class DriverJack : public Driver
{ {
Q_OBJECT Q_OBJECT
public: public:
JackDriver(QObject *parent=0); DriverJack(QObject *parent=0);
~JackDriver(); ~DriverJack();
QString version() const; QString version() const;
bool initialize(unsigned *next_cardnum); bool initialize(unsigned *next_cardnum);
bool loadPlayback(int card,QString wavename,int *stream); bool loadPlayback(int card,QString wavename,int *stream);
@@ -124,4 +124,4 @@ class JackDriver : public CaeDriver
}; };
#endif // JACKDRIVER_H #endif // DRIVER_JACK_H