Call to snd_pcm_hw_params_get_buffer_size causes memory corruption in calling program