Remork if i stop the sketch, the noise stops.
When you use the actual line out, then I think when the program stops, that will be grounded thus killing the noise. I may be wrong though.
Are you using the audio inputs at all? Is there audio passing through?
Remork o in its simplest form it's just Bela reading .wavs from the sd card.
Where is the output routed then? Where are you going from the line outs? Where are you recording to?
Remork however, if i remove the shared ground connection, the noise diminishes considerably.
what else is connected to that ground?
Remork there still is some noise present, though, even without all the peripherals hooked up. there seems to be a pulsing sound in the background that matches the blinking of the blue BBB leds.
that would denote a ground loop of sorts or a very bad power supply.
Remork if i record through the headphone out, i have to push the recording by around +12dB to match the recordings made with the line out.
there is a gain control for the headphones in the IDE settings. By default it is at -12dBFS. The full-range levels are slightly higher for the headphone out (2.6Vpp) vs line out (1.8Vpp). However, the line out is balanced, so if it goes into a balanced input you will get an overall larger swing and common-mode noise rejection.
Remork is there a way to turn off the BBB's leds?
yes
echo none > /sys/class/leds/beaglebone\:green\:usr1/trigger
echo none > /sys/class/leds/beaglebone\:green\:usr2/trigger
echo none > /sys/class/leds/beaglebone\:green\:usr3/trigger
echo none > /sys/class/leds/beaglebone\:green\:usr4/trigger
then you will have to run your program with --disable-led
(you can set that in the IDE as well).
Remember that when you change the settings in the IDE, in order for those to be applied when the program starts at boot you need to temporarily set •none•
at boot and then set your program again.