Quenching of photon and pion spectra at intermediate RHIC energy