Yosef Karo, Translation:Shulchan Aruch — Orach Chaim 589…
“ Similarly, one who hears somebody sounding the shofar without intention does not fulfill their obligation. Similarly, one who sounds the shofar for music and does not intend for the soundings to fulfill the obligation does not fulfill their obligation. If the hearer has intention and the blower does not have intention, or the blower has intention and the hearer does not have intention, the obligation is not fulfilled until both the hearer and the sounder have intention. ”
