Opened 4 years ago
Closed 4 years ago
#16738 closed bug (fixed)
Sound distorted after update
Reported by: | Starcrasher | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta3 |
Component: | - General | Version: | R1/beta2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | #16743 | |
Platform: | All |
Description
After update, I'm hearing distortion on wav files when played by system (startup sound) at startup, in Sounds prefs or with MediaPlayer. If a library is used, (i.e using playsound command line) there's no distortion. Using another app (i.e audacious, qmmp) to play same sound will also work. It doesn't seem to affect other sounds either watching a vid or playing a radio works.
This is on nightly hrev54858 x86_64
Change History (7)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
Reverting hrev54858 works for me. Though that's just because having less reserved memory triggers the real problem. Changing 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.
comment:3 by , 4 years ago
comment:4 by , 4 years ago
Don't know if it can help but commit of hrev54858 says "Untested. If audio is not decoding well, try increasing the constant."...
You can try to increase value 2000 here: https://git.haiku-os.org/haiku/tree/src/kits/media/MediaExtractor.cpp#n454.
comment:5 by , 4 years ago
Blocking: | 16743 added |
---|
comment:6 by , 4 years ago
Some discussion here: https://review.haiku-os.org/c/haiku/+/3610
The buffer size for audio needs to be increased. Discussions in progress to try to find what a good guess would be for the size to allocate.
comment:7 by , 4 years ago
Milestone: | Unscheduled → R1/beta3 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed in hrev54900.
What was the previous hrev you were on?