check input values on reading/writing audio data and output states to prevent unpredictable behaviours