My decoder uses an arbitrary buffer length and passes data blocks of this size, read from the MP3 file, to mad_stream_buffer. However, MAD throws a "lost synchronization" error immediately after returning from the input callback which feeds the data to mad_stream_buffer. The resulting decoded audio has artifacts at the equivelant locations.
Clearly mad expects the MP3 data to be aligned, perhaps on frame boundaries, but I can't find any mention of this in the source comments.