rem: if (AHIClassData->capacity > 0) { AHIClassData->data = AllocVec(AHIClassData->capacity, MEMF_PUBLIC | MEMF_CLEAR);
add: GetAttr(AHIA_Error, object, &result);  if (result != 0) { return result; }  if (AHIClassData->sample_freq_int == 0 && AHIClassData->sample_freq_fract == 0) { return AHIE_Buffer_InvalidSampleFreq; }  if (AHIClassData->length == 0) { AHIClassData->length = AHIClassData->capacity; }  if (AHIClassData->capacity == 0) { return AHIE_Buffer_InvalidCapacity; } else { ULONG size = DoMethod(object, AHIM_Buffer_SampleFrameSize, AHIClassData->sample_type, AHIClassData->capacity, NULL);  if (size == 0) { return AHIE_Buffer_InvalidSampleType; }  AHIClassData->data = AllocVec(size, MEMF_PUBLIC | MEMF_CLEAR); KPrintF("Allocated %ld bytes sample buffer: %08lx\n", size, AHIClassData->data);
context: MethodNew(Class* class, Object* object, struct opSet* msg) {  struct AHIClassBase* AHIClassBase = (struct AHIClassBase*) class->cl_UserData;  struct AHIClassData* AHIClassData = (struct AHIClassData*) INST_DATA(class, object);    MethodUpdate(class, object, (struct opUpdate*) msg);  if (AHIClassData->capacity > 0) {    AHIClassData->data = AllocVec(AHIClassData->capacity,				  MEMF_PUBLIC | MEMF_CLEAR);  }  if (AHIClassData->data == NULL) {    return ERROR_NO_FREE_STORE;  }    return 0;}