Sound damping constant for generalized theories of gravity