Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Feature Requests

Reply
 
Thread Tools Display Modes
Old 06-03-2019, 07:27 AM   #1
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,630
Default [Done] 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:
https://forum.cockos.com/showthread.php?t=221575

Alternatively, the GetXXXStateChunk functions return false, if the NeedBig wasn't big enough.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...

Last edited by Meo-Ada Mespotine; 12-20-2022 at 02:15 PM.
Meo-Ada Mespotine is offline   Reply With Quote
Old 07-12-2019, 07:52 AM   #2
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,110
Default

bump

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
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,746
Default

We should expose the API so that you can register a buffer which gets reallocated up on demand...
Justin is offline   Reply With Quote
Old 07-27-2019, 04:15 AM   #4
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,110
Default

Quote:
Originally Posted by Justin View Post
We should expose the API so that you can register a buffer which gets reallocated up on demand...
Thanks Justin.
Though I'm not sure, is this to be interpreted as

a) coming in near future

b) maybe one day

c) we should, but meh

nofish is offline   Reply With Quote
Old 02-16-2021, 09:29 AM   #5
helgoboss
Human being with feelings
 
helgoboss's Avatar
 
Join Date: Aug 2010
Location: Germany
Posts: 2,199
Default

I'd like to see this as well So useful.
helgoboss is offline   Reply With Quote
Old 12-20-2022, 12:52 PM   #6
awelex
Human being with feelings
 
Join Date: Dec 2022
Posts: 34
Default

bump

Seems like a really important feature to have in the API!
awelex is offline   Reply With Quote
Old 12-20-2022, 01:37 PM   #7
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,110
Default

Not exactly as requested but it's solved meanwhile with a new API addition added in Reaper v6.68:

Quote:
+ API: expose realloc_cmd_register_buf/realloc_cmd_clear to C/C++ API
Usage info here.

@Meo-Ada Mespotine
Perhaps you could mark the thread with [DONE] or similar?

Last edited by nofish; 12-20-2022 at 01:42 PM.
nofish is offline   Reply With Quote
Old 12-20-2022, 02:16 PM   #8
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,630
Default

[Done]
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Reply

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 05:53 AM.


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