5 if ( rb
->read(fd
, &c
, 1) )
11 off_t
my_ftell(int fd
){
12 return rb
->lseek(fd
, 0, SEEK_CUR
);
15 int my_putc(char c
, int fd
){
16 return rb
->write(fd
,&c
,1);
19 void *my_malloc(size_t size
)
21 static char *offset
= NULL
;
22 static ssize_t totalSize
= 0;
25 int remainder
= size
% 4;
27 size
= size
+ 4-remainder
;
31 offset
= rb
->plugin_get_audio_buffer((size_t *)&totalSize
);
34 if (size
+ 4 > abs(totalSize
) )
36 /* We've made our point. */
41 *((unsigned int *)offset
) = size
;
44 totalSize
-= size
+ 4;