EAGI problems [solved]

I wanted to create an EAGI app that would stream the inbound sound to another process using sockets. I think it is a pretty reasonable situation, no?

When I wrote my first app, things were fine, cause all I did was save the sound to a file. Then I made a simple server that did the same thing and tried to repeat the “experiment” by using sockets. This time the sound was all wierd and “choppy”. I reilized there were some samples that are being skipped. I made one more experiment where I added a delay to my loop, each second for 1 sec. As it turned out, the sound wasn’t buffered and the delays made the resulting recording full of gaps.

In your opinion, what is the best solution to the buffering problem in EAGI? I used the sphinx example for my attempts and somehow I doubt even that would work properly (not that it does)…

Isn’t it silly when you have to reply your own posts cause noone else will…

I solved it by setting up the socket to non-blocking mode and creating my own buffer. I keep reading the pipe as fast as possible, but when the socket buffer fills up I copy the data that wouldn’t fit to my own buffer.

It’s sad that I have to create my own failsafe buffer. I read some of the EAGI sourcode and I intend to report this as a bug…

If anyone is interested in the details I’ve posted it here: http://bugs.digium.com/view.php?id=8921