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

Don't crash if alsa_snd_pcm_poll_descriptors fails #344

Merged
merged 4 commits into from
Dec 18, 2020

Conversation

daschuer
Copy link
Contributor

Copy link
Collaborator

@philburk philburk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will review the rest in more detail.

src/hostapi/alsa/pa_linux_alsa.c Outdated Show resolved Hide resolved
Copy link
Collaborator

@philburk philburk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been discussed and approved by several people on the mail list.

@RossBencina
Copy link
Collaborator

I don't feel qualified to comment on this.

Copy link
Collaborator

@philburk philburk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I faked an xrun in pa_linux_alsa.c at line 3645 with:

static int count = 0;
if( ret != self->nfds || ((count++ % 173) == 150)) // FIXME fake an error

Then I tried running the test paex_read_write_wire and it failed.
But the test aborts when it gets an xrun.
So I modified the test to just print a message when ReadStream or WriteStream return an error.
Now for every xrun I trigger in pa_alsa I get a flood of error returns.

src/hostapi/alsa/pa_linux_alsa.c Outdated Show resolved Hide resolved
@daschuer
Copy link
Contributor Author

Done

@philburk
Copy link
Collaborator

Fixes #268

@philburk philburk merged commit cff8571 into PortAudio:master Dec 18, 2020
@antiochtech
Copy link

im still getting the error so i suspect my project is still using the old version. its a python project using the raspbian package python3-pyaudio. ive followed the installation recommendations for my device (https://github.com/PortAudio/portaudio/wiki/Platforms_RaspberryPi and http://portaudio.com/docs/v19-doxydocs/compile_linux.html), but i suspect theres another step?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pa_linux_alsa.c:3636: PaAlsaStreamComponent_BeginPolling: Assertion `ret == self->nfds' failed
4 participants