X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=osx_writer.c;h=4162badd5d82c4b4053c4581266e17dd3e0ecf0f;hp=df4194122f50818270c904da533fc4a113d81c93;hb=1b2dd40d3d28a68613b0215f0765235afb64984a;hpb=e7a40750746aa95f665629e0453e962d55897e36 diff --git a/osx_writer.c b/osx_writer.c index df419412..4162badd 100644 --- a/osx_writer.c +++ b/osx_writer.c @@ -113,9 +113,14 @@ static void fill_buffer(osx_buffer *b, short *source, long size) 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; } @@ -240,7 +245,7 @@ static int osx_writer_open(struct writer_node *wn) kAudioUnitScope_Input, 0, &inputCallback, sizeof(inputCallback)) < 0) goto e3; - return 0; + return 1; e3: destroy_buffers(powd); e2: