fix pitch_detector: recording will stop itself if the callback returns <0