|Re: [jetty-users] Issue flushing response buffer with audio streaming servlet
On 30/01/2014 19:22, Simone Bordet wrote:
Hi, On Thu, Jan 30, 2014 at 10:45 AM, bubbleguuum <bubbleguuum@xxxxxxx> wrote:Hi, I'm using Jetty 7.6.3 embedded on AndroidPlease try with latest Jetty first, 7.6.14. If that also fails, you need to make 100% sure that's not an application error, that is: it's not you or your external system that adds that unwanted audio segment. You need to add logging and make sure that they are dequed in order, etc. I say this because it's unlikely that Jetty has such a buffering problem, we would have had a ton of reports. It could still be that you're hitting a corner case that exposes a Jetty bug, but you need to be 100% sure that it's not an application problem first. Thanks,
Thank you for your response.I have not tried a newer version of Jetty, but could workaround the problem with buffering thus delaying the served audio stream by a bit more than 1s. This way, the response's OutputStream is written data with no interruption while still being able to detect no audio and start sending silence, and output is flushed automatically as new data is pushed. After much testing, I also doubt it is a Jetty issue. Maybe the client freaking out on not getting audio data in time (still suspicious as it happened with 2 different audio players as clients).
This adds some latency but remains acceptable.
Back to the top