linphone-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-users] ortp - sound not clear


From: Ram
Subject: Re: [Linphone-users] ortp - sound not clear
Date: Thu, 30 Mar 2006 20:54:57 +0530

Hi,
   I am using 48KHZ.
 
   I have 2 channels. Each Sample is 4 bytes long.
 
  per ms it is 48 samples/channel.
 
  Per Ms it is 48 * 2 = 96 samples.
 
  per ms it is 48 * 2 * 4 = 384 bytes.
 
 
Regards,
sriram

 
On 3/30/06, Chandrashekar, Kiran <address@hidden> wrote:
I dont know if you know much about codecs. What codecs are you negotiating? Is it G711 Mulaw?
 
For a typical g711 sample, this is the breakup:
 
8000 samples(bytes) per second (i.e. per 1000 ms)
This translates to 8 bytes per ms. Assuming you have a "ptime" or packet time variable in your SDP, then you are also negotiating the size of the packet to be sent.
 
Generally, you can send packets 20ms, 30ms, 40ms...Assuming you stick to 20ms packets, then it is 20*8 = 120 bytes per packet.
 
From your example, it seems like you are trying to send a lot of data per ms...384. This tells me something is not quite right.
 
Hope this helps,
Kiran
 
-----Original Message-----
From: linphone-users-bounces+kiran= address@hidden [mailto:address@hidden ] On Behalf Of Ram
Sent: Thursday, March 30, 2006 9:51 AM
To: address@hidden
Subject: [Linphone-users] ortp - sound not clear

Hi,
I am working on WINCE and trying to make ortp work on it.
 
 I have been able to recieve some sound at the rtp reciever. but the sound is not clear. i can only feel some body is speaking. I have made the following changes in posixtimer.c to get to here.
 
i know these are not the optimal values - i am just trying to find that out?
 
#define TIME_INTERVAL           10
#define TIME_RESOLUTION       02
#define TIME_TIMEOUT            12
 
 timerId = timeSetEvent (TIME_INTERVAL, 02, timerCb, 0, TIME_PERIODIC | TIME_CALLBACK_FUNCTION);
 
 
If i change any other value - sound still detoriates.
 
i dont know why ?.
 
Still - i dont understand this logic of stopping and starting the threads.
 
why is this done?
 
Does this mean - every 10ms i put a packet into the sound driver buffer?.
 
What happens if i send only 3ms data in each packet.
 
 
I am using 48000, 32 bits/sample.
i am sending and recieving 1152bytes(3ms data).
each ms data consists of 384 bytes (48 * 2 * 4) - 2 channels.
 
For this above situation what should be the value of
incrementing (userts and ts) at sender and reciver side.
I am trying to increment by the number of samples sent.
 
 
I dont know if the problem is related to my gettimeofday function or my payload type. (What does BITRATE mean in payload structure?)
 
Please Advice.
 
 
 
Regards,
sriram
 
 
(My gettimeofday and payload structure looks like this)
int gettimeofday (struct timeval *tv, void* tz)
{
 union
 {
  __int64 ns100; /*time since 1 Jan 1601 in 100ns units */
  FILETIME fileTime;
 } now;
    SYSTEMTIME SystemTime;
    GetSystemTime(&SystemTime); 
 SystemTimeToFileTime(&SystemTime, &now.fileTime ) ;
 tv->tv_usec = (long) ((now.ns100 / 10L) % 1000000L);
 tv->tv_sec = (long) ((now.ns100 - 116444736000000000L) / 10000000L);
 return (0);
}
 
 

PayloadType payload_type_osk=
{
 TYPE( PAYLOAD_AUDIO_CONTINUOUS),
 CLOCK_RATE(48000),
 BITS_PER_SAMPLE(32),
 ZERO_PATTERN(NULL),
 PATTERN_LENGTH(0),
 NORMAL_BITRATE(1536000),
 MIME_TYPE ("OSK_AUDIO")
};



reply via email to

[Prev in Thread] Current Thread [Next in Thread]