refactor pa_types, still problems with portaudio