Avoid integer overflows while computing the current play time

Fixes #24.