Line 14 is not going to work. That works properly only for arrays. For pointer it will silently produce wrong result (either 0 or 1 depending on your machine).
There is no way to determine amount of elements in pointer to array. You need to keep count yourself.
1) remove line 14.
2) Write elements number to the variable count is pointing to in get_from_jack (Tht is why pointer to variable is passed)
For the future: safe way to get array size is this:
Thank you very much MiiNiPaa. The coding is an assignment to learn about containers, starting with this program that was modified by me to understand what is going on.