Closed nwolek closed 10 years ago
Wondering if the wrapping of TTAudioSignal here could be a model: https://github.com/jamoma/JamomaCore/blob/dev/DSP/library/includes/TTAudioObject.h#L24
Or maybe we could add TTSampleMartix* to this union to enable passing via TTValue: https://github.com/jamoma/JamomaCore/blob/dev/DSP/library/includes/TTAudioObject.h#L24
As of commit f4d6bae, I made some progress on the wrapper here: https://github.com/jamoma/JamomaCore/blob/dev/DSP/library/includes/TTBuffer.h#L185
You can see the syntax in action here: https://github.com/jamoma/JamomaCore/blob/dev/DSP/extensions/SoundfileLib/tests/TTSoundfileLoader.test.cpp#L194
I still need to flesh out the wrapper some more, but this shows that it will work. Should make accessing buffers inside the C++ code much cleaner.
In my attempts to quit using deprecated TTObjectBaseInstantiate & TTObjectBaseRelease methods, I find the syntax for making TTBuffer work feels very unintuitive.
https://github.com/jamoma/JamomaCore/blob/dev/DSP/extensions/SoundfileLib/tests/TTSoundfileLoader.test.cpp#L197
I am essentially having to check out TTSampleMatrixPtr via TTObjectBasePtr, which does not feel right. Ideally, I would want something like this...
I used to be able to do something similar with the deprecated methods. It feels like I lost some functionality in the transition, but maybe I am missing something.
Could not seem to make it happen in spite of my attempts to create a public constructor for TTBuffer. May need @tap to collaborate with me on a solution for this.