mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-10 16:43:35 +02:00
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:
@@ -29,19 +29,19 @@ moc_%.cpp: %.h
|
||||
|
||||
sbin_PROGRAMS = caed
|
||||
|
||||
dist_caed_SOURCES = alsadriver.cpp alsadriver.h\
|
||||
cae.cpp cae.h\
|
||||
dist_caed_SOURCES = cae.cpp cae.h\
|
||||
cae_server.cpp cae_server.h\
|
||||
caedriver.cpp caedriver.h\
|
||||
hpidriver.cpp hpidriver.h\
|
||||
jackdriver.cpp jackdriver.h
|
||||
driver.cpp driver.h\
|
||||
driver_alsa.cpp driver_alsa.h\
|
||||
driver_hpi.cpp driver_hpi.h\
|
||||
driver_jack.cpp driver_jack.h
|
||||
|
||||
nodist_caed_SOURCES = moc_alsadriver.cpp\
|
||||
moc_cae.cpp\
|
||||
nodist_caed_SOURCES = moc_cae.cpp\
|
||||
moc_cae_server.cpp\
|
||||
moc_caedriver.cpp\
|
||||
moc_hpidriver.cpp\
|
||||
moc_jackdriver.cpp
|
||||
moc_driver.cpp\
|
||||
moc_driver_alsa.cpp\
|
||||
moc_driver_hpi.cpp\
|
||||
moc_driver_jack.cpp
|
||||
|
||||
caed_LDADD = @LIB_RDLIBS@\
|
||||
@LIBALSA@\
|
||||
|
66
cae/cae.cpp
66
cae/cae.cpp
@@ -45,10 +45,10 @@
|
||||
#include <rdsvc.h>
|
||||
#include <rdsystem.h>
|
||||
|
||||
#include "alsadriver.h"
|
||||
#include "cae.h"
|
||||
#include "hpidriver.h"
|
||||
#include "jackdriver.h"
|
||||
#include "driver_alsa.h"
|
||||
#include "driver_hpi.h"
|
||||
#include "driver_jack.h"
|
||||
|
||||
volatile bool exiting=false;
|
||||
#ifdef JACK
|
||||
@@ -341,7 +341,7 @@ void MainObject::loadPlaybackData(int id,unsigned card,const QString &name)
|
||||
QString wavename;
|
||||
int new_stream=-1;
|
||||
int handle;
|
||||
CaeDriver *dvr=GetDriver(card);
|
||||
Driver *dvr=GetDriver(card);
|
||||
|
||||
if(dvr==NULL) {
|
||||
cae_server->
|
||||
@@ -385,7 +385,7 @@ void MainObject::unloadPlaybackData(int id,unsigned handle)
|
||||
{
|
||||
int card=play_handle[handle].card;
|
||||
int stream=play_handle[handle].stream;
|
||||
CaeDriver *dvr=GetDriver(card);
|
||||
Driver *dvr=GetDriver(card);
|
||||
|
||||
if(dvr==NULL) {
|
||||
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 stream=play_handle[handle].stream;
|
||||
CaeDriver *dvr=GetDriver(card);
|
||||
Driver *dvr=GetDriver(card);
|
||||
|
||||
if(dvr==NULL) {
|
||||
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 stream=play_handle[handle].stream;
|
||||
CaeDriver *dvr=GetDriver(card);
|
||||
Driver *dvr=GetDriver(card);
|
||||
|
||||
if(dvr==NULL) {
|
||||
cae_server->
|
||||
@@ -494,7 +494,7 @@ void MainObject::stopPlaybackData(int id,unsigned handle)
|
||||
{
|
||||
int card=play_handle[handle].card;
|
||||
int stream=play_handle[handle].stream;
|
||||
CaeDriver *dvr=GetDriver(card);
|
||||
Driver *dvr=GetDriver(card);
|
||||
|
||||
if(dvr==NULL) {
|
||||
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)
|
||||
{
|
||||
bool state=false;
|
||||
CaeDriver *dvr=GetDriver(card);
|
||||
Driver *dvr=GetDriver(card);
|
||||
|
||||
if(dvr==NULL) {
|
||||
return;
|
||||
@@ -538,7 +538,7 @@ void MainObject::loadRecordingData(int id,unsigned card,unsigned port,
|
||||
const QString &name)
|
||||
{
|
||||
QString wavename;
|
||||
CaeDriver *dvr=GetDriver(card);
|
||||
Driver *dvr=GetDriver(card);
|
||||
|
||||
if(dvr==NULL) {
|
||||
cae_server->
|
||||
@@ -579,7 +579,7 @@ void MainObject::loadRecordingData(int id,unsigned card,unsigned port,
|
||||
|
||||
void MainObject::unloadRecordingData(int id,unsigned card,unsigned stream)
|
||||
{
|
||||
CaeDriver *dvr=GetDriver(card);
|
||||
Driver *dvr=GetDriver(card);
|
||||
|
||||
if(dvr==NULL) {
|
||||
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,
|
||||
int threshold_level)
|
||||
{
|
||||
CaeDriver *dvr=GetDriver(card);
|
||||
Driver *dvr=GetDriver(card);
|
||||
|
||||
if(dvr==NULL) {
|
||||
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)
|
||||
{
|
||||
CaeDriver *dvr=GetDriver(card);
|
||||
Driver *dvr=GetDriver(card);
|
||||
|
||||
if(dvr==NULL) {
|
||||
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,
|
||||
int level)
|
||||
{
|
||||
CaeDriver *dvr=GetDriver(card);
|
||||
Driver *dvr=GetDriver(card);
|
||||
|
||||
if(dvr==NULL) {
|
||||
cae_server->
|
||||
@@ -686,7 +686,7 @@ void MainObject::setInputVolumeData(int id,unsigned card,unsigned stream,
|
||||
void MainObject::setOutputVolumeData(int id,unsigned card,unsigned stream,
|
||||
unsigned port,int level)
|
||||
{
|
||||
CaeDriver *dvr=GetDriver(card);
|
||||
Driver *dvr=GetDriver(card);
|
||||
|
||||
if(dvr==NULL) {
|
||||
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,
|
||||
unsigned port,int level,unsigned length)
|
||||
{
|
||||
CaeDriver *dvr=GetDriver(card);
|
||||
Driver *dvr=GetDriver(card);
|
||||
|
||||
if(dvr==NULL) {
|
||||
cae_server->
|
||||
@@ -739,7 +739,7 @@ void MainObject::fadeOutputVolumeData(int id,unsigned card,unsigned stream,
|
||||
void MainObject::setInputLevelData(int id,unsigned card,unsigned port,
|
||||
int level)
|
||||
{
|
||||
CaeDriver *dvr=GetDriver(card);
|
||||
Driver *dvr=GetDriver(card);
|
||||
|
||||
if(dvr==NULL) {
|
||||
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,
|
||||
int level)
|
||||
{
|
||||
CaeDriver *dvr=GetDriver(card);
|
||||
Driver *dvr=GetDriver(card);
|
||||
|
||||
if(dvr==NULL) {
|
||||
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,
|
||||
unsigned mode)
|
||||
{
|
||||
CaeDriver *dvr=GetDriver(card);
|
||||
Driver *dvr=GetDriver(card);
|
||||
|
||||
if(dvr==NULL) {
|
||||
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,
|
||||
unsigned mode)
|
||||
{
|
||||
CaeDriver *dvr=GetDriver(card);
|
||||
Driver *dvr=GetDriver(card);
|
||||
|
||||
if(dvr==NULL) {
|
||||
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,
|
||||
int level)
|
||||
{
|
||||
CaeDriver *dvr=GetDriver(card);
|
||||
Driver *dvr=GetDriver(card);
|
||||
|
||||
if(dvr==NULL) {
|
||||
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,
|
||||
unsigned type)
|
||||
{
|
||||
CaeDriver *dvr=GetDriver(card);
|
||||
Driver *dvr=GetDriver(card);
|
||||
|
||||
if(dvr==NULL) {
|
||||
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)
|
||||
{
|
||||
CaeDriver *dvr=GetDriver(card);
|
||||
Driver *dvr=GetDriver(card);
|
||||
|
||||
if(dvr==NULL) {
|
||||
return;
|
||||
@@ -909,7 +909,7 @@ void MainObject::setAudioPassthroughLevelData(int id,unsigned card,
|
||||
unsigned input,unsigned output,
|
||||
int level)
|
||||
{
|
||||
CaeDriver *dvr=GetDriver(card);
|
||||
Driver *dvr=GetDriver(card);
|
||||
|
||||
if(dvr==NULL) {
|
||||
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));
|
||||
return;
|
||||
}
|
||||
CaeDriver *dvr=GetDriver(card);
|
||||
Driver *dvr=GetDriver(card);
|
||||
|
||||
if(dvr==NULL) {
|
||||
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++) {
|
||||
CaeDriver *dvr=GetDriver(i);
|
||||
Driver *dvr=GetDriver(i);
|
||||
if(dvr!=NULL) {
|
||||
for(int j=0;j<RD_MAX_PORTS;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++) {
|
||||
RDAudioPort *port=new RDAudioPort(rda->config()->stationName(),i);
|
||||
CaeDriver *dvr=GetDriver(i);
|
||||
Driver *dvr=GetDriver(i);
|
||||
|
||||
if(dvr!=NULL) {
|
||||
dvr->setClockSource(i,port->clockSource());
|
||||
@@ -1221,7 +1221,7 @@ void MainObject::InitMixers()
|
||||
void MainObject::KillSocket(int ch)
|
||||
{
|
||||
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++) {
|
||||
if(record_owner[i][j]==ch) {
|
||||
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++) {
|
||||
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)
|
||||
{
|
||||
CaeDriver *dvr=NULL;
|
||||
Driver *dvr=NULL;
|
||||
|
||||
switch(type) {
|
||||
case RDStation::Hpi:
|
||||
#ifdef HPI
|
||||
dvr=new HpiDriver(this);
|
||||
dvr=new DriverHpi(this);
|
||||
rda->station()->setDriverVersion(RDStation::Hpi,"v"+dvr->version());
|
||||
#else
|
||||
rda->station()->setDriverVersion(RDStation::Hpi,"[not enabled]");
|
||||
@@ -1650,7 +1650,7 @@ void MainObject::MakeDriver(unsigned *next_card,RDStation::AudioDriver type)
|
||||
|
||||
case RDStation::Alsa:
|
||||
#ifdef ALSA
|
||||
dvr=new AlsaDriver(this);
|
||||
dvr=new DriverAlsa(this);
|
||||
rda->station()->setDriverVersion(RDStation::Alsa,"v"+dvr->version());
|
||||
#else
|
||||
rda->station()->setDriverVersion(RDStation::Alsa,"[not enabled]");
|
||||
@@ -1659,7 +1659,7 @@ void MainObject::MakeDriver(unsigned *next_card,RDStation::AudioDriver type)
|
||||
|
||||
case RDStation::Jack:
|
||||
#ifdef JACK
|
||||
dvr=new JackDriver(this);
|
||||
dvr=new DriverJack(this);
|
||||
rda->station()->setDriverVersion(RDStation::Jack,"v"+dvr->version());
|
||||
#else
|
||||
rda->station()->setDriverVersion(RDStation::Jack,"[not enabled]");
|
||||
|
@@ -49,7 +49,7 @@
|
||||
#include <rdconfig.h>
|
||||
#include <rdstation.h>
|
||||
|
||||
#include "caedriver.h"
|
||||
#include "driver.h"
|
||||
#include "cae_server.h"
|
||||
|
||||
#ifndef HAVE_SRC_CONV
|
||||
@@ -136,9 +136,9 @@ class MainObject : public QObject
|
||||
void SendMeterOutputStatusUpdate();
|
||||
void SendMeterOutputStatusUpdate(int card,int port,int stream);
|
||||
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);
|
||||
QList<CaeDriver *> d_drivers;
|
||||
QList<Driver *> d_drivers;
|
||||
bool debug;
|
||||
unsigned system_sample_rate;
|
||||
CaeServer *cae_server;
|
||||
|
@@ -20,9 +20,9 @@
|
||||
|
||||
#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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
bool CaeDriver::hasCard(int cardnum) const
|
||||
bool Driver::hasCard(int cardnum) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
void CaeDriver::stateRecordUpdate(int card,int stream,int state)
|
||||
void Driver::stateRecordUpdate(int card,int stream,int state)
|
||||
{
|
||||
emit recordStateChanged(card,stream,state);
|
||||
}
|
||||
|
||||
|
||||
void CaeDriver::addCard(unsigned cardnum)
|
||||
void Driver::addCard(unsigned cardnum)
|
||||
{
|
||||
if(d_cards.contains(cardnum)) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
bool CaeDriver::LoadTwoLame()
|
||||
bool Driver::LoadTwoLame()
|
||||
{
|
||||
#ifdef HAVE_TWOLAME
|
||||
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)
|
||||
{
|
||||
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
|
||||
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
|
||||
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) {
|
||||
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
|
||||
if(mad_active[card][stream]) {
|
@@ -1,4 +1,4 @@
|
||||
// caedriver.h
|
||||
// driver.h
|
||||
//
|
||||
// Abstract base class for caed(8) audio driver implementations.
|
||||
//
|
||||
@@ -18,8 +18,8 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#ifndef CAEDRIVER_H
|
||||
#define CAEDRIVER_H
|
||||
#ifndef DRIVER_H
|
||||
#define DRIVER_H
|
||||
|
||||
#ifdef HAVE_TWOLAME
|
||||
#include <twolame.h>
|
||||
@@ -39,11 +39,11 @@
|
||||
|
||||
extern void SigHandler(int signum);
|
||||
|
||||
class CaeDriver : public QObject
|
||||
class Driver : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CaeDriver(RDStation::AudioDriver type,QObject *parent=0);
|
||||
Driver(RDStation::AudioDriver type,QObject *parent=0);
|
||||
RDStation::AudioDriver driverType() const;
|
||||
bool hasCard(int cardnum) const;
|
||||
virtual QString version() const=0;
|
||||
@@ -155,4 +155,4 @@ class CaeDriver : public QObject
|
||||
};
|
||||
|
||||
|
||||
#endif // CAEDRIVER_H
|
||||
#endif // DRIVER_H
|
@@ -1,4 +1,4 @@
|
||||
// alsadriver.cpp
|
||||
// driver_alsa.cpp
|
||||
//
|
||||
// caed(8) driver for Advanced Linux Audio Architecture devices
|
||||
//
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <rdmeteraverage.h>
|
||||
#include <rdringbuffer.h>
|
||||
|
||||
#include "alsadriver.h"
|
||||
#include "driver_alsa.h"
|
||||
|
||||
#ifdef ALSA
|
||||
//
|
||||
@@ -526,7 +526,7 @@ void *AlsaPlayCallback(void *ptr)
|
||||
}
|
||||
|
||||
|
||||
void AlsaDriver::AlsaInitCallback()
|
||||
void DriverAlsa::AlsaInitCallback()
|
||||
{
|
||||
int avg_periods=
|
||||
(330*systemSampleRate())/(1000*rda->config()->alsaPeriodSize());
|
||||
@@ -562,8 +562,8 @@ void AlsaDriver::AlsaInitCallback()
|
||||
#endif // ALSA
|
||||
|
||||
|
||||
AlsaDriver::AlsaDriver(QObject *parent)
|
||||
: CaeDriver(RDStation::Alsa,parent)
|
||||
DriverAlsa::DriverAlsa(QObject *parent)
|
||||
: Driver(RDStation::Alsa,parent)
|
||||
{
|
||||
#ifdef ALSA
|
||||
//
|
||||
@@ -628,7 +628,7 @@ AlsaDriver::AlsaDriver(QObject *parent)
|
||||
}
|
||||
|
||||
|
||||
AlsaDriver::~AlsaDriver()
|
||||
DriverAlsa::~DriverAlsa()
|
||||
{
|
||||
#ifdef ALSA
|
||||
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
|
||||
return
|
||||
@@ -658,7 +658,7 @@ QString AlsaDriver::version() const
|
||||
}
|
||||
|
||||
|
||||
bool AlsaDriver::initialize(unsigned *next_cardnum)
|
||||
bool DriverAlsa::initialize(unsigned *next_cardnum)
|
||||
{
|
||||
QString dev;
|
||||
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
|
||||
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
|
||||
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
|
||||
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)
|
||||
{
|
||||
#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
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
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)
|
||||
{
|
||||
#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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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)
|
||||
{
|
||||
#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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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)
|
||||
{
|
||||
#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
|
||||
#ifdef ALSA
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
int card=cardport/RD_MAX_PORTS;
|
||||
@@ -1387,7 +1387,7 @@ void AlsaDriver::recordTimerData(int cardport)
|
||||
|
||||
|
||||
#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_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_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++) {
|
||||
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];
|
||||
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]->
|
||||
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;
|
||||
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 frame_offset=0;
|
||||
@@ -1904,7 +1904,7 @@ void AlsaDriver::FillAlsaOutputStream(int card,int stream)
|
||||
#endif // ALSA
|
||||
|
||||
|
||||
void AlsaDriver::AlsaClock()
|
||||
void DriverAlsa::AlsaClock()
|
||||
{
|
||||
#ifdef ALSA
|
||||
for(int i=0;i<RD_MAX_CARDS;i++) {
|
@@ -1,4 +1,4 @@
|
||||
// alsadriver.h
|
||||
// driver_alsa.h
|
||||
//
|
||||
// caed(8) driver for Advanced Linux Audio Architecture devices
|
||||
//
|
||||
@@ -18,13 +18,13 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#ifndef ALSADRIVER_H
|
||||
#define ALSADRIVER_H
|
||||
#ifndef DRIVER_ALSA_H
|
||||
#define DRIVER_ALSA_H
|
||||
|
||||
#include <rdconfig.h>
|
||||
#include <rdwavefile.h>
|
||||
|
||||
#include "caedriver.h"
|
||||
#include "driver.h"
|
||||
|
||||
#ifdef ALSA
|
||||
#include <alsa/asoundlib.h>
|
||||
@@ -45,12 +45,12 @@ struct alsa_format {
|
||||
};
|
||||
#endif // ALSA
|
||||
|
||||
class AlsaDriver : public CaeDriver
|
||||
class DriverAlsa : public Driver
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AlsaDriver(QObject *parent=0);
|
||||
~AlsaDriver();
|
||||
DriverAlsa(QObject *parent=0);
|
||||
~DriverAlsa();
|
||||
QString version() const;
|
||||
bool initialize(unsigned *next_cardnum);
|
||||
bool loadPlayback(int card,QString wavename,int *stream);
|
||||
@@ -125,4 +125,4 @@ class AlsaDriver : public CaeDriver
|
||||
};
|
||||
|
||||
|
||||
#endif // ALSADRIVER_H
|
||||
#endif // DRIVER_ALSA_H
|
@@ -1,4 +1,4 @@
|
||||
// hpidriver.cpp
|
||||
// driver_hpi.cpp
|
||||
//
|
||||
// caed(8) driver for AudioScience HPI audio devices.
|
||||
//
|
||||
@@ -19,10 +19,10 @@
|
||||
//
|
||||
|
||||
#include <rdconf.h>
|
||||
#include "hpidriver.h"
|
||||
#include "driver_hpi.h"
|
||||
|
||||
HpiDriver::HpiDriver(QObject *parent)
|
||||
: CaeDriver(RDStation::Hpi,parent)
|
||||
DriverHpi::DriverHpi(QObject *parent)
|
||||
: Driver(RDStation::Hpi,parent)
|
||||
{
|
||||
#ifdef HPI
|
||||
for(int i=0;i<RD_MAX_CARDS;i++) {
|
||||
@@ -36,7 +36,7 @@ HpiDriver::HpiDriver(QObject *parent)
|
||||
}
|
||||
|
||||
|
||||
HpiDriver::~HpiDriver()
|
||||
DriverHpi::~DriverHpi()
|
||||
{
|
||||
#ifdef HPI
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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)
|
||||
{
|
||||
#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
|
||||
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
|
||||
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)
|
||||
{
|
||||
#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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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)
|
||||
{
|
||||
#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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
for(int i=0;i<RD_MAX_STREAMS;i++) {
|
@@ -1,4 +1,4 @@
|
||||
// hpidriver.h
|
||||
// driver_hpi.h
|
||||
//
|
||||
// caed(8) driver for AudioScience HPI audio devices.
|
||||
//
|
||||
@@ -18,12 +18,12 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#ifndef HPIDRIVER_H
|
||||
#define HPIDRIVER_H
|
||||
#ifndef DRIVER_HPI_H
|
||||
#define DRIVER_HPI_H
|
||||
|
||||
#include <rdconfig.h>
|
||||
|
||||
#include "caedriver.h"
|
||||
#include "driver.h"
|
||||
|
||||
#ifdef HPI
|
||||
#include <rdhpisoundcard.h>
|
||||
@@ -31,12 +31,12 @@
|
||||
#include <rdhpirecordstream.h>
|
||||
#endif // HPI
|
||||
|
||||
class HpiDriver : public CaeDriver
|
||||
class DriverHpi : public Driver
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
HpiDriver(QObject *parent=0);
|
||||
~HpiDriver();
|
||||
DriverHpi(QObject *parent=0);
|
||||
~DriverHpi();
|
||||
QString version() const;
|
||||
bool initialize(unsigned *next_cardnum);
|
||||
void updateMeters();
|
||||
@@ -80,4 +80,4 @@ class HpiDriver : public CaeDriver
|
||||
};
|
||||
|
||||
|
||||
#endif // HPIDRIVER_H
|
||||
#endif // DRIVER_HPI_H
|
@@ -1,4 +1,4 @@
|
||||
// jackdriver.cpp
|
||||
// driver_jack.cpp
|
||||
//
|
||||
// caed(8) driver for Advanced Linux Audio Architecture devices
|
||||
//
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <rdescape_string.h>
|
||||
#include <rdprofile.h>
|
||||
|
||||
#include "jackdriver.h"
|
||||
#include "driver_jack.h"
|
||||
|
||||
#ifdef JACK
|
||||
#endif // JACK
|
||||
@@ -382,8 +382,8 @@ void JackInitCallback()
|
||||
|
||||
|
||||
|
||||
JackDriver::JackDriver(QObject *parent)
|
||||
: CaeDriver(RDStation::Jack,parent)
|
||||
DriverJack::DriverJack(QObject *parent)
|
||||
: Driver(RDStation::Jack,parent)
|
||||
{
|
||||
#ifdef JACK
|
||||
jack_connected=false;
|
||||
@@ -410,7 +410,7 @@ JackDriver::JackDriver(QObject *parent)
|
||||
}
|
||||
|
||||
|
||||
JackDriver::~JackDriver()
|
||||
DriverJack::~DriverJack()
|
||||
{
|
||||
#ifdef JACK
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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)
|
||||
{
|
||||
#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
|
||||
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
|
||||
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)
|
||||
{
|
||||
#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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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)
|
||||
{
|
||||
#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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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)
|
||||
{
|
||||
#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
|
||||
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
|
||||
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
|
||||
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
|
||||
int level;
|
||||
@@ -1382,7 +1382,7 @@ void JackDriver::fadeTimerData(int stream)
|
||||
}
|
||||
|
||||
|
||||
void JackDriver::recordTimerData(int stream)
|
||||
void DriverJack::recordTimerData(int stream)
|
||||
{
|
||||
#ifdef JACK
|
||||
stopRecord(jack_card,stream);
|
||||
@@ -1391,7 +1391,7 @@ void JackDriver::recordTimerData(int stream)
|
||||
}
|
||||
|
||||
|
||||
void JackDriver::clientStartData()
|
||||
void DriverJack::clientStartData()
|
||||
{
|
||||
#ifdef JACK
|
||||
QString sql=QString("select ")+
|
||||
@@ -1426,7 +1426,7 @@ void JackDriver::clientStartData()
|
||||
}
|
||||
|
||||
|
||||
int JackDriver::GetJackOutputStream()
|
||||
int DriverJack::GetJackOutputStream()
|
||||
{
|
||||
#ifdef JACK
|
||||
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
|
||||
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
|
||||
if ((stream <0) || (stream >= RD_MAX_STREAMS)){
|
||||
@@ -1473,7 +1473,7 @@ void JackDriver::EmptyJackInputStream(int stream,bool done)
|
||||
}
|
||||
|
||||
#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)
|
||||
{
|
||||
ssize_t s;
|
||||
@@ -1538,7 +1538,7 @@ void JackDriver::WriteJackBuffer(int stream,jack_default_audio_sample_t *buffer,
|
||||
}
|
||||
#endif // JACK
|
||||
|
||||
void JackDriver::FillJackOutputStream(int stream)
|
||||
void DriverJack::FillJackOutputStream(int stream)
|
||||
{
|
||||
#ifdef JACK
|
||||
int n=0;
|
||||
@@ -1690,7 +1690,7 @@ void JackDriver::FillJackOutputStream(int stream)
|
||||
}
|
||||
|
||||
|
||||
void JackDriver::JackClock()
|
||||
void DriverJack::JackClock()
|
||||
{
|
||||
#ifdef JACK
|
||||
for(int i=0;i<RD_MAX_STREAMS;i++) {
|
||||
@@ -1712,7 +1712,7 @@ void JackDriver::JackClock()
|
||||
}
|
||||
|
||||
|
||||
void JackDriver::JackSessionSetup()
|
||||
void DriverJack::JackSessionSetup()
|
||||
{
|
||||
#ifdef JACK
|
||||
int count=0;
|
@@ -1,4 +1,4 @@
|
||||
// jackdriver.h
|
||||
// driver_jack.h
|
||||
//
|
||||
// caed(8) driver for Advanced Linux Audio Architecture devices
|
||||
//
|
||||
@@ -18,8 +18,8 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#ifndef JACKDRIVER_H
|
||||
#define JACKDRIVER_H
|
||||
#ifndef DRIVER_JACK_H
|
||||
#define DRIVER_JACK_H
|
||||
|
||||
#include <QProcess>
|
||||
|
||||
@@ -29,18 +29,18 @@
|
||||
#include <rdmeteraverage.h>
|
||||
#include <rdwavefile.h>
|
||||
|
||||
#include "caedriver.h"
|
||||
#include "driver.h"
|
||||
|
||||
#ifdef JACK
|
||||
#include <jack/jack.h>
|
||||
#endif // JACK
|
||||
|
||||
class JackDriver : public CaeDriver
|
||||
class DriverJack : public Driver
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
JackDriver(QObject *parent=0);
|
||||
~JackDriver();
|
||||
DriverJack(QObject *parent=0);
|
||||
~DriverJack();
|
||||
QString version() const;
|
||||
bool initialize(unsigned *next_cardnum);
|
||||
bool loadPlayback(int card,QString wavename,int *stream);
|
||||
@@ -124,4 +124,4 @@ class JackDriver : public CaeDriver
|
||||
};
|
||||
|
||||
|
||||
#endif // JACKDRIVER_H
|
||||
#endif // DRIVER_JACK_H
|
Reference in New Issue
Block a user