Buffer~ objects resizing themselves for no apparent reason

LReyn's icon

Hello,

I have a 'loadmess' object loading several audio files into several buffer~ objects at startup, each with a size argument. But for some reason, the buffers are occasionally loaded smaller than the argument value, thus cutting the ends off the waveforms.

This doesn't always happen, so I don't see how it could be a programming error. Could it be a Max glitch? I can't see any reason for this in the help files, or anywhere else.

Forgive me if the answer is obvious, I am a relative novice. Any help/advice is appreciated.

Many thanks

MIB's icon

would help to see the patch...
if you want to load the entire file into a buffer~, use the "replace" message. This way you don't have to worry about the length of the buffer. The whole file will be loaded and enough memory allocated to accommodate the file.

tomslater's icon

Hello,

I'm having the same problem, did you find a solution?

MIB's icon

the solution is to use the "replace" message or to post a patch so people can see what you are up to and give you an educated guess as to what might be happening...