Originally Posted By: andy

Finally, the buffer is allocated within the read_packet function, which is called for each and every packet. Would it not be better to allocate the buffer in main() and pass the pointer through to read_packet() ?

Sure enough the slimp3slave code that read_packet was borrowed from declares the buffer globally.
_________________________
Remind me to change my signature to something more interesting someday