<script type="text/x-red" data-help-name="AudioInputAnalogStereo">
	<h3>Summary</h3>
	<div class=tooltipinfo>
	<p>Receive stereo audio using the built-in analog to digital converters.</p>
	</div>
	<h3>Audio Connections</h3>
	<table class=doc align=center cellpadding=3>
		<tr class=top><th>Port</th><th>Purpose</th></tr>
		<tr class=odd><td align=center>Out 0</td><td>Audio Channel (Left)</td></tr>
		<tr class=odd><td align=center>Out 1</td><td>Audio Channel (Right)</td></tr>
	</table>
	<h3>Functions</h3>
	<p>This object has no functions to call from the Arduino sketch.  It
		simply streams data from both ADCs to its output ports.</p>
	<h3>Hardware</h3>
	<p>By default, pins A2 & A3 are used for audio input.  This circuitry is recommended.</p>
	<p align=center><img src="img/adccircuit2.png"></p>
	<p>Signal range is 0 to 1.2V</p>
	<h3>Examples</h3>
	<!--
	<p class=exam>File &gt; Examples &gt; Audio &gt; HardwareTesting &gt; PassThroughMono
	</p>
	<p class=exam>File &gt; Examples &gt; Audio &gt; Analysis &gt; PeakMeterMono
	</p>
	<p class=exam>File &gt; Examples &gt; Audio &gt; Analysis &gt; DialTone_7segment
	</p>
	<p class=exam>File &gt; Examples &gt; OctoWS2811 &gt; SpectrumAnalyzer
	</p>
	-->
	<h3>Notes</h3>
	<p><b>analogRead() must not be used</b>, because AudioInputAnalogStereo is regularly
		accessing the ADC hardware.  If both access the hardware at the same
		moment, analogRead() can end up waiting forever, which effectively
		crashes your program.
	</p>
	<p>A different pin may be used, but adding it as an parameter
		to the AudioInputAnalog object definition.
	</p>
	<p>For example:
	</p>
	<p class=desc><span class=keyword>AudioInputAnalogStereo</span>  adc1(<span class=literal>A3</span>, <span class=literal>A2</span>);
	</p>
	<p>TODO: add info here about which pins work for input 0 and 1.
	</p>
	<p>Noise due to high source impedance, which allows rapidly switching digital signals
		to capacitively couple... avoiding higher analog impedance is the solution.</p>
	<p>Power Supply rejection issue with simple DC bias (bigger capacitor may be needed if 3.3V has low frequency noise)</p>
	<p>Algorithm for automatic DC bias tracking</p>
	<p>TODO: actual noise measurements with different input circuitry
		(it's not as quiet as the audio shield)</p>
</script>
<script type="text/x-red" data-template-name="AudioInputAnalogStereo">
	<div class="form-row">
		<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
		<input type="text" id="node-input-name" placeholder="Name">
	</div>
</script>