Add recorder state to console
This commit is contained in:
parent
0d77ccdcc4
commit
fe338049b2
1 changed files with 8 additions and 1 deletions
|
@ -240,6 +240,7 @@ CServer::CServer ( const int iNewMaxNumChan,
|
||||||
Logging ( iMaxDaysHistory ),
|
Logging ( iMaxDaysHistory ),
|
||||||
iFrameCount ( 0 ),
|
iFrameCount ( 0 ),
|
||||||
JamRecorder ( strRecordingDirName ),
|
JamRecorder ( strRecordingDirName ),
|
||||||
|
bEnableRecording ( false ),
|
||||||
bWriteStatusHTMLFile ( false ),
|
bWriteStatusHTMLFile ( false ),
|
||||||
HighPrecisionTimer ( bNUseDoubleSystemFrameSize ),
|
HighPrecisionTimer ( bNUseDoubleSystemFrameSize ),
|
||||||
ServerListManager ( iPortNumber,
|
ServerListManager ( iPortNumber,
|
||||||
|
@ -405,7 +406,7 @@ CServer::CServer ( const int iNewMaxNumChan,
|
||||||
if ( !strRecordingDirName.isEmpty() )
|
if ( !strRecordingDirName.isEmpty() )
|
||||||
{
|
{
|
||||||
bRecorderInitialised = JamRecorder.Init ( this, iServerFrameSizeSamples );
|
bRecorderInitialised = JamRecorder.Init ( this, iServerFrameSizeSamples );
|
||||||
bEnableRecording = bRecorderInitialised;
|
SetEnableRecording ( bRecorderInitialised );
|
||||||
}
|
}
|
||||||
|
|
||||||
// enable all channels (for the server all channel must be enabled the
|
// enable all channels (for the server all channel must be enabled the
|
||||||
|
@ -665,6 +666,7 @@ void CServer::OnAboutToQuit()
|
||||||
|
|
||||||
void CServer::OnHandledSignal ( int sigNum )
|
void CServer::OnHandledSignal ( int sigNum )
|
||||||
{
|
{
|
||||||
|
qDebug() << "OnHandledSignal" << sigNum;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// Windows does not actually get OnHandledSignal triggered
|
// Windows does not actually get OnHandledSignal triggered
|
||||||
QCoreApplication::instance()->exit();
|
QCoreApplication::instance()->exit();
|
||||||
|
@ -705,7 +707,12 @@ void CServer::SetEnableRecording ( bool bNewEnableRecording )
|
||||||
{
|
{
|
||||||
if ( bRecorderInitialised )
|
if ( bRecorderInitialised )
|
||||||
{
|
{
|
||||||
|
// note that this block executes regardless of whether
|
||||||
|
// what appears to be a change is being applied, to ensure
|
||||||
|
// the requested state is the result
|
||||||
|
|
||||||
bEnableRecording = bNewEnableRecording;
|
bEnableRecording = bNewEnableRecording;
|
||||||
|
qInfo() << "Recording state" << ( bEnableRecording ? "enabled" : "disabled" );
|
||||||
|
|
||||||
if ( !bEnableRecording )
|
if ( !bEnableRecording )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue