logo

blog

My website can't be that messy, right? git clone https://anongit.hacktivis.me/git/blog.git/

linux-audio-output.xhtml (3351B)


  1. <!--
  2. Copyright © 2014 Haelwenn (lanodan) Monnier
  3. SPDX-License-Identifier: LAL-1.3
  4. -->
  5. <article xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" class="h-entry">
  6. <a href="/articles/linux-audio-output"><h1>Linux Audio Output APIs</h1></a>
  7. <p>About a month ago I took a long afternoon being like "Okay whatever let's see how deep the rabbit hole of linux audio playback goes" (<a href="https://queer.hacktivis.me/objects/33fc99e9-c901-4764-8b75-27d78bf7cc7d">previously</a>, <a href="https://queer.hacktivis.me/objects/3a5e4919-e8ee-4e4c-b50c-899f4afac678">previously</a>). That was a mistake I guess but let's at least avoid others from doing the same and so share what I did as it's fairly complete (patches with reference/citations welcome btw).</p>
  8. <p>I consider here as an Audio Output API any reused code which takes a PCM audio stream as input and which is designed to end up to the sound card at some point. In a simple system there should just be some decoders and cross-platform librairies going to the system native API (ones which are nicely desgined being SunAudio and Plan9 audio).</p>
  9. <figure><img loading="lazy" title="Linux Audio Output APIs" src="/images/linux-audio-output.svg?serial=2021091104" /></figure>
  10. <p>You'll definitely need a large screen if you want to see the whole thing at once.</p>
  11. <h3>Other formats</h3>
  12. <ul>
  13. <li><a href="/images/linux-audio-output.dot">Graphviz DOT</a>: source, has comments and URLs</li>
  14. <li><a href="/images/linux-audio-output.svg">SVG</a>: access to URLs and can hover lines to see origin and destination</li>
  15. <li><a href="/images/linux-audio-output.png">PNG</a></li>
  16. </ul>
  17. <h3>Changelog</h3>
  18. <dl>
  19. <dd>2021-09-11</dd><dt>
  20. <ul>
  21. <li>New paths: sox → sndio ; OpenAL → sndio</li>
  22. <li>Removed "OpenSL ES", it's pretty much Android-only, which is considered out-of-scope</li>
  23. <li>Removed "network card" target, it should be redone per-protocol, in probably a dedicated graph</li>
  24. <li>Removed "filesystem" and "null" targets, this is more for diagnostics purposes and graphviz doesn't have layers</li>
  25. <li>Removed "?" target, in favor of going nowhere</li>
  26. <li>Added Legend</li>
  27. </ul>
  28. </dt>
  29. </dl>
  30. <h2>Cleaned out variant</h2>
  31. <p>This is a variant which only contains APIs/software which is available in current distributions rather than including all the paths that are technically still present in codebases.</p>
  32. <figure><img loading="lazy" title="Linux Audio Output APIs" src="/images/linux-audio-output-current.svg?serial=2021091103" /></figure>
  33. <h3>Other formats</h3>
  34. <ul>
  35. <li><a href="/images/linux-audio-output-current.dot">Graphviz DOT</a>: source, has comments and URLs</li>
  36. <li><a href="/images/linux-audio-output-current.svg">SVG</a>: access to URLs and can hover lines to see origin and destination</li>
  37. <li><a href="/images/linux-audio-output-current.png">PNG</a></li>
  38. </ul>
  39. <h2>See Also</h2>
  40. <p>A similar kind of thing was done by an Adobe employe in 2006~2007 in an article named <q><a href="http://web.archive.org/web/20120331050917/http://blogs.adobe.com/penguinswf/2007/05/welcome_to_the_jungle.html">Welcome To The Jungle</a></q>.</p>
  41. <p><a href="https://queer.hacktivis.me/objects/7c5e3b69-ebfd-4a79-91a9-1fa7140d5436">Fediverse post for comments</a>, published on 2020-06-30T07:10:20Z, last updated on 2021-09-11T04:07:00Z</p>
  42. </article>