mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
410 lines
17 KiB
HTML
410 lines
17 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>miniaudio - A single file audio playback and capture library.</title>
|
|
<meta name="description" content="miniaudio is a single file audio playback and capture library written in C.">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<link rel="icon" href="img/favicon.png">
|
|
|
|
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-81135233-2"></script>
|
|
<script>
|
|
window.dataLayer = window.dataLayer || [];
|
|
function gtag(){dataLayer.push(arguments);}
|
|
gtag('js', new Date());
|
|
gtag('config', 'UA-81135233-2');
|
|
</script>
|
|
|
|
<style>
|
|
body {
|
|
font-family:sans-serif;
|
|
font-size:11pt;
|
|
line-height:18pt;
|
|
background-color:#003800;
|
|
}
|
|
|
|
h1,h2 {
|
|
color:#333;
|
|
line-height:0.2em;
|
|
margin-bottom:0;
|
|
padding:0;
|
|
}
|
|
h1.man {
|
|
margin-top:2em;
|
|
}
|
|
h2.man {
|
|
margin-top:1.5em;
|
|
}
|
|
|
|
a {
|
|
text-decoration:none;
|
|
color:#28f;
|
|
}
|
|
a:hover {
|
|
text-decoration:underline;
|
|
color:#26d;
|
|
}
|
|
|
|
.a-download {
|
|
text-decoration:none;
|
|
color:#ddd;
|
|
border:solid 1px #000;
|
|
border-radius:4px;
|
|
padding:16px 32px;
|
|
background-color:#003800;
|
|
}
|
|
.a-download:hover {
|
|
background-color:#003000;
|
|
text-decoration:none;
|
|
color:#ddd;
|
|
}
|
|
|
|
.a-sublink {
|
|
font-size:11pt;
|
|
}
|
|
|
|
#preview {
|
|
font-family:monospace;
|
|
font-size:10pt;
|
|
text-align:left;
|
|
}
|
|
|
|
.footer-links {
|
|
margin: 0px;
|
|
margin-bottom: 10px;
|
|
padding: 0px;
|
|
}
|
|
.footer-links li {
|
|
display: inline;
|
|
padding: 0 2px;
|
|
}
|
|
.footer-links li:first-child {
|
|
padding-left: 0;
|
|
}
|
|
|
|
.feature-header {
|
|
color:#666;
|
|
font-size: 24pt;
|
|
font-weight:bold;
|
|
}
|
|
.feature-header2 {
|
|
color:#444;
|
|
font-size: 1.5em;
|
|
font-weight:bold;
|
|
/*margin-bottom:1em;*/
|
|
line-height: 1em;
|
|
text-align:left;
|
|
}
|
|
|
|
.header-link-table {
|
|
}
|
|
.header-link-table td {
|
|
padding-right:1em;
|
|
vertical-align:center;
|
|
line-height:0;
|
|
/*border:solid 1px #f00;*/
|
|
}
|
|
.header-link-table a {
|
|
/*color:#e0d7cf;*/
|
|
color:#dddddd;
|
|
text-decoration:none;
|
|
}
|
|
.header-link-table a:hover {
|
|
color:#ffffff;
|
|
}
|
|
|
|
.footer-link {
|
|
color:#e0d7cf;
|
|
text-decoration:none;
|
|
}
|
|
.footer-link:hover {
|
|
color:#ffffff;
|
|
}
|
|
|
|
|
|
|
|
.mobile-main-link {
|
|
text-align:left;
|
|
background-color:#e0d7cf;
|
|
color:#036;
|
|
border-bottom:solid 1px #333;
|
|
padding-left:16px;
|
|
}
|
|
.mobile-main-link a {
|
|
display:block;
|
|
padding-top:8px;
|
|
padding-bottom:8px;
|
|
color:#036;
|
|
width:100%;
|
|
height:100%;
|
|
max-width:100%;
|
|
}
|
|
|
|
|
|
table.doc {
|
|
border:solid 0px #333;
|
|
border-collapse:collapse;
|
|
}
|
|
|
|
th.doc, td.doc {
|
|
padding:0.5em;
|
|
}
|
|
|
|
th.doc {
|
|
border:solid 1px #003800;
|
|
background-color:#003800;
|
|
color:#FFF;
|
|
text-align:left;
|
|
}
|
|
|
|
td.doc {
|
|
border:solid 1px #666;
|
|
}
|
|
|
|
td.doc p, th.doc p {
|
|
padding:0;
|
|
margin:0;
|
|
}
|
|
|
|
a.doc-navigation {
|
|
display:block;
|
|
padding:0.5em;
|
|
color:#003800;
|
|
border-bottom:solid 1px #bbbbbb;
|
|
}
|
|
|
|
a.doc-navigation:hover {
|
|
color:#fff;
|
|
background-color:#003800;
|
|
text-decoration:none;
|
|
/*border-bottom:solid 1px #003800;*/
|
|
}
|
|
|
|
/*
|
|
a.doc-navigation:hover {
|
|
background-color:#c5ecc5;
|
|
text-decoration:none;
|
|
}
|
|
*/
|
|
|
|
a.doc-navigation-active {
|
|
background-color:#cccccc;
|
|
}
|
|
a.doc-navigation-active:hover {
|
|
color:#003800;
|
|
background-color:#cccccc;
|
|
}
|
|
|
|
a.doc-navigation-l1 {
|
|
padding:0.1em;
|
|
padding-left:1.5em;
|
|
}
|
|
a.doc-navigation-l2 {
|
|
padding:0.1em;
|
|
padding-left:3em;
|
|
}
|
|
a.doc-navigation-l3 {
|
|
padding:0.1em;
|
|
padding-left:4em;
|
|
}
|
|
a.doc-navigation-l4 {
|
|
padding:0.1em;
|
|
padding-left:5em;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body style="margin:0; padding:0">
|
|
<div style="background-color:#003800; color:#bfa792;">
|
|
<div style="max-width:100%; width:100%; margin:0 auto;">
|
|
<table class="header-link-table" style="border-collapse:collapse; border-spacing:0; padding:0; padding-right:1em;">
|
|
<tr>
|
|
<td style="padding:0.75em; width:100%; text-align:left;">
|
|
<table class="header-link-table" style="border-collapse:collapse; margin:0; padding:0">
|
|
<tr>
|
|
<td style="vertical-align:bottom; padding:0em; padding-right:2em;"><a href="index.html"><img src="img/logo1_large_white.png" style="height:24px; min-width:100%;"></a></td>
|
|
<td><a href="docs/manual/index.html">Documentation</a></td>
|
|
<td><a href="docs/examples/index.html">Examples</a></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
|
|
<td style="padding:0.1em; width:25%; text-align:right; vertical-align:center;">
|
|
<a href="https://discord.gg/9vpqbjU"><img src="img/Discord-Logo-White.svg" style="margin:0; padding:0; height:32px; width:32px;"></a>
|
|
</td>
|
|
<td style="padding:0.1em; width:25%; text-align:right; vertical-align:center;">
|
|
<a href="https://twitter.com/mackron"><img src="img/twitter_white.png" style="margin:0; padding:0; height:32px; width:32px;"></a>
|
|
</td>
|
|
<td style="padding:0.1em; padding-right:1em; width:25%; text-align:right; vertical-align:center;">
|
|
<a href="https://github.com/mackron/miniaudio"><img src="img/github_white.png" style="margin:0; padding:0; height:24px; width:24px;"></a>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div style="background-color:#fff; padding-bottom:0em; border-top:solid 1px #003800; background-color:#eee;">
|
|
<!-- Mobile redirection -->
|
|
<script>
|
|
//(function(a,b){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))window.location=b})(navigator.userAgent||navigator.vendor||window.opera,'mobile/index.html');
|
|
</script>
|
|
|
|
<div style="border-bottom:solid 1px #333; text-align:center; padding:64px; background-color:#eee;">
|
|
<div><img src="img/logo1_large.png" style="width:auto; height:auto; min-height:70px;"></div>
|
|
<div style="padding:16px; color:#333; font-size:14pt;">A single file audio playback and capture library.</div>
|
|
<div style="margin-top:32px;">
|
|
<a class="a-download" href="https://raw.githubusercontent.com/mackron/miniaudio/master/miniaudio.h">Download miniaudio.h</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="margin:0 auto; text-align:center;">
|
|
<div style="background-color:#fff; padding-top:3em; padding-bottom:4em; font-size:14pt; color:#666;">
|
|
<div style="margin:0 auto; width:66%;">
|
|
miniaudio is a single file audio playback and capture library written in C. Written from scratch, it has no
|
|
external dependencies with the exception of the C standard library and necessary platform-specific backends.
|
|
</div>
|
|
|
|
<table style="margin:0 auto; text-align:center; width:75%; margin-top:5em; font-size:12pt;">
|
|
<tr>
|
|
<td style="width:33%; vertical-align:top; padding:2em;">
|
|
<div style="color:#464; font-size:18pt; font-weight:bold; margin-bottom:1em;">Works Out of the Box</div>
|
|
<div style="text-align:center;">
|
|
Just add to your source tree and go. There's no need to install any dependencies or development
|
|
packages, nor are there any build systems to waste time on.
|
|
</div>
|
|
</td>
|
|
<td style="width:34%; vertical-align:top; padding:2em;">
|
|
<div style="color:#464; font-size:18pt; font-weight:bold; margin-bottom:1em;">Cross Platform</div>
|
|
<div style="text-align:center;">
|
|
miniaudio works on all the major desktop and mobile platforms, including Windows, macOS,
|
|
Linux, BSD, iOS, Android and Web (via Emscripten).
|
|
</div>
|
|
</td>
|
|
<td style="width:33%; vertical-align:top; padding:2em;">
|
|
<div style="color:#464; font-size:18pt; font-weight:bold; margin-bottom:1em;">Simple</div>
|
|
<div style="text-align:center;">
|
|
miniaudio has a simple, yet flexible low-level API that gets out of your way. Just initialize a
|
|
device and start sending audio data via a callback.
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div style="text-align:center; font-size:24pt; font-weight:bold; margin-top:2em;">
|
|
And best of all, it's free and open-source!
|
|
</div>
|
|
<div style="font-size:12pt; margin-top:1em;">
|
|
You can find miniaudio on <a href="https://github.com/mackron/miniaudio">GitHub</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="background-color:#fff; padding-bottom:1em; border-top:solid 1px #333; background-color:#eee;">
|
|
<div class="feature-header" style="padding-top:1em;">Features</div>
|
|
<table style="margin:0 auto; text-align:center; width:75%; margin-top:0em; font-size:12pt;">
|
|
<tr>
|
|
<td style="width:50%; vertical-align:top; text-align:left; padding:2em;">
|
|
<ul>
|
|
<li>Supports playback, capture, full-duplex and loopback (WASAPI only).</li>
|
|
<li>Device enumeration for connecting to specific devices, not just defaults.</li>
|
|
<li>Connect to multiple devices at once.</li>
|
|
<li>Shared and exclusive mode on supported backends.</li>
|
|
<li>Backend-specific configuration options.</li>
|
|
<li>Device capability querying.</li>
|
|
<li>Automatic data conversion between your application and the internal device.</li>
|
|
<li>Sample format conversion with optional dithering.</li>
|
|
<li>Channel conversion and channel mapping.</li>
|
|
<li>Resampling with support for multiple algorithms.
|
|
<ul>
|
|
<li>Simple linear resampling with anti-aliasing.</li>
|
|
<li>Optional Speex resampling (must opt-in).</li>
|
|
</ul>
|
|
</li>
|
|
<li>Filters.
|
|
<ul>
|
|
<li>Biquad</li>
|
|
<li>Low-pass (first, second and high order)</li>
|
|
<li>High-pass (first, second and high order)</li>
|
|
<li>Second order band-pass</li>
|
|
<li>Second order notch</li>
|
|
<li>Second order peaking</li>
|
|
<li>Second order low shelf</li>
|
|
<li>Second order high shelf</li>
|
|
</ul>
|
|
</li>
|
|
<li>Waveform generation.
|
|
<ul>
|
|
<li>Sine</li>
|
|
<li>Square</li>
|
|
<li>Triangle</li>
|
|
<li>Sawtooth</li>
|
|
</ul>
|
|
</li>
|
|
<li>Noise generation.
|
|
<ul>
|
|
<li>White</li>
|
|
<li>Pink</li>
|
|
<li>Brownian</li>
|
|
</ul>
|
|
</li>
|
|
<li>Decoding (requires external single-file libraries).
|
|
<ul>
|
|
<li>WAV</li>
|
|
<li>FLAC</li>
|
|
<li>MP3</li>
|
|
<li>Vorbis via stb_vorbis (not built in - must be included separately).</li>
|
|
</ul>
|
|
</li>
|
|
<li>Encoding (requires external single-file libraries).
|
|
<ul>
|
|
<li>WAV</li>
|
|
</ul>
|
|
</li>
|
|
<li>Lock free ring buffer (single producer, single consumer).</li>
|
|
</ul>
|
|
</td>
|
|
<td style="width:50%; vertical-align:top; text-align:left; padding:2em;">
|
|
<ul>
|
|
<li>Your choice of either public domain or <a href="https://github.com/aws/mit-0">MIT No Attribution</a>.</li>
|
|
<li>Entirely contained within a single file for easy integration into your source tree.</li>
|
|
<li>No external dependencies except for the C standard library and backend libraries.</li>
|
|
<li>Written in C and compilable as C++, enabling miniaudio to work on almost all compilers.</li>
|
|
<li>Supports all major desktop and mobile platforms, with multiple backends for maximum compatibility.
|
|
<ul>
|
|
<li>WASAPI (Windows Vista+)</li>
|
|
<li>DirectSound (Windows XP+)</li>
|
|
<li>WinMM (Windows)</li>
|
|
<li>Core Audio (macOS, iOS)</li>
|
|
<li>ALSA (Linux)</li>
|
|
<li>PulseAudio (Cross platform, disabled on Windows, BSD and Android)</li>
|
|
<li>JACK (Cross platform, disabled on BSD and Android)</li>
|
|
<li>sndio (OpenBSD)</li>
|
|
<li>audio(4) (NetBSD, OpenBSD)</li>
|
|
<li>OSS (FreeBSD)</li>
|
|
<li>AAudio (Android 8+)</li>
|
|
<li>OpenSL|ES (Android API level 16+)</li>
|
|
<li>Web Audio (Web, via Emscripten)</li>
|
|
<li>Null (Cross platform, not used on Web)</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<table style="margin:0 auto; padding:1em 0px; text-align:center;">
|
|
<tr>
|
|
<td style="vertical-align:center;"><a style="padding:0;" href="https://discord.gg/9vpqbjU"><img src="img/Discord-Logo-White.svg" style="padding:0; height:32px; width:32px;"></a></td>
|
|
<td style="vertical-align:center;"><a style="padding:0;" href="https://twitter.com/mackron"><img src="img/twitter_white.png" style="padding:0; height:32px; width:32px;"></a></td>
|
|
<td style="vertical-align:center;"><a style="padding:0;" href="https://github.com/mackron/miniaudio"><img src="img/github_white.png" style="padding:0; height:24px; width:24px;"></a></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div style="color:#e0d7cf; font-size:9pt; padding:2em 0px; text-align:center;">
|
|
Copyright © 2020 David Reid<br/>
|
|
Developed by David Reid - <a class="footer-link" href="mailto:mackron@gmail.com">mackron@gmail.com</a>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
|