Frequency dependence of the photonic noise spectrum in an absorbing or amplifying diffusive medium