bug fix in sound interface, prepared for new protocol message for connected client information

This commit is contained in:
Volker Fischer 2006-10-30 21:14:44 +00:00
parent f280ad4b3b
commit 3e71e83110
4 changed files with 30 additions and 11 deletions

View file

@ -50,7 +50,7 @@ public:
iCurPeriodSizeOut(NUM_PERIOD_BLOCKS_OUT), bChangParamIn(true), iCurPeriodSizeOut(NUM_PERIOD_BLOCKS_OUT), bChangParamIn(true),
bChangParamOut(true) bChangParamOut(true)
#endif #endif
{snd_pcm_status_alloca(&status);} {}
virtual ~CSound() {Close();} virtual ~CSound() {Close();}
/* Not implemented yet, always return one device and default string */ /* Not implemented yet, always return one device and default string */

View file

@ -226,7 +226,7 @@ void CChannelSet::GetConCliParam ( CVector<CHostAddress>& vecHostAddresses,
/******************************************************************************\ /******************************************************************************\
* CChannel * * CChannel *
\******************************************************************************/ \******************************************************************************/
CChannel::CChannel() CChannel::CChannel() : sName ( "" )
{ {
// query all possible network in buffer sizes for determining if an // query all possible network in buffer sizes for determining if an
// audio packet was received // audio packet was received

View file

@ -80,6 +80,9 @@ public:
bool GetAddress ( CHostAddress& RetAddr ); bool GetAddress ( CHostAddress& RetAddr );
CHostAddress GetAddress () { return InetAddr; } CHostAddress GetAddress () { return InetAddr; }
void SetName ( const std::string sNNa ) { sName = sNNa; }
std::string GetName() { return sName; }
void SetSockBufSize ( const int iNumBlocks ); void SetSockBufSize ( const int iNumBlocks );
int GetSockBufSize() { return iCurSockBufSize; } int GetSockBufSize() { return iCurSockBufSize; }
@ -110,32 +113,35 @@ public:
protected: protected:
void SetNetwInBlSiFact ( const int iNewBlockSizeFactor ); void SetNetwInBlSiFact ( const int iNewBlockSizeFactor );
/* audio compression */ // audio compression
CAudioCompression AudioCompressionIn; CAudioCompression AudioCompressionIn;
int iAudComprSizeIn; int iAudComprSizeIn;
CAudioCompression AudioCompressionOut; CAudioCompression AudioCompressionOut;
int iAudComprSizeOut; int iAudComprSizeOut;
/* resampling */ // resampling
CResample ResampleObj; CResample ResampleObj;
double dSamRateOffset; double dSamRateOffset;
CVector<double> vecdResInData; CVector<double> vecdResInData;
CVector<double> vecdResOutData; CVector<double> vecdResOutData;
/* connection parameters */ // connection parameters
CHostAddress InetAddr; CHostAddress InetAddr;
/* network jitter-buffer */ // channel name
std::string sName;
// network jitter-buffer
CNetBuf SockBuf; CNetBuf SockBuf;
int iCurSockBufSize; int iCurSockBufSize;
/* network output conversion buffer */ // network output conversion buffer
CConvBuf ConvBuf; CConvBuf ConvBuf;
// network protocol // network protocol
CProtocol Protocol; CProtocol Protocol;
/* time stamp index counter */ // time stamp index counter
Q_UINT8 byTimeStampIdxCnt; Q_UINT8 byTimeStampIdxCnt;
int iTimeStampActCnt; int iTimeStampActCnt;

View file

@ -57,8 +57,13 @@ MESSAGES
| 2 bytes factor | | 2 bytes factor |
+----------------+ +----------------+
- IP number and name of connected clients PROTMESSID_CONN_CLIENTS_LIST
for each connected client append following data:
+--------------------+------------------+----------------------+
| 4 bytes IP address | 2 bytes number n | n bytes UTF-8 string |
+--------------------+------------------+----------------------+
* *
****************************************************************************** ******************************************************************************
@ -365,6 +370,14 @@ void CProtocol::CreateNetwBlSiFactMes ( const int iNetwBlSiFact )
CreateAndSendMessage ( PROTMESSID_NET_BLSI_FACTOR, vecData ); CreateAndSendMessage ( PROTMESSID_NET_BLSI_FACTOR, vecData );
} }
//void CProtocol::CreateConClientListMes ( const )
//{
// TODO
//PROTMESSID_CONN_CLIENTS_LIST
//}
/******************************************************************************\ /******************************************************************************\
* Message generation (parsing) * * Message generation (parsing) *