*
* This function should write up to @p *nsamples samples of data at
* @p dst, and return the number of samples written, or -1 if some error
*
* This function should write up to @p *nsamples samples of data at
* @p dst, and return the number of samples written, or -1 if some error