Trying to use portaudio to record some data, then use an algorithmic filter to change the recorded voice and then play it back. I\'ve verified a lot of it (coming from example)
It looks like you're trying to free a stack variable. The only time you have to call free
is when you've previously called malloc
(or one of its friends like calloc
) or when the documentation for a library function you're calling says you need to free a pointer that it returns.
Incidentally, any time you do free a pointer, a good practice is to set it to NULL immediately afterwards.
Stack variables go away as soon as they're out of scope. This might help you understand better.