diff --git a/src/buffer.h b/src/buffer.h index b430b168..30ef17cd 100755 --- a/src/buffer.h +++ b/src/buffer.h @@ -77,7 +77,7 @@ public: int GetSize() const { return iMemSize; } - bool CConvBuf::Put ( const CVector& vecsData ) + bool Put ( const CVector& vecsData ) { const int iVecSize = vecsData.Size(); @@ -93,7 +93,7 @@ public: return ( iEnd == iMemSize ); } - CVector CConvBuf::Get() + CVector Get() { iPutPos = 0; return vecsMemory; diff --git a/src/channel.cpp b/src/channel.cpp index ef125c00..d4a00680 100755 --- a/src/channel.cpp +++ b/src/channel.cpp @@ -140,6 +140,9 @@ void CChannel::SetNetwFrameSizeAndFact ( const int iNewNetwFrameSize, SYSTEM_SAMPLE_RATE, TIME_MOV_AV_RESPONSE ); CycleTimeVariance.Reset(); + + // tell the server that audio coding has changed + CreateNetTranspPropsMessFromCurrentSettings(); } bool CChannel::SetSockBufSize ( const int iNumBlocks ) diff --git a/src/client.cpp b/src/client.cpp index d9eab16c..214bef56 100755 --- a/src/client.cpp +++ b/src/client.cpp @@ -168,11 +168,6 @@ void CClient::SetSndCrdPreferredMonoBlSizeIndex ( const int iNewIdx ) { Sound.Start(); } - - // tell the server that audio coding has changed (it - // is important to call this function AFTER we have applied - // the new setting to the channel!) - Channel.CreateNetTranspPropsMessFromCurrentSettings(); } QString CClient::SetSndCrdDev ( const int iNewDev ) diff --git a/src/res/frontpicture.xcf b/src/res/frontpicture.xcf index d5de666e..8dcb03dd 100755 Binary files a/src/res/frontpicture.xcf and b/src/res/frontpicture.xcf differ diff --git a/src/socket.cpp b/src/socket.cpp index 518c10db..1a034621 100755 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -23,6 +23,7 @@ \******************************************************************************/ #include "socket.h" +#include "server.h" /* Implementation *************************************************************/ diff --git a/src/socket.h b/src/socket.h index ec73eea5..d2c4f7f7 100755 --- a/src/socket.h +++ b/src/socket.h @@ -34,6 +34,11 @@ #include "channel.h" #include "util.h" +// The header file server.h requires to include this header file so we get a +// cyclic dependency. To solve this issue, a prototype of the server class is +// defined here. +class CServer; // forward declaration of CServer + /* Definitions ****************************************************************/ // Maximum block size for network input buffer. Consider a maximum sample rate @@ -49,7 +54,7 @@ class CSocket : public QObject public: CSocket ( CChannel* pNewChannel, const quint16 iPortNumber ) : pChannel( pNewChannel ), bIsClient ( true ) { Init ( iPortNumber ); } - CSocket ( QObject* pNServP, const quint16 iPortNumber ) : + CSocket ( CServer* pNServP, const quint16 iPortNumber ) : pServer ( pNServP ), bIsClient ( false ) { Init ( iPortNumber ); } virtual ~CSocket() {} @@ -66,8 +71,8 @@ protected: CHostAddress RecHostAddr; CChannel* pChannel; // for client + CServer* pServer; // for server - QObject* pServer; bool bIsClient; public slots: