A numerical study of resonant absorption in a magnetohydrodynamic cavity driven by a broadband spectrum