Commit 49078fd7 authored by alexandresavard's avatar alexandresavard
Browse files

Fix iax (incomplete)

parent cf652d4a
......@@ -218,9 +218,10 @@ IAXVoIPLink::getEvent()
if (_nextRefreshStamp && _nextRefreshStamp - 2 < time(NULL)) {
sendRegister("");
}
if(call)
call->recAudio.recData(spkrDataConverted,micData,nbSample_,nbSample_);
if(call){
printf("IAXVoIPLink::getEvent() : nbSample_ %i \n",nbSampleForRec_*sizeof(SFLDataFormat));
call->recAudio.recData(spkrDataConverted,micData,nbSampleForRec_*sizeof(SFLDataFormat),nbSampleForRec_*sizeof(SFLDataFormat));
}
// thread wait 3 millisecond
_evThread->sleep(3);
free(event);
......@@ -288,6 +289,9 @@ IAXVoIPLink::sendAudioFromMic(void)
// Get bytes from micRingBuffer to data_from_mic
nbSample_ = audiolayer->getMic( micData, bytesAvail ) / sizeof(SFLDataFormat);
// Store the number of samples for recording
nbSampleForRec_ = nbSample_;
// resample
nbSample_ = converter->downsampleData( micData , micDataConverted , (int)ac ->getClockRate() , (int)audiolayer->getSampleRate() , nbSample_ );
......
......@@ -296,6 +296,9 @@ class IAXVoIPLink : public VoIPLink
/** number of sample */
int nbSample_;
/** number of sample before conversion (recording) */
int nbSampleForRec_;
};
#endif
......@@ -443,7 +443,7 @@ class ManagerImpl {
* Set the recoding path in the configuration tree
* @param a string reresenting the path
*/
std::string setRecordingPath( const std::string );
void setRecordPath( const std::string& recPath);
/**
* Tells if the user wants to display the dialpad or not
......
......@@ -43,7 +43,7 @@
#define RING_CHOICE "Rings.ringChoice" /** Ringtone */
#define VOLUME_SPKR "Volume.speakers" /** Speaker volume */
#define VOLUME_MICRO "Volume.micro" /** Mic volume */
#define RECORD_PATH "Record.path /** Recording path */
#define RECORD_PATH "Record.path" /** Recording path */
#define VIDEO "Video" /** Section Video */
......
Supports Markdown
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