[Verse-dev] Audio streaming and verse_callback_update()

Emil Brink emil at obsession.se
Fri Dec 2 10:59:39 CET 2005


Samuel Siltanen wrote:
> On Thu, 1 Dec 2005, Emil Brink wrote:
> 
>> Personally I tend towards larger values, but I've not written anything
>> really performance-critical. 10000 is my default.
> 
> That is my default value also, but for streaming audio it was too large 
> a value.

Okay.

[math]
> I did the math too, and my conclusions were similar. But doesn't 
> verse_callback_update() receive several packets in one call?

It does, yes. I meant at an average.

[localhost or networked?]
> I actually do it over a network. The command "ping" gives an average 
> delay of about 100 ms.

Oh, so quite a long distance then. Daring.

> Apparently there are no packets lost initially. I have used the timestamps in
 > verse_send_a_stream()-commands in debugging. And apparently the receiver gets
 > all the packets, and the receiver and the sender are synchronized - until a certain
 > amount of data (this seems to be a fixed number, because I experimented with
 > diffrent sample rates) has been trasmitted.

Oh? This sounds very interesting indeed, and really sounds like there is
some buffering issue in Verse. Not conclusively, but suspiciously.

> Then the sender gets ahead of the receiver. I interpret that this behavior is
 > due to some buffer getting full, after which the packets send by  the sender
> are dropped (is this what Verse does?).

I'm not sure, but I don't really think that Verse ever willingly drops a
received packet.

> Because the sample rate at  both ends is the same (even if it were not the same
 > we could use interpolation), the sender and the receiver should handle the same
 > amount of data per time unit. Thus the buffer would not get full as long as the
 > network through-put is relatively constant and high enough. Becuase the network
 > is fine, I assume that either Verse cannot handle the large amount of data or
 > the receiver cannot get the packets out of Verse's buffer fast enough.

Yeah, something like that sounds sensible. Have you tried printing out the
value of verse_session_get_size() in the sending client? This tells you
how much unreceived data is still in the buffers managed by Verse, and
might help shed more light on what is going on, here.

Thanks for your patience.

Regards,

/Emil


More information about the Verse-dev mailing list