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

Fix iax (incomplete)

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