Revert "Revert "Sampling-related fixes""
Revert "Revert "Sampling-related fixes""

This reverts commit f026a8fadb54ce59987e0853bc3c76fe6807b1f4.

tangent-opensource/hdBlackbird,tangent-opensource/hdBlackbird,tangent-opensource/hdBlackbird