Old 06-03-2019, 07:27 AM   #1
Human being with feelings
mespotine's Avatar
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,315
Default API: GetStateChunkSize(object)

I suggest a function, which returns the size a Statechunk would have, if I would get it, as NeedBig in C++ needs this information.
Otherwise, large StateChunks could be truncated, what happened to nofish in this thread:

Alternatively, the GetXXXStateChunk functions return false, if the NeedBig wasn't big enough.
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 07-12-2019, 07:52 AM   #2
Human being with feelings
nofish's Avatar
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,846


Is there really no way currently to use GetEnvelopeStateChunk() safely in C++?
I'd like to make use of it in SWS but I'm unsure how big the buffer I pass should be to ensure it's always big enough (and the chunk isn't truncated).
nofish is offline   Reply With Quote
Old 07-12-2019, 08:20 AM   #3
Justin's Avatar
Join Date: Jan 2005
Location: NYC
Posts: 12,197

We should expose the API so that you can register a buffer which gets reallocated up on demand...
Justin is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 04:56 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.