#16738: Sound distorted after update
--------------------------+-------------------------
Reporter: Starcrasher | Owner: nobody
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: - General | Version: R1/beta2
Resolution: | Keywords:
Blocked By: | Blocking:
Platform: All |
--------------------------+-------------------------
Comment (by madmax):
Reverting hrev54858 works for me. Though that's just because having less
reserved memory triggers the real problem. Changing [https://git.haiku-
os.org/haiku/tree/src/kits/media/ChunkCache.cpp#n68 ChunkCache::SpaceLeft]
to add B_PAGE_SIZE instead of 2048 when in the heuristic also works for
me, maybe by chance.
The problem is in ChunkCache::ReadNextChunk when we have to allocate a new
buffer. We first ask the reader to get the next chunk. Now we know the
size we need and rtm_malloc a new buffer if needed. If that allocation
fails... well, bad luck, chunk is lost.
--
Ticket URL: <https://dev.haiku-os.org/ticket/16738#comment:2>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.