[haiku-bugs] Re: [Haiku] #7285: BSoundPlayer sends buffers late, with ever-increasing latency

  • From: "Pete" <trac@xxxxxxxxxxxx>
  • Date: Tue, 01 Sep 2015 23:24:28 -0000

#7285: BSoundPlayer sends buffers late, with ever-increasing latency
------------------------------+----------------------------
Reporter: Pete | Owner: jua
Type: bug | Status: assigned
Priority: normal | Milestone: R1
Component: Kits/Media Kit | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 1 | Platform: All
------------------------------+----------------------------

Comment (by Pete):

I'm afraid that machine [like Franco...] is still dead! Its hard drive
died a couple of years ago, and I keep hoping to get around to replacing
it, but...

My current laptop is HDA, and I can't reproduce the effect, even with the
oldest system I could resurrect (hrev42415).

I've been trying the ToneProducer test app I used before [modified from
the original -- I think just to add command options for buffer size etc.]
on two more recent versions -- pre-PM 45851, which is still my day-to-day
system, and 49167 from ~May. Neither shows runaway latency, though I do
get buffer-late messages. Here's the sort of thing from 49167:


{{{
ToneProducer::NodeRegistered
ToneProducer: looper running
Preparing: no buffer size provided, suggesting 2048
Connect: downstream latency = 12.999 msec
Buffers size 2048 with 1 chans have 512 samples
Calc Internal Latency (buffer filling) = 33 usec
SetEventLatency 13.032 msec (incl. added 0)
TimeSource: real 152903403, perf 134741179, drift 0.999994
SetBufferDuration 11.609 msec
AllocateBuffers: latency = 12999 usec, buffer duration = 11609 usec
creating group of 3 buffers, size = 2048
SetRunMode to B_INCREASE_LATENCY(3)
RunMode actually now B_INCREASE_LATENCY
GetLatency: set total=13132 usec (Event=13032 + Sched=100)
Started with RunMode=B_INCREASE_LATENCY
Handle-buffer event for 134755720 (queued at 134742627) late by 40
Sending buffer 134767329 at 134754323 LATE by 28 (handled at 134754232)
Sending buffer 134778939 at 134765935 LATE by 28 (handled at 134765846)
Sending buffer 134790549 at 134777563 LATE by 47 (handled at 134777456)
Sending buffer 134802159 at 134789148 LATE by 22 (handled at 134789060)
Sending buffer 134813769 at 134800770 LATE by 34 (handled at 134800675)
Sending buffer 134825379 at 134812360 LATE by 14 (handled at 134812272)
Sending buffer 134836989 at 134823972 LATE by 17 (handled at 134823880)
.....
}}}
The interesting thing is that with 45851, I ''don't'' see the repeated
LATE messages! Just the initial "Handle buffer..." one.

If I reduce the buffer size to 64, I get the LATE messages on both
systems, but in the PM one it sounds a bit rough, while it's still
perfectly smooth in the earlier one.
[BTW, I ''do'' use my modified HDA driver (#9134) on both systems -- seems
fine.]

So things are still a bit confusing to me.

--
Ticket URL: <https://dev.haiku-os.org/ticket/7285#comment:50>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: