In theory anything you put in the signal path will alter the sound (usually negatively)
https://tortugaaudio.com/docs/ldr-volume-control2/
Turtaga Audio makes an optical based attenuator that doesn't effect the signal path.
or
The Hornehoppe
The Truth passive preamp.
http://www.thehornshoppe.com/the_truth_pre_amp.html