Newbie question regarding demo/audiorx.cpp

Arjan <[email protected]>
Newsgroups gmane.comp.gnu.ccrtp.devel
Message-ID <[email protected]>
-----------------begin snipped-----------------------------
unsigned char buffer[PACKET_SIZE];

TimerPort::setTimer(PERIOD);

setCancel(THREAD_CANCEL_IMMEDIATE);

for( int i=0 ; true ; i++ ){
	int count;			
	do{
		const RTPData &d = socket->getCookedPacket();
		count = d.getSize();
	}while (count <= 0);

	if(i==0)
		ccxx_sleep(20);
			
	write(audiooutput,buffer,count);
----------------end snipped----------------------------------

Q0.) PACKET_SIZE seems to be calcaulated as: 
PACKET_SIZE=SAMPLING_RATE*PERIOD/1000
with SAMPLIN_RATE=8000 and PERIOD=20

so in this case the buffer will be 160 uchars.
Does RTPData.getSize () NEVER exceed this value?

Q1.) the buffer is written to the audio-ouput but the buffer is never filled with the recieved "audiobytes". Is this correct?

Q2.) Are there more "sources" besides the rfc to consult for better understanding of the rtp-lib?
I already found the reference and programmers manual.

Thanks
Arjan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.