This finally makes the damn thing work. Requires some more cleanups though.
b->size = size;
}
dest = b->buffer;
- while (size--)
+ while (size--) {
+ char *tmp = (char *)source;
+ char c = *tmp;
+ *tmp = *(tmp + 1);
+ *(tmp + 1) = c;
/* *dest++ = ((*source++) + 32768) / 65536.0; */
*dest++ = (*source++) / 32768.0;
+ }
b->ptr = b->buffer;
b->remaining = b->size;
}
kAudioUnitScope_Input, 0, &inputCallback,
sizeof(inputCallback)) < 0)
goto e3;
- return 0;
+ return 1;
e3:
destroy_buffers(powd);
e2: