mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-09-17 08:50:24 +02:00
2019-06-10 Fred Gleason <fredg@paravelsystems.com>
* Removed the 'Channels=' directive from the '[Format]' section of rd.conf(5).
This commit is contained in:
parent
a7f6cf49cd
commit
75077f5145
@ -18753,3 +18753,6 @@
|
|||||||
* Fixed a bug in caed(8) that caused the 'Unload Playback' ['UP']
|
* Fixed a bug in caed(8) that caused the 'Unload Playback' ['UP']
|
||||||
command to be ignored when the 'handle' argument was greater
|
command to be ignored when the 'handle' argument was greater
|
||||||
than 23.
|
than 23.
|
||||||
|
2019-06-10 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Removed the 'Channels=' directive from the '[Format]' section
|
||||||
|
of rd.conf(5).
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// The ALSA Driver for the Core Audio Engine component of Rivendell
|
// The ALSA Driver for the Core Audio Engine component of Rivendell
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2015 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// This program is free software; you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License version 2 as
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -54,20 +54,16 @@ volatile bool alsa_eof[RD_MAX_CARDS][RD_MAX_STREAMS];
|
|||||||
volatile int alsa_output_pos[RD_MAX_CARDS][RD_MAX_STREAMS];
|
volatile int alsa_output_pos[RD_MAX_CARDS][RD_MAX_STREAMS];
|
||||||
volatile bool alsa_recording[RD_MAX_CARDS][RD_MAX_PORTS];
|
volatile bool alsa_recording[RD_MAX_CARDS][RD_MAX_PORTS];
|
||||||
volatile bool alsa_ready[RD_MAX_CARDS][RD_MAX_PORTS];
|
volatile bool alsa_ready[RD_MAX_CARDS][RD_MAX_PORTS];
|
||||||
volatile int alsa_channels;
|
|
||||||
|
|
||||||
|
void *AlsaCaptureCallback(void *ptr)
|
||||||
void AlsaCapture1Callback(struct alsa_format *alsa_format)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void AlsaCapture2Callback(struct alsa_format *alsa_format)
|
|
||||||
{
|
{
|
||||||
char alsa_buffer[RINGBUFFER_SIZE];
|
char alsa_buffer[RINGBUFFER_SIZE];
|
||||||
int modulo;
|
int modulo;
|
||||||
int16_t in_meter[RD_MAX_PORTS][2];
|
int16_t in_meter[RD_MAX_PORTS][2];
|
||||||
|
struct alsa_format *alsa_format=(struct alsa_format *)ptr;
|
||||||
|
|
||||||
|
signal(SIGTERM,SigHandler);
|
||||||
|
signal(SIGINT,SigHandler);
|
||||||
|
|
||||||
while(!alsa_format->exiting) {
|
while(!alsa_format->exiting) {
|
||||||
int s=snd_pcm_readi(alsa_format->pcm,alsa_format->card_buffer,
|
int s=snd_pcm_readi(alsa_format->pcm,alsa_format->card_buffer,
|
||||||
@ -243,35 +239,12 @@ void AlsaCapture2Callback(struct alsa_format *alsa_format)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void *AlsaCaptureCallback(void *ptr)
|
|
||||||
{
|
|
||||||
struct alsa_format *alsa_format=(struct alsa_format *)ptr;
|
|
||||||
|
|
||||||
signal(SIGTERM,SigHandler);
|
|
||||||
signal(SIGINT,SigHandler);
|
|
||||||
|
|
||||||
switch(alsa_channels) {
|
|
||||||
case 1:
|
|
||||||
AlsaCapture1Callback(alsa_format);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
AlsaCapture2Callback(alsa_format);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AlsaPlay1Callback(struct alsa_format *alsa_format)
|
void *AlsaPlayCallback(void *ptr)
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void AlsaPlay2Callback(struct alsa_format *alsa_format)
|
|
||||||
{
|
{
|
||||||
int n=0;
|
int n=0;
|
||||||
int p;
|
int p;
|
||||||
@ -280,6 +253,11 @@ void AlsaPlay2Callback(struct alsa_format *alsa_format)
|
|||||||
int16_t out_meter[RD_MAX_PORTS][2];
|
int16_t out_meter[RD_MAX_PORTS][2];
|
||||||
int16_t stream_out_meter=0;
|
int16_t stream_out_meter=0;
|
||||||
|
|
||||||
|
struct alsa_format *alsa_format=(struct alsa_format *)ptr;
|
||||||
|
|
||||||
|
signal(SIGTERM,SigHandler);
|
||||||
|
signal(SIGINT,SigHandler);
|
||||||
|
|
||||||
while(!alsa_format->exiting) {
|
while(!alsa_format->exiting) {
|
||||||
memset(alsa_format->card_buffer,0,alsa_format->card_buffer_size);
|
memset(alsa_format->card_buffer,0,alsa_format->card_buffer_size);
|
||||||
|
|
||||||
@ -549,25 +527,7 @@ void AlsaPlay2Callback(struct alsa_format *alsa_format)
|
|||||||
alsa_format->card));
|
alsa_format->card));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void *AlsaPlayCallback(void *ptr)
|
|
||||||
{
|
|
||||||
struct alsa_format *alsa_format=(struct alsa_format *)ptr;
|
|
||||||
|
|
||||||
signal(SIGTERM,SigHandler);
|
|
||||||
signal(SIGINT,SigHandler);
|
|
||||||
|
|
||||||
switch(alsa_channels) {
|
|
||||||
case 1:
|
|
||||||
AlsaPlay1Callback(alsa_format);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
AlsaPlay2Callback(alsa_format);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -692,7 +652,7 @@ void MainObject::alsaInit(RDStation *station)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
alsa_channels=rd_config->channels();
|
// alsa_channels=rd_config->channels();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Stop & Fade Timers
|
// Stop & Fade Timers
|
||||||
@ -779,9 +739,9 @@ void MainObject::alsaInit(RDStation *station)
|
|||||||
}
|
}
|
||||||
station->
|
station->
|
||||||
setCardInputs(i,
|
setCardInputs(i,
|
||||||
alsa_capture_format[i].channels/rd_config->channels());
|
alsa_capture_format[i].channels/RD_DEFAULT_CHANNELS);
|
||||||
station->
|
station->
|
||||||
setCardOutputs(i,alsa_play_format[i].channels/rd_config->channels());
|
setCardOutputs(i,alsa_play_format[i].channels/RD_DEFAULT_CHANNELS);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
i--;
|
i--;
|
||||||
@ -1468,7 +1428,7 @@ bool MainObject::AlsaStartCaptureDevice(QString &dev,int card,snd_pcm_t *pcm)
|
|||||||
// Channels
|
// Channels
|
||||||
//
|
//
|
||||||
if(rd_config->alsaChannelsPerPcm()<0) {
|
if(rd_config->alsaChannelsPerPcm()<0) {
|
||||||
alsa_capture_format[card].channels=rd_config->channels()*RD_MAX_PORTS;
|
alsa_capture_format[card].channels=RD_DEFAULT_CHANNELS*RD_MAX_PORTS;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
alsa_capture_format[card].channels=rd_config->alsaChannelsPerPcm();
|
alsa_capture_format[card].channels=rd_config->alsaChannelsPerPcm();
|
||||||
@ -1625,7 +1585,7 @@ bool MainObject::AlsaStartPlayDevice(QString &dev,int card,snd_pcm_t *pcm)
|
|||||||
// Channels
|
// Channels
|
||||||
//
|
//
|
||||||
if(rd_config->alsaChannelsPerPcm()<0) {
|
if(rd_config->alsaChannelsPerPcm()<0) {
|
||||||
alsa_play_format[card].channels=rd_config->channels()*RD_MAX_PORTS;
|
alsa_play_format[card].channels=RD_DEFAULT_CHANNELS*RD_MAX_PORTS;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
alsa_play_format[card].channels=rd_config->alsaChannelsPerPcm();
|
alsa_play_format[card].channels=rd_config->alsaChannelsPerPcm();
|
||||||
|
@ -145,11 +145,6 @@ RealtimePriority=9
|
|||||||
; when transcoding files.
|
; when transcoding files.
|
||||||
TranscodingDelay=0
|
TranscodingDelay=0
|
||||||
|
|
||||||
[Format]
|
|
||||||
; This value is used when testing and developing new features in the
|
|
||||||
; audio drivers. It should never be altered on a production system.
|
|
||||||
Channels=2
|
|
||||||
|
|
||||||
[Hacks]
|
[Hacks]
|
||||||
; If you are getting no output level meter indications with an older
|
; If you are getting no output level meter indications with an older
|
||||||
; ASI card (such as the ASI4215, ASI4113 or ASI4111), try uncommenting
|
; ASI card (such as the ASI4215, ASI4113 or ASI4111), try uncommenting
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// A container class for a Rivendell Base Configuration
|
// A container class for a Rivendell Base Configuration
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// This program is free software; you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License version 2 as
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -452,12 +452,6 @@ bool RDConfig::lockRdairplayMemory() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unsigned RDConfig::channels() const
|
|
||||||
{
|
|
||||||
return conf_channels;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
uid_t RDConfig::uid() const
|
uid_t RDConfig::uid() const
|
||||||
{
|
{
|
||||||
return conf_uid;
|
return conf_uid;
|
||||||
@ -675,7 +669,6 @@ bool RDConfig::load()
|
|||||||
profile->boolValue("Hacks","DisableMaintChecks",false);
|
profile->boolValue("Hacks","DisableMaintChecks",false);
|
||||||
conf_lock_rdairplay_memory=
|
conf_lock_rdairplay_memory=
|
||||||
profile->boolValue("Hacks","LockRdairplayMemory",false);
|
profile->boolValue("Hacks","LockRdairplayMemory",false);
|
||||||
conf_channels=profile->intValue("Format","Channels",RD_DEFAULT_CHANNELS);
|
|
||||||
if((user=getpwnam(profile->stringValue("Identity","AudioOwner")))!=NULL) {
|
if((user=getpwnam(profile->stringValue("Identity","AudioOwner")))!=NULL) {
|
||||||
conf_uid=user->pw_uid;
|
conf_uid=user->pw_uid;
|
||||||
}
|
}
|
||||||
@ -799,7 +792,6 @@ void RDConfig::clear()
|
|||||||
conf_use_stream_meters=false;
|
conf_use_stream_meters=false;
|
||||||
conf_disable_maint_checks=false;
|
conf_disable_maint_checks=false;
|
||||||
conf_lock_rdairplay_memory=false;
|
conf_lock_rdairplay_memory=false;
|
||||||
conf_channels=RD_DEFAULT_CHANNELS;
|
|
||||||
conf_uid=65535;
|
conf_uid=65535;
|
||||||
conf_gid=65535;
|
conf_gid=65535;
|
||||||
conf_pypad_uid=65535;
|
conf_pypad_uid=65535;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// A container class for a Rivendell Base Configuration
|
// A container class for a Rivendell Base Configuration
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// This program is free software; you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License version 2 as
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -114,7 +114,6 @@ class RDConfig
|
|||||||
bool lockRdairplayMemory() const;
|
bool lockRdairplayMemory() const;
|
||||||
QString caeLogfile() const;
|
QString caeLogfile() const;
|
||||||
bool enableMixerLogging() const;
|
bool enableMixerLogging() const;
|
||||||
unsigned channels() const;
|
|
||||||
uid_t uid() const;
|
uid_t uid() const;
|
||||||
gid_t gid() const;
|
gid_t gid() const;
|
||||||
uid_t pypadUid() const;
|
uid_t pypadUid() const;
|
||||||
@ -187,7 +186,6 @@ class RDConfig
|
|||||||
bool conf_disable_maint_checks;
|
bool conf_disable_maint_checks;
|
||||||
bool conf_lock_rdairplay_memory;
|
bool conf_lock_rdairplay_memory;
|
||||||
std::vector<QString> conf_jack_ports[2];
|
std::vector<QString> conf_jack_ports[2];
|
||||||
unsigned conf_channels;
|
|
||||||
uid_t conf_uid;
|
uid_t conf_uid;
|
||||||
gid_t conf_gid;
|
gid_t conf_gid;
|
||||||
uid_t conf_pypad_uid;
|
uid_t conf_pypad_uid;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user