Skip to content
Snippets Groups Projects
Commit 0a8e59b6 authored by Rafaël Carré's avatar Rafaël Carré
Browse files

* #6392: AudioRecorder(): ensures mbuffer is set

found by cppcheck
parent 42871028
No related branches found
No related tags found
No related merge requests found
......@@ -30,11 +30,13 @@
#include "audiorecorder.h"
#include "mainbuffer.h"
#include <assert.h>
int AudioRecorder::count = 0;
AudioRecorder::AudioRecorder (AudioRecord *arec, MainBuffer *mb) : Thread()
{
assert(mb);
setCancel (cancelDeferred);
++count;
......@@ -65,9 +67,6 @@ void AudioRecorder::run (void)
while (true) {
if (!mbuffer)
_warn ("AudioRecorder: Error: No instance of ringbuffer");
int availBytes = mbuffer->availForGet (recorderId);
int toGet = (availBytes < bufferLength) ? availBytes : bufferLength;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment