Closed nwolek closed 10 years ago
TTBuffer gives different results for these two methods, but they should be the same:
setSampleRate(value); setAttributeValue("sampleRate", value);
Unfortunately this means I need to re-open the issue.
OK, the problem resulted from trying to override the getter/setter methods for SampleRate on TTBuffer. This is apparently not permitted and will lead to the irregularities that I observed.
Preferred method is to use the addUpdates() macro found here: https://github.com/jamoma/JamomaCore/blob/master/Foundation/library/includes/TTMessage.h#L37
The method is called whenever the attribute of the parent class is changed. There is even a note there about using it with sample rate changes.
I've learned my lesson. Should have a fix pushed momentarily.
When you set the sampleRate for a TTBuffer and then checkOutMatrix(), the resulting TTSampleMatrix does not have the same sampleRate. Discovered while working on #193.