Skip to content
Snippets Groups Projects
Commit a7d25038 authored by Alexandre Bourget's avatar Alexandre Bourget
Browse files

Typos, cosmetics.

parent ccc291eb
No related branches found
No related tags found
No related merge requests found
...@@ -67,7 +67,7 @@ private: ...@@ -67,7 +67,7 @@ private:
/** Buffer for 48000hz samples in conversion */ /** Buffer for 48000hz samples in conversion */
float32* _floatBuffer48000; float32* _floatBuffer48000;
/** Buffer for 8000hz samples for mic conversion */ /** Buffer for 8000Hz samples for mic conversion */
int16* _intBuffer8000; int16* _intBuffer8000;
void initAudioRtpSession(void); void initAudioRtpSession(void);
......
...@@ -64,6 +64,7 @@ RingBuffer::debug() { ...@@ -64,6 +64,7 @@ RingBuffer::debug() {
// //
int int
RingBuffer::AvailForPut() const { RingBuffer::AvailForPut() const {
// Always keep 4 bytes safe (?)
return (mBufferSize-4) - Len(); return (mBufferSize-4) - Len();
} }
...@@ -84,19 +85,23 @@ RingBuffer::Put(void* buffer, int toCopy, unsigned short volume) { ...@@ -84,19 +85,23 @@ RingBuffer::Put(void* buffer, int toCopy, unsigned short volume) {
copied = 0; copied = 0;
pos = mEnd; pos = mEnd;
//fprintf(stderr, "P");
while(toCopy) { while(toCopy) {
block = 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; block = mBufferSize - pos;
} }
// put the data inside the buffer. // Gain adjustment (when Mic vol. is changed)
if (volume != 100) { if (volume != 100) {
SFLDataFormat* start = (SFLDataFormat*) src; SFLDataFormat* start = (SFLDataFormat*) src;
int nbSample = block / sizeof(SFLDataFormat); int nbSample = block / sizeof(SFLDataFormat);
for (int i=0; i<nbSample; i++) { start[i] = start[i] * volume / 100; } for (int i=0; i<nbSample; i++) { start[i] = start[i] * volume / 100; }
} }
// bcopy(src, dest, len) // bcopy(src, dest, len)
//fprintf(stderr, "has %d put %d\t", len, block); //fprintf(stderr, "has %d put %d\t", len, block);
bcopy (src, mBuffer + pos, block); bcopy (src, mBuffer + pos, block);
......
...@@ -339,7 +339,7 @@ SIPVoIPLink::getEvent() ...@@ -339,7 +339,7 @@ SIPVoIPLink::getEvent()
case EXOSIP_SUBSCRIPTION_GLOBALFAILURE: /** 43 < announce a global failure */ case EXOSIP_SUBSCRIPTION_GLOBALFAILURE: /** 43 < announce a global failure */
case EXOSIP_SUBSCRIPTION_NOTIFY: /** 44 < announce new NOTIFY request */ case EXOSIP_SUBSCRIPTION_NOTIFY: /** 44 < announce new NOTIFY request */
case EXOSIP_SUBSCRIPTION_RELEASED: /** 45 < call context is cleared. */ 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; break;
case EXOSIP_IN_SUBSCRIPTION_NEW: /** 46 < announce new incoming SUBSCRIBE.*/ case EXOSIP_IN_SUBSCRIPTION_NEW: /** 46 < announce new incoming SUBSCRIBE.*/
......
...@@ -29,9 +29,10 @@ class EventThread; ...@@ -29,9 +29,10 @@ class EventThread;
class SIPCall; 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> * @author Yan Morin <yan.morin@gmail.com>
*/ */
class SIPVoIPLink : public VoIPLink class SIPVoIPLink : public VoIPLink
{ {
public: public:
...@@ -63,11 +64,20 @@ public: ...@@ -63,11 +64,20 @@ public:
// SIP Specific // SIP Specific
/** If set to true, we check for a firewall /** If set to true, we check for a firewall
* @param use true if we use STUN * @param use true if we use STUN
*/ */
void setUseStun(bool use) { _useStun = use; } 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; } 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 setProxy(const std::string& proxy) { _proxy = proxy; }
void setUserPart(const std::string& userpart) { _userpart = userpart; } void setUserPart(const std::string& userpart) { _userpart = userpart; }
void setAuthName(const std::string& authname) { _authname = authname; } void setAuthName(const std::string& authname) { _authname = authname; }
...@@ -234,8 +244,10 @@ private: ...@@ -234,8 +244,10 @@ private:
EventThread* _evThread; EventThread* _evThread;
/** Tell if eXosip was stared (eXosip_init) */ /** Tell if eXosip was stared (eXosip_init) */
bool _eXosipStarted; bool _eXosipStarted;
/** Registration identifier, needed by unregister to build message */ /** Registration identifier, needed by unregister to build message */
int _eXosipRegID; int _eXosipRegID;
/** Number of voicemail */ /** Number of voicemail */
int _nMsgVoicemail; int _nMsgVoicemail;
...@@ -244,17 +256,19 @@ private: ...@@ -244,17 +256,19 @@ private:
/** Do we use stun? */ /** Do we use stun? */
bool _useStun; bool _useStun;
/** What is the stun server? */ /** What is the stun server? */
std::string _stunServer; 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; 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; unsigned int _localExternPort;
/** SIP Proxy URL */ /** SIP Proxy URL */
std::string _proxy; std::string _proxy;
/** SIP UserPart */ /** SIP UserPart */
std::string _userpart; std::string _userpart;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment