optimalization
samplesFromCBuff optimal size