don't use the linesize but the number of samples