Closed leico closed 5 years ago
Thanks for the note @leico. It's true that the traditional C API of Max requires all coders to be diligent and good citizens. It is very difficult to change the traditional API because of the potential breakage of code our many values third-parties have written in the past.
One of the goals with the new C++ API that we have in progress is to provide safer interfaces to Max's resources, including buffer~
.
If you are interested in checking out this newer approach, take a look at https://github.com/Cycling74/min-devkit
Cheers! Tim
Hello @tap , thank you reply.
Yes I am interested in min-devkit, because I like strict C++. Will MaxSDK be replaced min-devkit in the future? If yes, I should to update my externals and I have to join the new wave.
The Min-DevKit should be considered an alternative to (not a replacement for) the traditional Max-SDK. There are no plans to abandon the existing SDK and in fact Min is build as a lightweight layer on top of the existing SDK.
Hope this helps!
Hello C74 Dev team.
In this time, I would like to talk about:
https://github.com/Cycling74/max-sdk/blob/e61bf737b2c6c0ad0680d9964ab0ecfa22b398dd/source/c74support/msp-includes/ext_buffer.h#L118 https://github.com/Cycling74/max-sdk/blob/e61bf737b2c6c0ad0680d9964ab0ecfa22b398dd/source/c74support/msp-includes/ext_buffer.h#L33
buffer_locksamples
returned raw pointer. Alsot_buffer_info.b_samples
is same. If a object keep this address, object can manipulatebuffer~
at any time. Those are sample code. https://gist.github.com/leico/c98e1f23a9e6969bdd550dd32238af71I have two solutions. First, write more document, above pointer would may handled so carefully. This way would be the fastest. Second, manipulate with
t_buffer_ref
and checking permission, likeIt is little bit speed down but stable.
Thanks to read.