I did a search for this beforehand but couldn't find anything so I apologise if I'm repeating something that's been posted here before.
I'm building an external object for Max in C for a school assignment. We were given a basic template for an object that lets audio pass through, and we're modifying it into a 4-tap delay.
I've got the signal vectors (s_vec) coming through the object, and also the vector size of the signal (s_n), both of these are picked up fine in my perform routine. For some reason I CAN NOT get the perform routine to pick up the sample rate of the incoming signal.
I've added sp->s_sr to my dspAdd section, and then added it to the perform routine in the same way I have s_n being read in, but when I use post to check the value of both values, the s_n prints as whatever the buffer is set to on the dac~ object unsurprisingly and the s_sr prints as 0. If I use post just after the dspAdd section however, the sample rate reads as 44100.
I can elaborate or post screenshots if this isn't altogether clear.