Rick Kunath wrote:
> I've been getting a few of these timeouts. This is using PortAudio, but I get
> a sometimes similar flush error if I use PulseAudio.
>
> Sometimes PulseAudio will come up with no waterfall audio display at all. A
> re-launch of Fldigi usually fixes this and normal display occurs. I generally
> don't use PulseAudio
>
> I tried sampling at Auto and Native, and there seems to be no pattern.
> Receive
> continues after these. Seems to happen with the PSK Viewer open or not.
>
> on PortAudio:
> E: trx_trx_receive_loop: Sound error: Connection timed out
>
> Any idea what might be causing this?
>
==================== Snippet of the code involved:
* catch (const SndException& e) {
LOG_ERROR("%s", e.what());
* put_status(e.what(), 5);
* scard->Close();
*====================
This error is generated in the source file sound.cxx in either one of
two places:
==================== Snippet of the code involved:
if (req_sample_rate != sd[0].dev_sample_rate || rxppm != 0) {
long r;
size_t n = 0;
sd[0].blocksize = SCBLOCKSIZE;
while (n < count) {
if ((r = src_callback_read(rx_src_state, sd[0].src_ratio,
count - n, rbuf + n *
sd[0].params.channelCount)) == 0)
* throw SndException(ETIMEDOUT);
* n += r;
}
}
else {
bool timeout = false;
WAIT_FOR_COND( (sd[0].rb->read_space() >= count *
sd[0].params.channelCount / sd[0].src_ratio), sd[0].rwsem,
(MAX(1.0, 2 * count * sd[0].params.channelCount /
sd->dev_sample_rate)) );
if (timeout)
* throw SndException(ETIMEDOUT);
*
====================
The PulseAudio code is similar but the first *throw
SndException(ETIMEDOUT) *is replaced with *return n
*Are you still compiling from source Rick? You could change line 1014
in sound.cxx to read
// throw SndException(ETIMEDOUT);
return n;
Test the modified PortAudio code and let us know your results. I will
make similar tests here. Let me know if you are no longer compiling
from source and I will create a test suite for you.
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
https://lists.berlios.de/pipermail/fldigi-alpha/attachments/20090912/f4a4e643/attachment.html