Skip to content

Commit cd4a515

Browse files
committed
Update logging for start/stop acquisition and recording
1 parent 5d1d358 commit cd4a515

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

Source/Audio/AudioComponent.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,11 +294,15 @@ bool AudioComponent::beginCallbacks()
294294
// pause to let device initialize
295295
}
296296

297-
LOGC ("Adding audio callback.");
297+
LOGD ("Adding audio callback.");
298298
deviceManager.addAudioCallback (graphPlayer.get());
299299
isPlaying = true;
300300
return true;
301301
}
302+
else
303+
{
304+
LOGE ("No audio device found. Cannot start callbacks.");
305+
}
302306
}
303307
else
304308
{
@@ -310,7 +314,7 @@ bool AudioComponent::beginCallbacks()
310314

311315
void AudioComponent::endCallbacks()
312316
{
313-
LOGC ("Removing audio callback.");
317+
LOGD ("Removing audio callback.");
314318
deviceManager.removeAudioCallback (graphPlayer.get());
315319
isPlaying = false;
316320
}

Source/UI/ControlPanel.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,8 @@ void ControlPanel::startAcquisition (bool recordingShouldAlsoStart)
672672
{
673673
graph->updateConnections();
674674

675+
LOGC ("Starting acquisition");
676+
675677
graph->startAcquisition(); // inform processors that acquisition will start
676678

677679
if (recordingShouldAlsoStart)
@@ -709,6 +711,8 @@ void ControlPanel::stopAcquisition()
709711

710712
graph->stopAcquisition();
711713

714+
LOGC ("Stopping acquisition");
715+
712716
audio->endCallbacks();
713717

714718
if (! isConsoleApp)
@@ -1046,6 +1050,8 @@ void ControlPanel::startRecording()
10461050

10471051
graph->setRecordState (true);
10481052

1053+
LOGC ("Starting recording");
1054+
10491055
repaint();
10501056
}
10511057

@@ -1077,6 +1083,8 @@ void ControlPanel::stopRecording()
10771083

10781084
filenameComponent->setEnabled (true);
10791085

1086+
LOGC ("Stopping recording");
1087+
10801088
repaint();
10811089
}
10821090

0 commit comments

Comments
 (0)