Resizing Buffer without losing recorded content
Is it possible to resize a buffer object without loosing previously recorded audio/content?
I initially set a buffer to 60000, then would like to resize it later to the exact length of recorded audio (much less than 60.000, but always different) without loosing the audio. Anytime i send a size message to the buffer after recording i am loosing the buffered audio.
Any help is appreciated very much, thank you in advance.
I might add, that i use the buffer inside a poly~ object. mazbe that is the cause of trouble?
look for the 'crop' message to buffer~
it does what you want
thank you mike, should have read help files better! thanx again. works fine.
What about making a buffer larger? I suppose it'd be possible to somehow create a 2nd larger buffer and copy the contents as making a buffer would require reallocating the memory behind it anyway.
i realized, that i need to stick to an initially set large buffer rather than resizing it later, as otherwise memory allocation problems occur, which force me into having to switch audio on/off after resizing a buffer due to destryoed sounding audio.
@ negascout, how would you copy the contents of say buffer one into buffer two (maybe even multiple times after each other) while audio is on and much faster than real time? my buffers use freshly recorded audio, not files, by the way.
i tried using crop as an easter-egged extend message, didn't work.
cropping only allows for downsizing the buffer...