logo

blog

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

linux-audio-output.xhtml (3264B)


  1. <article xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" class="h-entry">
  2. <a href="/articles/linux-audio-output"><h1>Linux Audio Output APIs</h1></a>
  3. <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>
  4. <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>
  5. <figure><img loading="lazy" title="Linux Audio Output APIs" src="/images/linux-audio-output.svg?serial=2021091104" /></figure>
  6. <p>You'll definitely need a large screen if you want to see the whole thing at once.</p>
  7. <h3>Other formats</h3>
  8. <ul>
  9. <li><a href="/images/linux-audio-output.dot">Graphviz DOT</a>: source, has comments and URLs</li>
  10. <li><a href="/images/linux-audio-output.svg">SVG</a>: access to URLs and can hover lines to see origin and destination</li>
  11. <li><a href="/images/linux-audio-output.png">PNG</a></li>
  12. </ul>
  13. <h3>Changelog</h3>
  14. <dl>
  15. <dd>2021-09-11</dd><dt>
  16. <ul>
  17. <li>New paths: sox → sndio ; OpenAL → sndio</li>
  18. <li>Removed "OpenSL ES", it's pretty much Android-only, which is considered out-of-scope</li>
  19. <li>Removed "network card" target, it should be redone per-protocol, in probably a dedicated graph</li>
  20. <li>Removed "filesystem" and "null" targets, this is more for diagnostics purposes and graphviz doesn't have layers</li>
  21. <li>Removed "?" target, in favor of going nowhere</li>
  22. <li>Added Legend</li>
  23. </ul>
  24. </dt>
  25. </dl>
  26. <h2>Cleaned out variant</h2>
  27. <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>
  28. <figure><img loading="lazy" title="Linux Audio Output APIs" src="/images/linux-audio-output-current.svg?serial=2021091103" /></figure>
  29. <h3>Other formats</h3>
  30. <ul>
  31. <li><a href="/images/linux-audio-output-current.dot">Graphviz DOT</a>: source, has comments and URLs</li>
  32. <li><a href="/images/linux-audio-output-current.svg">SVG</a>: access to URLs and can hover lines to see origin and destination</li>
  33. <li><a href="/images/linux-audio-output-current.png">PNG</a></li>
  34. </ul>
  35. <h2>See Also</h2>
  36. <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>
  37. <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>
  38. </article>