Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
b021cff0
Commit
b021cff0
authored
Jun 28, 2010
by
Alexandre Savard
Browse files
[#2165] Remove old call recording implementation
parent
b702dea2
Changes
3
Show whitespace changes
Inline
Side-by-side
sflphone-common/src/audio/audiorecorder.cpp
View file @
b021cff0
...
...
@@ -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));
sleep
(
20
);
}
}
sflphone-common/src/audio/audiorecorder.h
View file @
b021cff0
...
...
@@ -40,7 +40,7 @@ class MainBuffer;
class
AudioRecorder
:
public
ost
::
Thread
{
public:
AudioRecorder
(
AudioRecord
*
arec
);
AudioRecorder
(
AudioRecord
*
arec
,
MainBuffer
*
mb
);
~
AudioRecorder
(
void
){
terminate
();
}
...
...
sflphone-common/src/audio/audiortp/AudioRtpSession.h
View file @
b021cff0
...
...
@@ -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
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment