buffer.getNumSamples() is not the same as the buffer size set in DAW

I use HDX soundcard, set buffersize=1024 in Pro Tools(Mac OS) and run my plugin, but buffer.getNumSamples() is 512 in my plugin…
Why does it happen? Any Solutions?

P.S. My Pro Tools was stuck during HDX firmware update yesterday, then I quitted Pro Tools by force…Is the incorrect sample number related to this force quit?

Do you have any follow up problems? Your plugin shouldn‘t be concerned about that in general. The host can do as it pleases (they probably know best what to do). But if you are in doubt about the sound card, you can start your plugin in stand alone mode and attach it directly to the sound card and debug that without the host.

the blocksize only describes the max num of samples, so that you can prepare all your buffers the different numSamples to come. from all daws i tried only cubase uses numSamples = blocksize. fl studio is super radical. you often see numSamples of less than 64. but don’t be confused what to do about it. all you need to do is ignore the unused samples of your buffers for each block