News for hackers. Stuff that matters.
Re:HaikuOS running on RISC-V hardware (HiFive Unmatched) by tialaramex on Saturday July 17, 2021 @05:55PM (#27869145)
The BeOS Media APIs enshrine a strange way to think about multimedia latency, which is maybe useful if your central idea is that you need to synchronise audio and video through different production pipelines, but doesn't serve real time audio work at all.

I believe Haiku did eventually fix some of the most egregious mistakes in their audio handling for example for years if you played silence it made everything else quieter, which is a classic goof†. But it's a long way from ideal for this application. You can of course use anything, if your hobby is making music with Haiku, knock yourself out, same with a ZX Spectrum or a toy xylophone, but yeah, not ideal.

† How do I mix samples for N channels together? Adding them together and dividing by N ought to work right? No.

Re:HaikuOS running on RISC-V hardware (HiFive Unmatched) by smallstepforman on Saturday July 17, 2021 @07:13PM (#27869539)
The Haiku MediaKit API was available 5 years before Fabrice Bellard published ffmpeg, and back in the early 90’s BeInc’s goal was to attract the next successor to the NewTek toaster, and to be the next real time audio mixer. This is why they emphasised chaining of media nodes and sorting our “performance time” synchronisation issues with their API. The famous BeOS marketing video demos such a device.

BeOS kernel allows unique app access to a shared memory area, eliminating memory copies when sharing data. When creating the shared area, media apps can set several media access flags to engage the “fast path” if the devices have that buffer. These days modern graphics API’s (eg. Vulkan) offer the same buffer creation hints to help the driver figure out where to best allocate memory (device local, host accessible etc). Because not all memory is equal.

I’ve used both ffmpeg API and BMediaKit (I’m the author of a Haiku native video editor, https://github.com/smallstepforman/Medo). The BMediaKit API is trivially easy to use. ffmpeg is notoriously convoluted. Likewise, the native GUI API is also a pleasure to use. This is why my open source media editor is Haiku native (and not cross platform).

Re:HaikuOS running on RISC-V hardware (HiFive Unmatched) by grepfru_it on Saturday July 17, 2021 @07:31PM (#27869640)
Hey! Thanks for your contributions to the BeOS Ecosystem. The OS wouldn't be the same without it!