In this paper, under the generalized assumptions of the memory kernel function, using the idea introduced by Lasiecka and Wang (Intrinsic decay rate estimates for semilinear abstract second order equations with memory. Springer INdAM Series 10, New Prospects in Direct, Inverse and Control Problems for Evolution Equations, Chap. 14, Springer, Switzerland, 2014) we prove the general decay result to an initial boundary value problem of a wave equation with variable density. Our general assumptions of the memory kernel function generalize the assumptions in the literature (Alabau-Boussouira et al. in J Funct Anal 254(5):1342–1372, 2008; Messaoudi and Khulaifi in Appl Math Lett 66:16–22, 2017).