Commit a7d25038 authored by Alexandre Bourget's avatar Alexandre Bourget

Typos, cosmetics.

parent ccc291eb
......@@ -67,7 +67,7 @@ private:
/** Buffer for 48000hz samples in conversion */
float32* _floatBuffer48000;
/** Buffer for 8000hz samples for mic conversion */
/** Buffer for 8000Hz samples for mic conversion */
int16* _intBuffer8000;
void initAudioRtpSession(void);
......@@ -87,9 +87,9 @@ public:
void closeRtpSession ();
private:
AudioRtpRTX* _RTXThread;
AudioRtpRTX* _RTXThread;
bool _symmetric;
ost::Mutex _threadMutex;
ost::Mutex _threadMutex;
};
#endif // __AUDIO_RTP_H__
......@@ -64,6 +64,7 @@ RingBuffer::debug() {
//
int
RingBuffer::AvailForPut() const {
// Always keep 4 bytes safe (?)
return (mBufferSize-4) - Len();
}
......@@ -84,19 +85,23 @@ RingBuffer::Put(void* buffer, int toCopy, unsigned short volume) {
copied = 0;
pos = mEnd;
//fprintf(stderr, "P");
while(toCopy) {
block = toCopy;
if (block > (mBufferSize - pos)) { // from current pos. to end of buffer
// Wrap block around ring ?
if (block > (mBufferSize - pos)) {
// Fill in to the end of the buffer
block = mBufferSize - pos;
}
// put the data inside the buffer.
if (volume!=100) {
SFLDataFormat* start = (SFLDataFormat*)src;
// Gain adjustment (when Mic vol. is changed)
if (volume != 100) {
SFLDataFormat* start = (SFLDataFormat*) src;
int nbSample = block / sizeof(SFLDataFormat);
for (int i=0; i<nbSample; i++) { start[i] = start[i] * volume / 100; }
}
// bcopy(src, dest, len)
//fprintf(stderr, "has %d put %d\t", len, block);
bcopy (src, mBuffer + pos, block);
......
......@@ -44,7 +44,7 @@ typedef short int16;
#ifdef SFLDEBUG
#define _debug(...) fprintf(stderr, "[sfl-debug] " __VA_ARGS__)
#define _debugStart(...) fprintf(stderr, "[sfl-debug] " __VA_ARGS__)
#define _debugStart(...) fprintf(stderr, "[sfl-debug] " __VA_ARGS__)
#define _debugMid(...) fprintf(stderr, __VA_ARGS__)
#define _debugEnd(...) fprintf(stderr, __VA_ARGS__)
#define _debugException(...) fprintf(stderr, "[sfl-excep] " __VA_ARGS__ "\n")
......
......@@ -339,7 +339,7 @@ SIPVoIPLink::getEvent()
case EXOSIP_SUBSCRIPTION_GLOBALFAILURE: /** 43 < announce a global failure */
case EXOSIP_SUBSCRIPTION_NOTIFY: /** 44 < announce new NOTIFY request */
case EXOSIP_SUBSCRIPTION_RELEASED: /** 45 < call context is cleared. */
Manager::instance().displayError(" !EXOSIP Subscription resposne not implemented yet");
Manager::instance().displayError(" !EXOSIP Subscription response not implemented yet.");
break;
case EXOSIP_IN_SUBSCRIPTION_NEW: /** 46 < announce new incoming SUBSCRIBE.*/
......@@ -521,7 +521,7 @@ SIPVoIPLink::answer(const CallID& id)
eXosip_lock();
int i = eXosip_call_build_answer(call->getTid(), SIP_OK, &answerMessage);
if (i != 0) {
_debug("< SIP Building Error: send 400 Bad Request\n");
_debug("< SIP Building Error: send 400 Bad Request\n");
eXosip_call_send_answer (call->getTid(), SIP_BAD_REQUEST, NULL);
} else {
// use exosip, bug locked
......
......@@ -29,15 +29,16 @@ class EventThread;
class SIPCall;
/**
* Specific VoIPLink for SIP (SIP core for incoming and outcoming events)
* Specific VoIPLink for SIP (SIP core for incoming and outgoing events)
* @author Yan Morin <yan.morin@gmail.com>
*/
class SIPVoIPLink : public VoIPLink
{
public:
SIPVoIPLink(const AccountID& accountID);
SIPVoIPLink(const AccountID& accountID);
~SIPVoIPLink();
~SIPVoIPLink();
/** try to initiate the eXosip engine/thread and set config */
bool init(void);
......@@ -63,11 +64,20 @@ public:
// SIP Specific
/** If set to true, we check for a firewall
* @param use true if we use STUN
*/
void setUseStun(bool use) { _useStun = use; }
/** The name of the STUN server
* @param server Server FQDN/IP
*/
void setStunServer(const std::string& server) { _stunServer = server; }
/** Set the SIP proxy
* @param proxy Proxy FQDN/IP
*/
void setProxy(const std::string& proxy) { _proxy = proxy; }
void setUserPart(const std::string& userpart) { _userpart = userpart; }
void setAuthName(const std::string& authname) { _authname = authname; }
......@@ -234,8 +244,10 @@ private:
EventThread* _evThread;
/** Tell if eXosip was stared (eXosip_init) */
bool _eXosipStarted;
/** Registration identifier, needed by unregister to build message */
int _eXosipRegID;
/** Number of voicemail */
int _nMsgVoicemail;
......@@ -244,17 +256,19 @@ private:
/** Do we use stun? */
bool _useStun;
/** What is the stun server? */
std::string _stunServer;
/** Local Extern Address is the IP address seens by peers for SIP listener */
/** Local Extern Address is the IP address seen by peers for SIP listener */
std::string _localExternAddress;
/** Local Extern Port is the port seens by peers for SIP listener */
/** Local Extern Port is the port seen by peers for SIP listener */
unsigned int _localExternPort;
/** SIP Proxy URL */
std::string _proxy;
/** SIP UserPart */
std::string _userpart;
......
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