|
|
|
|
|
|
|
|
buffer_length = 200; |
|
|
buffer_length = 200; |
|
|
|
|
|
|
|
|
outbuf_size = (buffer_length * samplerate)/500; |
|
|
outbuf_size = (buffer_length * samplerate)/500; |
|
|
outbuf = (unsigned char *)realloc(outbuf, outbuf_size); |
|
|
|
|
|
if ((out_start = outbuf) == NULL) |
|
|
|
|
|
|
|
|
out_start = (unsigned char *)realloc(outbuf, outbuf_size); |
|
|
|
|
|
if (out_start == NULL) |
|
|
return ENOMEM; |
|
|
return ENOMEM; |
|
|
|
|
|
else |
|
|
|
|
|
outbuf = out_start; |
|
|
|
|
|
|
|
|
// allocate space for event list. Allow 200 events per second. |
|
|
// allocate space for event list. Allow 200 events per second. |
|
|
// Add a constant to allow for very small buf_length |
|
|
// Add a constant to allow for very small buf_length |