Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac Core returns paInternalError instead of paUnanticipatedHostError #620

Closed
oleg68 opened this issue Aug 7, 2021 · 1 comment · Fixed by #691
Closed

Mac Core returns paInternalError instead of paUnanticipatedHostError #620

oleg68 opened this issue Aug 7, 2021 · 1 comment · Fixed by #691
Assignees
Labels
P2 Priority: High src-coreaudio Apple Core Audio Host API src/hostapi/coreaudio
Milestone

Comments

@oleg68
Copy link
Contributor

oleg68 commented Aug 7, 2021

Describe the bug
If some error occures in a coreaudio function, it always returns paInternalError that make troubleshooting too difficult.

But the actual error is also stored with with PaUtil_SetLastHostErrorInfo. It contradicts the specification of Pa_GetLastHostErrorInfo in https://github.com/PortAudio/portaudio/blob/master/include/portaudio.h

The values in this structure will only be valid if a PortAudio function has previously returned the paUnanticipatedHostError error code.

To Reproduce
Every time when some error occures in portaudio fuctions using CoreAudio.

Expected behavior
Return paUnanticipatedHostError and store the acttual information to LastHostErrorInfo.

Actual behavior
Returning paInternalError. Pa_GetLastHostErrorInfo returns the actual information.

Desktop (please complete the following information):

  • OS: Mac OS
  • OS Version: 10.15
  • PortAudio version: any

Additional context
Seems the problem is in https://github.com/PortAudio/portaudio/blob/master/src/hostapi/coreaudio/pa_mac_core_utilities.c, PaMacCore_SetError:

I'd suggest to replace result = paInternalError; with result = paUnanticipatedHostError; all times in this function.

@philburk
Copy link
Collaborator

We plan to change PaInternalError to paUnanticipatedHostError in PaMacCore_SetError().
Then we will only call PaUtil_SetLastHostErrorInfo() when it is paUnanticipatedHostError.

@philburk philburk added the P2 Priority: High label Feb 10, 2022
@philburk philburk added this to the V19.8 milestone Feb 10, 2022
philburk added a commit that referenced this issue Feb 15, 2022
@RossBencina RossBencina added the src-coreaudio Apple Core Audio Host API src/hostapi/coreaudio label Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Priority: High src-coreaudio Apple Core Audio Host API src/hostapi/coreaudio
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants