simplify silence module and fix locking
Merge pull request #412 from ndawe/silence

[MRG] simplify silence module and fix locking