piezo-speaker: Handle beep duration 0 correctly

Also replace beep duration QLineEdit with a QSpinBox.
Fix whitespace