apedec: allow the user to set the maximum number of output samples per call