|
From: | Alexander |
Subject: | Re: [Linphone-developers] Choppy sound on Android |
Date: | Fri, 3 Dec 2010 13:10:02 +0300 |
Hi,Well, what can be the link between "d->read_chunk_size" which is used for outgoing audio and and issue with incoming Audio ?Cheers
Le 3 déc. 2010 à 10:38, Alexander a écrit :It seems that I found possible problem of choppy sound (at least on my HTC Desire and particular provider): buffer and chunk size in mediastreamer. I tried to adapt sipdroid's algorithm to cound buffer and chunk size in sound_read_setup():
// 20 is frame length (in milliseconds) for GSM codec. It's hardcoded 'cause I haven't found any ability to get frame length :(
int shorts_per_notif = (d->rate * 20)/1000;
d->buff_size = jni_env->CallStaticIntMethod(d->audio_record_class, min_buff_size_id, d->rate, 2/*CHANNEL_CONFIGURATION_MONO*/, 2/* ENCODING_PCM_16BIT */);
d->buff_size = (d->buff_size + (shorts_per_notif - (d->buff_size % shorts_per_notif))) * 5;
d->read_chunk_size = shorts_per_notif * 2;
With this dirty hack, incoming sound is much better.
2010/12/1 Alexander <address@hidden>Hmm, it's very strange. I've checked the application on HTC Desire with 3G network - eveything is almost fine (sometimes sound is a bit noisy and stutter, but it's unavoidable, I suppose). With Wi-Fi, situation is awful - sound disappears for a long time and/or stutters very often. It seems that there's an issue with our Wi-Fi network (or, maybe, MTU setting problem - it's now set to 0).
2010/11/30 Jehan Monnier <address@hidden>Hi,Well, we cannot guaranty liblinphone works in real time on the emulator. But on HTC desire with GSM codec, it must.Do you have the same traces from the HTC desire ? Also you can look at top (adb shell top) to make sure an other process is not eating cpu .Cheers
Le 29 nov. 2010 à 14:19, Alexander a écrit :For now I can provide complete logcat's dump for one call (see attached file). If some additional info or debugging options are required, please let me know.
I asked about git repo because it noticed differences in debug output and event handling in sources.
2010/11/29 Jehan Monnier <address@hidden>Hi Alexander,Late ticks can explain choppy voice, but not with only one.Can you provide us with more traces ?Regarding git repo, the version from git is the latest.Cheers
Le 29 nov. 2010 à 13:36, Alexander a écrit :_______________________________________________Hello all!
I try to use liblinphone (sources are downloaded from git) in my Android project and encounter the following problem: incoming sound is choppy, sometimes it completely disappears (but if remote side speaks non-stop, everything is fine). We use GSM codec, comfort noise is disabled. When call is active, logcat shows the following messages:
11-29 12:25:41.783: WARN/AudioFlinger(31): RecordThread: buffer overflow
11-29 12:25:38.142: WARN/mediastreamer(637): Audio MSTicker: We are late of 60 miliseconds.
It this ok? I encounter this on both Android Emulator and my HTC Desire.
By the way, I noticed that liblinphone from git-repository differs from liblinphone included in apk-file. The one in apk is more recent (it's API slightly differs)?
Linphone-developers mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/linphone-developers
_______________________________________________
Linphone-developers mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/linphone-developers
<DUMP.txt>_______________________________________________
Linphone-developers mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/linphone-developers
_______________________________________________
Linphone-developers mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/linphone-developers
_______________________________________________
Linphone-developers mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/linphone-developers
_______________________________________________
Linphone-developers mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/linphone-developers
[Prev in Thread] | Current Thread | [Next in Thread] |