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

* Fixed a bug that broke the build with ALSA support disabled.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2021-08-20 11:26:44 -04:00
parent a5625544e4
commit 62b7ef3777
3 changed files with 11 additions and 5 deletions

View File

@ -22318,3 +22318,5 @@
* Renamed audio driver components in caed(8).
2021-08-20 Fred Gleason <fredg@paravelsystems.com>
* Removed vestigal JACK dependencies from the core caed(8) code.
2021-08-20 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug that broke the build with ALSA support disabled.

View File

@ -1629,7 +1629,7 @@ void MainObject::MakeDriver(unsigned *next_card,RDStation::AudioDriver type)
dvr=new DriverHpi(this);
rda->station()->setDriverVersion(RDStation::Hpi,"v"+dvr->version());
#else
rda->station()->setDriverVersion(RDStation::Hpi,"[not enabled]");
rda->station()->setDriverVersion(RDStation::Hpi,"not enabled");
#endif // HPI
break;
@ -1638,7 +1638,7 @@ void MainObject::MakeDriver(unsigned *next_card,RDStation::AudioDriver type)
dvr=new DriverAlsa(this);
rda->station()->setDriverVersion(RDStation::Alsa,"v"+dvr->version());
#else
rda->station()->setDriverVersion(RDStation::Alsa,"[not enabled]");
rda->station()->setDriverVersion(RDStation::Alsa,"not enabled");
#endif // ALSA
break;
@ -1647,7 +1647,7 @@ void MainObject::MakeDriver(unsigned *next_card,RDStation::AudioDriver type)
dvr=new DriverJack(this);
rda->station()->setDriverVersion(RDStation::Jack,"v"+dvr->version());
#else
rda->station()->setDriverVersion(RDStation::Jack,"[not enabled]");
rda->station()->setDriverVersion(RDStation::Jack,"not enabled");
#endif // JACK
break;

View File

@ -660,6 +660,7 @@ QString DriverAlsa::version() const
bool DriverAlsa::initialize(unsigned *next_cardnum)
{
#ifdef ALSA
QString dev;
snd_pcm_t *pcm_play_handle;
snd_pcm_t *pcm_capture_handle;
@ -723,6 +724,9 @@ bool DriverAlsa::initialize(unsigned *next_cardnum)
(*next_cardnum)++;
}
return card>0;
#else
return false;
#endif // ALSA
}
@ -1904,9 +1908,9 @@ void DriverAlsa::FillAlsaOutputStream(int card,int stream)
#endif // ALSA
#ifdef ALSA
void DriverAlsa::AlsaClock()
{
#ifdef ALSA
for(int i=0;i<RD_MAX_CARDS;i++) {
if(hasCard(i)) {
for(int j=0;j<RD_MAX_STREAMS;j++) {
@ -1927,5 +1931,5 @@ void DriverAlsa::AlsaClock()
}
}
}
#endif // ALSA
}
#endif // ALSA