Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why are there no Port instances of certain predefined types (like Port.Info.MICROPHONE or Port.Info.COMPACT_DISC) on Linux?

0
Posted

Why are there no Port instances of certain predefined types (like Port.Info.MICROPHONE or Port.Info.COMPACT_DISC) on Linux?

0

Some operating systems or soundcard driver APIs do not provide information on the type of the available mixer channels. In these cases, a Java Sound implementation cannot match mixer channels with pre-defined Port types. Especially, this is the case with ALSA, which is used as the basis for the Port implementation of the Sun JDK on Linux. To write portable programs, you should not rely on the availability of pre-defined Port types. If in doubt, obtain the list of available Ports and let the user decide which one to use. This is a good idea anyway, since some users don’t have a microphone connected to the “mic in” channel of the soundcard, but via a preamp connected to the “line in” channel.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123