You tried it then and not just read the document?
I've looked in my copy of the library, and I have uncommented (from default):
#define buffSize 128
And stereo playback works like a charm. Worth mentioning that the first two options are actually optional, I uncommented them for lower RAM footprint and better performance.
I just don't understand why you say it's not as simple as that. I know it takes more resources, but what else I've missed that makes it "not simple"?
No that depends on where you put the LED does it not?
I mean after the low-pass filter. Before it's the PWM signal, with enough current to drive a typical 5mm THT LED.
When you have lots of theory but not much practice.
I do have the theory, but if I hadn't the practice I wouldn't even have meddled in this topic.
When you know about electronics but nothing about audio.
I'm not an audio expert or professional, but at least I do know the fundamentals of sound, digitized sound and audio amplifiers; maybe a bit further.
But AC coupling is a high-pass filter and restoration filter is a low pass. You can call them either, noone is
So they are synonyms? Makes sense for me.
I mean, one says what it does, and the other says what it is (sounding more technical though); but in the end both "words" lead to the same thing.
BTW its also possible to drive a speaker using class-D direct from a digital pin using phase-correct PWM and a noise-shaping filter - replace the audio amp on the output with half-H-bridge.
Once I had that "crazy" idea too; but not with a H bridge, rather with a single MOSFET (thus still requiring the series capacitor).
Does an H bridge need two inputs? If the second input is just the inverted of the first one, then nothing to complain about; otherwise it's a downside of requiring two PWM signals for just one audio channel.
Furthermore, splitting the output in two signals implies sacrificing one bit of resolution. For example: an audio file is composed of 8-bit samples (with 256 possible values or steps); by splitting the positive and negative halves of the wave, we end up with two 7-bit samples (with 128 possible values or steps), each one used to drive the inputs of the H bridge.
To figure out in which half the sample is located (and it's value relative from the center), it depends of its sign. If it's signed, is pretty straightfoward getting the value and the location. If it's unsigned, you'll to use two or three bitwise operations to figure that out.
Of course, if the sample is located in certain half, you have to apply the corresponding duty cycle to the corresponding input; the other one should stay inactive. Remember that if both inputs are active, the H bridge will short circuit.
To make life easier, I think you can use a L293D as a prebuilt class D amplifier in this case. Since there are two H bridges in one package, then it's perfect for stereo output.
Then why not say "a.k.a. restoration filter" rather than being confrontational?
Yeah good call, because I don't to argue.
PD: I admit sometimes I end up speaking a lot, deviating of the main topic; or maybe my explainations are too technical and not comprehensive by beginners. So I will apologize for any inconvinient