Created
October 23, 2017 19:04
-
-
Save colinbdclark/338ef0ecd7bccb9337caf978b9efb467 to your computer and use it in GitHub Desktop.
Test file for a bug in the Chrome's Web Audio API implementation on macOS that only recognizes 2 output channels, even for interfaces with more.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Multichannel USB Audio Interfaces Only Report Two Output Channels on macOS</title> | |
<style> | |
body { | |
font-family: sans-serif; | |
text-align: center; | |
} | |
#question { | |
padding-top: 2em; | |
font-size: 1.5em; | |
} | |
#numChannels { | |
font-style: bold; | |
font-size: 10em; | |
} | |
</style> | |
</head> | |
<body> | |
<p id="question"> | |
According to the Web Audio API, how many output channels does the current audio device have? | |
</p> | |
<div id="numChannels"></div> | |
<script> | |
var ac = new AudioContext(); | |
var numChannels = ac.destination.maxChannelCount; | |
document.getElementById("numChannels").innerHTML = numChannels; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment