Skip to content

Conversation

@AnneKitsune
Copy link

A step towards not crashing when alsa is not running or when I don't have any audio devices plugged in :P

Side note: Rodio is running on cpal 0.6 to which I can't find the source code, so it would need to be updated to the newer cpal to fix the bug we are having with amethyst.

@tomaka
Copy link
Collaborator

tomaka commented Apr 10, 2018

I'm conflicted about this fix. The -16 case just above your code is what is supposed to happen when a device is not available.

We don't want to return DeviceNotSupported when a different problem happens, but on the other hand it's entirely possible that there are values other than -16 that correspond to a non-available device.

@AnneKitsune
Copy link
Author

The error I'm having normally says "device not available". So returning devicenotsupported is wrong, as you said.

@tomaka
Copy link
Collaborator

tomaka commented Apr 16, 2018

What I mean is that the error value you are receiving from ALSA probably indicates an unavailable device, but other error codes probably indicate other kinds of errors.
Therefore we shouldn't treat them in the same way without a distinction.

@richard-uk1
Copy link
Contributor

richard-uk1 commented Apr 26, 2018

Could you have an Unknown error that's a catch-all. Then you can always handle specific errors later.

My problem is that I want to handle the audio issue gracefully rather than just crash.

@mitchmindtree
Copy link
Member

Closing in favour of #248.

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.

4 participants