{"id":265,"date":"2017-03-02T18:12:58","date_gmt":"2017-03-02T18:12:58","guid":{"rendered":"https:\/\/blog.mozilla.org\/webrtc\/?p=265"},"modified":"2017-03-02T18:12:58","modified_gmt":"2017-03-02T18:12:58","slug":"firefoxs-audio-backend","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/webrtc\/firefoxs-audio-backend\/","title":{"rendered":"Firefox&#8217;s audio backend"},"content":{"rendered":"<p>Let us talk about Firefox&#8217;s backend audio system. Every sound you hear while you are watching a video or using a WebRTC service comes from the backend audio library. The role of the library is to communicate with audio devices and to provide audio input and\/or output. This library is called \u2018cubeb\u2019 and it is part of the Firefox source code.<\/p>\n<p><!--more--><\/p>\n<p>\u2018Cubeb\u2019 is a cross-platform library, written in C\/C++, that was created and has been maintained by the Firefox Media Team. What is most interesting about this, though, is that \u2018cubeb\u2019 library is developed in a separate Github repository, independent of the basic Mozilla repository. This has a number of benefits: source code remains completely decoupled from the rest of Firefox platform code. The development test-cycle can be significantly smaller, since it is not required to build the whole Firefox application. However what is most important for the user is that, given the fact that there are no dependencies, the library can be used for personal projects. If \u2018cubeb\u2019 is good enough for Firefox it is probably good enough for you!<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-267 aligncenter\" src=\"http:\/\/blog.mozilla.org\/webrtc\/files\/2017\/03\/cubeb-github-repo-250x78.png\" alt=\"\" width=\"779\" height=\"243\" srcset=\"https:\/\/blog.mozilla.org\/webrtc\/files\/2017\/03\/cubeb-github-repo-250x78.png 250w, https:\/\/blog.mozilla.org\/webrtc\/files\/2017\/03\/cubeb-github-repo-768x239.png 768w, https:\/\/blog.mozilla.org\/webrtc\/files\/2017\/03\/cubeb-github-repo-700x218.png 700w, https:\/\/blog.mozilla.org\/webrtc\/files\/2017\/03\/cubeb-github-repo-120x37.png 120w, https:\/\/blog.mozilla.org\/webrtc\/files\/2017\/03\/cubeb-github-repo.png 1044w\" sizes=\"(max-width: 779px) 100vw, 779px\" \/><\/p>\n<p>The functionality of the library is not limited to audio input and output. In addition, it is possible to enumerate all audio devices in the system, as well as to register notifications such as device unplugs. It is also possible to switch between devices at a lower level with a minimal transition gap.<\/p>\n<p>If you are interested in experimenting with the \u2018cubeb\u2019 library you can clone the repository:<\/p>\n<pre>git clone --recursive https:\/\/github.com\/kinetiknz\/cubeb.git<\/pre>\n<p>Read the <strong>INSTALL.md<\/strong> file for instructions on how to build and install it. Patches are always welcome!<\/p>\n","protected":false},"excerpt":{"rendered":"Let us talk about Firefox&#8217;s backend audio system. Every sound you hear while you are watching a video or using a WebRTC service comes from the backend audio library. The role of the library is to communicate with audio devices and to provide audio input and\/or output. This library is called \u2018cubeb\u2019 and it is [&hellip;]","protected":false},"author":1392,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[221,540,301102,301101],"coauthors":[301099],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Firefox&#039;s audio backend - Advancing WebRTC<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.mozilla.org\/webrtc\/firefoxs-audio-backend\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Firefox&#039;s audio backend - Advancing WebRTC\" \/>\n<meta property=\"og:description\" content=\"Let us talk about Firefox&#8217;s backend audio system. Every sound you hear while you are watching a video or using a WebRTC service comes from the backend audio library. The role of the library is to communicate with audio devices and to provide audio input and\/or output. This library is called \u2018cubeb\u2019 and it is [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.mozilla.org\/webrtc\/firefoxs-audio-backend\/\" \/>\n<meta property=\"og:site_name\" content=\"Advancing WebRTC\" \/>\n<meta property=\"article:published_time\" content=\"2017-03-02T18:12:58+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/blog.mozilla.org\/webrtc\/files\/2017\/03\/cubeb-github-repo-250x78.png\" \/>\n<meta name=\"author\" content=\"achronopoulos@mozilla.com\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"achronopoulos@mozilla.com\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/firefoxs-audio-backend\/\",\"url\":\"https:\/\/blog.mozilla.org\/webrtc\/firefoxs-audio-backend\/\",\"name\":\"Firefox's audio backend - Advancing WebRTC\",\"isPartOf\":{\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/firefoxs-audio-backend\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/firefoxs-audio-backend\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/blog.mozilla.org\/webrtc\/files\/2017\/03\/cubeb-github-repo-250x78.png\",\"datePublished\":\"2017-03-02T18:12:58+00:00\",\"dateModified\":\"2017-03-02T18:12:58+00:00\",\"author\":{\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/#\/schema\/person\/5fa2bc388df8299d2dfb5e8dac60c406\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/firefoxs-audio-backend\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.mozilla.org\/webrtc\/firefoxs-audio-backend\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/firefoxs-audio-backend\/#primaryimage\",\"url\":\"https:\/\/blog.mozilla.org\/webrtc\/files\/2017\/03\/cubeb-github-repo.png\",\"contentUrl\":\"https:\/\/blog.mozilla.org\/webrtc\/files\/2017\/03\/cubeb-github-repo.png\",\"width\":1044,\"height\":325},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/firefoxs-audio-backend\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.mozilla.org\/webrtc\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Firefox&#8217;s audio backend\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/#website\",\"url\":\"https:\/\/blog.mozilla.org\/webrtc\/\",\"name\":\"Advancing WebRTC\",\"description\":\"Committed to moving Firefox and WebRTC forward\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.mozilla.org\/webrtc\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/#\/schema\/person\/5fa2bc388df8299d2dfb5e8dac60c406\",\"name\":\"achronopoulos@mozilla.com\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/webrtc\/#\/schema\/person\/image\/54a696ca397e1c5d62673fb7f687d492\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cf9db0d25d70cea6f2027acf4e9ae15b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cf9db0d25d70cea6f2027acf4e9ae15b?s=96&d=mm&r=g\",\"caption\":\"achronopoulos@mozilla.com\"},\"url\":\"https:\/\/blog.mozilla.org\/webrtc\/author\/achronopoulosmozilla-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Firefox's audio backend - Advancing WebRTC","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.mozilla.org\/webrtc\/firefoxs-audio-backend\/","og_locale":"en_US","og_type":"article","og_title":"Firefox's audio backend - Advancing WebRTC","og_description":"Let us talk about Firefox&#8217;s backend audio system. Every sound you hear while you are watching a video or using a WebRTC service comes from the backend audio library. The role of the library is to communicate with audio devices and to provide audio input and\/or output. This library is called \u2018cubeb\u2019 and it is [&hellip;]","og_url":"https:\/\/blog.mozilla.org\/webrtc\/firefoxs-audio-backend\/","og_site_name":"Advancing WebRTC","article_published_time":"2017-03-02T18:12:58+00:00","og_image":[{"url":"http:\/\/blog.mozilla.org\/webrtc\/files\/2017\/03\/cubeb-github-repo-250x78.png"}],"author":"achronopoulos@mozilla.com","twitter_card":"summary_large_image","twitter_misc":{"Written by":"achronopoulos@mozilla.com","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.mozilla.org\/webrtc\/firefoxs-audio-backend\/","url":"https:\/\/blog.mozilla.org\/webrtc\/firefoxs-audio-backend\/","name":"Firefox's audio backend - Advancing WebRTC","isPartOf":{"@id":"https:\/\/blog.mozilla.org\/webrtc\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.mozilla.org\/webrtc\/firefoxs-audio-backend\/#primaryimage"},"image":{"@id":"https:\/\/blog.mozilla.org\/webrtc\/firefoxs-audio-backend\/#primaryimage"},"thumbnailUrl":"http:\/\/blog.mozilla.org\/webrtc\/files\/2017\/03\/cubeb-github-repo-250x78.png","datePublished":"2017-03-02T18:12:58+00:00","dateModified":"2017-03-02T18:12:58+00:00","author":{"@id":"https:\/\/blog.mozilla.org\/webrtc\/#\/schema\/person\/5fa2bc388df8299d2dfb5e8dac60c406"},"breadcrumb":{"@id":"https:\/\/blog.mozilla.org\/webrtc\/firefoxs-audio-backend\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.mozilla.org\/webrtc\/firefoxs-audio-backend\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/webrtc\/firefoxs-audio-backend\/#primaryimage","url":"https:\/\/blog.mozilla.org\/webrtc\/files\/2017\/03\/cubeb-github-repo.png","contentUrl":"https:\/\/blog.mozilla.org\/webrtc\/files\/2017\/03\/cubeb-github-repo.png","width":1044,"height":325},{"@type":"BreadcrumbList","@id":"https:\/\/blog.mozilla.org\/webrtc\/firefoxs-audio-backend\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.mozilla.org\/webrtc\/"},{"@type":"ListItem","position":2,"name":"Firefox&#8217;s audio backend"}]},{"@type":"WebSite","@id":"https:\/\/blog.mozilla.org\/webrtc\/#website","url":"https:\/\/blog.mozilla.org\/webrtc\/","name":"Advancing WebRTC","description":"Committed to moving Firefox and WebRTC forward","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.mozilla.org\/webrtc\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.mozilla.org\/webrtc\/#\/schema\/person\/5fa2bc388df8299d2dfb5e8dac60c406","name":"achronopoulos@mozilla.com","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/webrtc\/#\/schema\/person\/image\/54a696ca397e1c5d62673fb7f687d492","url":"https:\/\/secure.gravatar.com\/avatar\/cf9db0d25d70cea6f2027acf4e9ae15b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cf9db0d25d70cea6f2027acf4e9ae15b?s=96&d=mm&r=g","caption":"achronopoulos@mozilla.com"},"url":"https:\/\/blog.mozilla.org\/webrtc\/author\/achronopoulosmozilla-com\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/posts\/265"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/users\/1392"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/comments?post=265"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/posts\/265\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/media?parent=265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/categories?post=265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/tags?post=265"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blog.mozilla.org\/webrtc\/wp-json\/wp\/v2\/coauthors?post=265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}