Commit b021cff0 authored by Alexandre Savard's avatar Alexandre Savard

[#2165] Remove old call recording implementation

parent b702dea2
......@@ -29,13 +29,15 @@
*/
#include "audiorecorder.h"
#include "mainbuffer.h"
AudioRecorder::AudioRecorder (AudioRecord *arec)
AudioRecorder::AudioRecorder (AudioRecord *arec, MainBuffer *mb)
: Thread(), recorderId("recorder_id")
{
setCancel (cancelDeferred);
arecord = arec;
mbuffer = mb;
}
......@@ -44,21 +46,27 @@ AudioRecorder::AudioRecorder (AudioRecord *arec)
*/
void AudioRecorder::run (void)
{
/*
SFLDataFormat buffer[10000];
while(true) {
_debug("Audiorecord");
sleep(1);
if(!mbuffer)
_warn("AudioRecorder: Error: No instance of ringbuffer");
}
*/
int availBytes = mbuffer->availForGet(recorderId);
_debug("Audiorecord: avail for get (before) %d", availBytes);
// SFLDataFormat buffer[10000];
mbuffer->getData(buffer, availBytes, 100, recorderId);
// int availBytes = mbuffer->availForGet(recorderId);
availBytes = mbuffer->availForGet(recorderId);
// mbuffer->getData(buffer, availBytes, 100, recorderId);
_debug("Audiorecord: avail for get (after) %d", availBytes);
// arecord->recData(buffer, availBytes/sizeof(SFLDataFormat));
// arecord->recData(buffer, availBytes/sizeof(SFLDataFormat));
sleep(20);
}
}
......@@ -40,7 +40,7 @@ class MainBuffer;
class AudioRecorder : public ost::Thread {
public:
AudioRecorder(AudioRecord *arec);
AudioRecorder(AudioRecord *arec, MainBuffer *mb);
~AudioRecorder(void){ terminate(); }
......
......@@ -815,6 +815,8 @@ namespace sfl {
// Recv session
receiveSpeakerData ();
/*
// Let's wait for the next transmit cycle
if (sessionWaiting == 1) {
// Record mic and speaker during conversation
......@@ -823,6 +825,7 @@ namespace sfl {
// Record mic only while leaving a message
_ca->recAudio.recData (_micData,_nSamplesMic);
}
*/
_manager->getAudioLayerMutex()->leave();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment