This is also why cheap resistive 3.5mm "volume knobs" sound like shit; they produce a high source impedance (as seen by the headphones), which causes frequency-dependent amplitude (and phase?) shifts of output sound (even before the potentiometer starts failing, causing the sound to crackle).
A few years ago, I've built attenuators out of voltage dividers (using around 2-20 ohm resistors). Unfortunately at any given attenuation factor, there's a limit to how high of an impedance you can expose to the audio source, along with how low of an impedance you can expose to the headphones. Additionally, to compensate for stray ground-line resistance causing inverted crosstalk between the stereo channels, I also add a crossfeed resistor or potentiometer of 500 ohms or so, ideally tuned based on the headphone impedance. If you use a potentiometer you can take one side of your headphones/earbuds off, send loud noise to that side alone, and turn the potentiometer knob until no sound is audible in your remaining ear. (To determine the correct fixed resistor value, you can send quiet noise to the remaining ear and adjust its volume until it cancels out crosstalk.) Also since I use TRS cables/sockets, this breaks headphone mics.
I've been meaning to make a PCB version of my attenuator with SMD resistors to reduce space, but don't know where to find a reliable PCB-mount headphone jack (or 3.5mm dongle cable). If anyone has suggestions for a PCB-mount headphone jack (available in the US), let me know!
A few years ago, I've built attenuators out of voltage dividers (using around 2-20 ohm resistors). Unfortunately at any given attenuation factor, there's a limit to how high of an impedance you can expose to the audio source, along with how low of an impedance you can expose to the headphones. Additionally, to compensate for stray ground-line resistance causing inverted crosstalk between the stereo channels, I also add a crossfeed resistor or potentiometer of 500 ohms or so, ideally tuned based on the headphone impedance. If you use a potentiometer you can take one side of your headphones/earbuds off, send loud noise to that side alone, and turn the potentiometer knob until no sound is audible in your remaining ear. (To determine the correct fixed resistor value, you can send quiet noise to the remaining ear and adjust its volume until it cancels out crosstalk.) Also since I use TRS cables/sockets, this breaks headphone mics.
I've been meaning to make a PCB version of my attenuator with SMD resistors to reduce space, but don't know where to find a reliable PCB-mount headphone jack (or 3.5mm dongle cable). If anyone has suggestions for a PCB-mount headphone jack (available in the US), let me know!