Propagation of waves in a multilayered elastic medium and their dependence on source mechanisms