mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-07 17:32:20 +02:00
2016-10-20 Fred Gleason <fredg@paravelsystems.com>
* Added a 'LockRdairplayMemory=' parameter to the [Hacks] section of rd.conf(5).
This commit is contained in:
parent
38dc64c548
commit
3faa8dfbed
@ -15484,3 +15484,6 @@
|
||||
* Fixed a bug in 'lib/rdsimpleplayer.cpp' that caused RDAirPlay
|
||||
to freeze when attempting to audition an expired cart
|
||||
[GitHub issue #000051].
|
||||
2016-10-20 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added a 'LockRdairplayMemory=' parameter to the [Hacks] section
|
||||
of rd.conf(5).
|
||||
|
@ -112,6 +112,9 @@ Channels=2
|
||||
; Completely disable maintenance checks on this host.
|
||||
; DisableMaintChecks=Yes
|
||||
|
||||
; Lock memory in RDAirPlay
|
||||
; LockRdairplayMemory=Yes
|
||||
|
||||
;
|
||||
; Log Generation (old method, deprecated)
|
||||
;
|
||||
|
@ -308,6 +308,12 @@ bool RDConfig::disableMaintChecks() const
|
||||
}
|
||||
|
||||
|
||||
bool RDConfig::lockRdairplayMemory() const
|
||||
{
|
||||
return conf_lock_rdairplay_memory;
|
||||
}
|
||||
|
||||
|
||||
unsigned RDConfig::channels() const
|
||||
{
|
||||
return conf_channels;
|
||||
@ -474,6 +480,8 @@ void RDConfig::load()
|
||||
conf_use_stream_meters=profile->boolValue("Hacks","UseStreamMeters",false);
|
||||
conf_disable_maint_checks=
|
||||
profile->boolValue("Hacks","DisableMaintChecks",false);
|
||||
conf_lock_rdairplay_memory=
|
||||
profile->boolValue("Hacks","LockRdairplayMemory",false);
|
||||
conf_channels=profile->intValue("Format","Channels",RD_DEFAULT_CHANNELS);
|
||||
#ifndef WIN32
|
||||
if((user=getpwnam(profile->stringValue("Identity","AudioOwner")))!=NULL) {
|
||||
@ -548,6 +556,7 @@ void RDConfig::clear()
|
||||
conf_jack_ports[1].clear();
|
||||
conf_use_stream_meters=false;
|
||||
conf_disable_maint_checks=false;
|
||||
conf_lock_rdairplay_memory=false;
|
||||
conf_channels=RD_DEFAULT_CHANNELS;
|
||||
#ifndef WIN32
|
||||
conf_uid=65535;
|
||||
|
@ -85,6 +85,7 @@ class RDConfig
|
||||
QString jackPort(int num,int endpt) const;
|
||||
bool useStreamMeters() const;
|
||||
bool disableMaintChecks() const;
|
||||
bool lockRdairplayMemory() const;
|
||||
QString caeLogfile() const;
|
||||
bool enableMixerLogging() const;
|
||||
unsigned channels() const;
|
||||
@ -136,6 +137,7 @@ class RDConfig
|
||||
QString conf_catchd_logname;
|
||||
bool conf_use_stream_meters;
|
||||
bool conf_disable_maint_checks;
|
||||
bool conf_lock_rdairplay_memory;
|
||||
std::vector<QString> conf_jack_ports[2];
|
||||
unsigned conf_channels;
|
||||
#ifndef WIN32
|
||||
|
@ -18,9 +18,11 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <errno.h>
|
||||
#include <math.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
@ -909,6 +911,17 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
rdripc->connectHost("localhost",RIPCD_TCP_PORT,air_config->password());
|
||||
|
||||
//
|
||||
// (Perhaps) Lock Memory
|
||||
//
|
||||
if(air_config->lockRdairplayMemory()) {
|
||||
if(mlockall(MCL_CURRENT|MCL_FUTURE)<0) {
|
||||
QMessageBox::warning(this,"RDAirPlay - "+tr("Memory Warning"),
|
||||
tr("Unable to lock all memory")+
|
||||
" ["+strerror(errno)+"].");
|
||||
}
|
||||
}
|
||||
|
||||
LogLine(RDConfig::LogInfo,"RDAirPlay started");
|
||||
}
|
||||
|
||||
|
@ -596,6 +596,14 @@ OBNOVEN</translation>
|
||||
<source>Service:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Memory Warning</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to lock all memory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ModeDisplay</name>
|
||||
|
@ -596,6 +596,14 @@ AKTUALISIERT</translation>
|
||||
<source>Host:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Memory Warning</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to lock all memory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ModeDisplay</name>
|
||||
|
@ -596,6 +596,14 @@ LISTA</translation>
|
||||
<source>Host:</source>
|
||||
<translation>Equipo:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Memory Warning</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to lock all memory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ModeDisplay</name>
|
||||
|
@ -596,6 +596,14 @@ DU LOG</translation>
|
||||
<source>Service:</source>
|
||||
<translation>Service:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Memory Warning</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to lock all memory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ModeDisplay</name>
|
||||
|
@ -606,6 +606,14 @@ LASTAR PÅ NYTT</translation>
|
||||
<source>Host:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Memory Warning</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to lock all memory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ModeDisplay</name>
|
||||
|
@ -606,6 +606,14 @@ LASTAR PÅ NYTT</translation>
|
||||
<source>Host:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Memory Warning</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to lock all memory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ModeDisplay</name>
|
||||
|
@ -602,6 +602,14 @@ LISTA</translation>
|
||||
<source>Host:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Memory Warning</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to lock all memory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ModeDisplay</name>
|
||||
|
Loading…
x
Reference in New Issue
Block a user