Length of padding for multiple samples stored in a single MP3 file I have 20 short audio samples of a piano playing a single note. Due to internal limitations of my application, I need to concatenate and combine these into a single lossy file (either MP3 or AAC). This concatenated buffer will later be read, decoded to PCM, and split back into 20 buffers.

I realize that both VBR MP3 and AAC take advantage of various pyschoacoustic phenomena, including possible temporal masking. Is there a specific amount of silence that I must insert between the various samples in order to ensure that one does not affect the encoding of the other? Is this impossible to know due to the way encoders work?

I know that MP3 has a frame size of 1152 samples and AAC has a frame size of 1024 samples. Would 1152 samples of silence be enough?
The temporal masking effect is minimal. If your samples do not have extreme differences in loudness, one frame of silence should be enough. Depending on sampling rate one frame is >20ms, that should be plenty.