[haiku-bugs] Re: [Haiku] #4954: Proliferation of BBuffer instances when playing sound

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Wed, 14 Aug 2019 03:05:03 -0000

#4954: Proliferation of BBuffer instances when playing sound
------------------------------+------------------------
   Reporter:  Adek336         |      Owner:  leavengood
       Type:  bug             |     Status:  assigned
   Priority:  normal          |  Milestone:  R1
  Component:  Kits/Media Kit  |    Version:  R1/alpha1
 Resolution:                  |   Keywords:
 Blocked By:  14755           |   Blocking:
Has a Patch:  0               |   Platform:  All
------------------------------+------------------------
Changes (by leavengood):

 * owner:  nobody => leavengood


Comment:

 I have finally begun investigating this. I am slowly getting a handle on
 it but obviously it is tricky. We still get 3 new buffers in the
 media_addon_server every time MediaPlayer is opened, and I assume the same
 would happen for the sample program (I will try that too.)

 I also see an "orphaned" buffer in the media_server each time MediaPlayer
 starts. I wrote a small script which calls listarea for media_server and
 media_addon_server and greps for the cloned buffers they each hold and the
 1 and 3 get added every time.

 I believe a BBufferProducer subclass within the media_addon_server team is
 creating these buffers whenever a program needs to play sound. The buffers
 are all part of the same area, which indicates they are probably part of
 the same buffer group. SoundPlayNode::AllocateBuffers actually creates a
 BBufferGroup of this size, so it may be the culprit, but I need to do more
 debugging.

 I am not yet sure about the extra buffers in media_server.

-- 
Ticket URL: <https://dev.haiku-os.org/ticket/4954#comment:28>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: