Sound quality using G.711
Philippe Torrelli
philippe.torrelli at alcatel-lucent.fr
Thu Mar 15 20:17:36 CET 2007
Hello,
This in on windows with the latest autobuilds, on a lan.
Trying to talk from minisip and an Oxo here, I notice the audio sent from
the Oxo restituted in minisip is very metallic and saturated. The audio
sent by minisip was very clear actually .
However the quality for minisip-to-minisip conversations is OK, as are
minisip to snom .. This is with G.711 PCMA codec..
I replay the capture with ethereal, the quality is OK, so it's a problem of
restitution. Trying to investigate this, I noticed the Oxo sends bigger
packets than minisip does ( 240 byte payload versus 160 for minisip ).
I think I found something wrong in BasicSoundSource::pushSound in
for( int32_t nSamples = nMonoSamples; nSamples > 0; ){
int32_t cur = nSamples;
if( cur > (int32_t)iFrames )
cur = iFrames;
memset( temp, 0, iFrames * oNChannels );
for( int32_t i = 0; i<cur; i++ ) {
tempVal = i*oNChannels;
temp[ tempVal ] = samples[i];
tempVal ++;
temp[ tempVal ] = samples[i];
}
writeRet = cbuff->write( temp, cur * 2, true );
samples += cur ; // PTI
nSamples -= cur;
}
as only the only part of samples that is used is the first interval modulo
iFrame [0.. iFrames [ is added to the circular buffer ( and more than once
)... Fixing it to use every sample makes the sound much better...
Philippe Torrelli
More information about the Minisip-devel
mailing list