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

automatically attempt to use ALSA plughw devices if unable to open hw device #8159

Open
mixxxbot opened this issue Aug 22, 2022 · 4 comments

Comments

@mixxxbot
Copy link
Collaborator

Reported by: Be-ing
Date: 2015-07-16T20:22:56Z
Status: Confirmed
Importance: Wishlist
Launchpad Issue: lp1475420


Users often run into errors with PortAudio being unable to open their sound card because the sample rate is not supported. The workaround for this is to set the PA_ALSA_PLUGHW environment variable to 1 before starting Mixxx. It would be helpful if users did not have to do this and this was handled automatically. Should this be changed in Mixxx or upstream in PortAudio?

@mixxxbot
Copy link
Collaborator Author

Commented by: daschuer
Date: 2016-01-02T21:36:25Z


Since PA_ALSA_PLUGHW is an Portaudio flag, it is up to Mixxx to set it.

But we need to careful consider when Mixxx should set this flag. I think it should be the last resort, since it adds another re-sampling stage to the audio processing chain.

Every resample stage adds noise to the stream, since it tries to predict the voltage level between to samples.

If you set Mixxx to a native soundcard sample rate it is able to process the Audio with only one resampling stage. We pass the samples with the source sample rate to the Enginebuffer and re-sample it in one step to the output sample rate, including all scratching and pitch shifting:

CSAMPLE* output = m_pScale->getScaled(iBufferSize);

The only case I can think of that requires an additional re-sampling is if two soundcards have no common native sample-rates.
But I have not heard of a sound-card that does not support 48 Khz. Is there any?

If yes, Mixxx may detect it and guide the user to the best set up.

@mixxxbot
Copy link
Collaborator Author

Commented by: Be-ing
Date: 2016-01-03T02:14:26Z


Sorry for the confusion, this is typically needed when the sample format is not supported, not the sample rate.

@mixxxbot
Copy link
Collaborator Author

Commented by: daschuer
Date: 2016-01-03T08:00:11Z


normally Portfolio should convert the sample format for us. that is why we directly pass the Mixxx engines floats (CSAMPLE) to PA. I do not know a single soundboard that has a float DAC so there will be always a 24 or 16 bit integer conversion.

So the remaining question Is: when does it fail. Should we move the integer conversion back to mix?

@mixxxbot
Copy link
Collaborator Author

Commented by: Be-ing
Date: 2016-12-06T17:18:43Z


Perhaps this should be implemented in PortAudio rather than Mixxx.

@mixxxbot mixxxbot transferred this issue from another repository Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant