I want to simply change the output from the audio out of the bela to the audio caplet extender ports.
However I realize that the adjustable gain only applies to the codec on the main board audio out.
I am ultimately asking how I can get the audioWrite() to sound like the analogWrite() when the audio extender is enabled for a given db (say -60).
I multiplied the .wav samples by .0001 (-60db?). This ended up being quite a bit nosier than the codec output. Am I doing something wrong?
float out = gSampleData[0].samples[gReadPtr];
float out_a = gSampleData[0].samples[gReadPtr] * gain;
audioWrite(context, n, 0, out);
analogWrite(context, n, 0, out_a);
Its hiss in the background........as if I'd turned the speakers up to 11. Yet the sound that plays is the volume I'd like. Odd.
I already made the mistake of directly playing the analog out through the amp. Not fun. I did not rupture my eardrums.