downsampling audio patch

Eric L.'s icon
Max Patch
Copy patch and select New From Clipboard in Max.

Hi there,
The attached patch is supposed to 'downsample' an audio file from a buffer~to another buffer~. Not sure it is the right (best) way for doing this...
Anyway, the patch works as expected when loading it and use it for the first time. But if you want to 'downsample' a second file, it fail.
Any idea please ?
Many thanks,
Cheers,
Eric L.

2814.downsampling03.maxpat
Max Patch