added a TODO comment
This commit is contained in:
parent
72f7c25d98
commit
06ca70ef10
2 changed files with 27 additions and 1 deletions
|
@ -1098,6 +1098,24 @@ void CClient::ProcessAudioDataIntern ( CVector<int16_t>& vecsStereoSndCrd )
|
|||
|
||||
|
||||
// Receive signal ----------------------------------------------------------
|
||||
|
||||
|
||||
// TODO: Get all the received packets from the Socket interface here in this
|
||||
// high priority thread and put them in the jitter buffer. This has the
|
||||
// advantage that we only have two threads, one low priority thread for
|
||||
// the GUI and one high priority thread for the audio and socket.
|
||||
// PROBLEMS: - If we are not connected, the old callback mechanism in the socket
|
||||
// must be used instead
|
||||
// - The ping message relys on that the packet is immediatly parsed
|
||||
// not only if an audio packet has to be processed. Therefore the
|
||||
// ping measurements will be too high which is not acceptable.
|
||||
// - The thread synchronization is more critical than in the current
|
||||
// implementation so that crashes may occur.
|
||||
//
|
||||
// e.g., do the following:
|
||||
// Socket.GetDataFromSocket();
|
||||
|
||||
|
||||
for ( i = 0; i < iSndCrdFrameSizeFactor; i++ )
|
||||
{
|
||||
// receive a new block
|
||||
|
|
|
@ -187,6 +187,14 @@ void CSocket::OnDataReceived()
|
|||
|
||||
if ( pServer->PutData ( vecbyRecBuf, iNumBytesRead, RecHostAddr ) )
|
||||
{
|
||||
|
||||
|
||||
// TODO: we should only post the event in case the server is turned off for
|
||||
// speed optimization and avoiding possible locks
|
||||
//if ( !pServer->IsRunning() )
|
||||
//{
|
||||
|
||||
|
||||
// this was an audio packet, start server
|
||||
// tell the server object to wake up if it
|
||||
// is in sleep mode (Qt will delete the event object when done)
|
||||
|
|
Loading…
Reference in a new issue