Coder Social home page Coder Social logo

Comments (7)

mrkapqa avatar mrkapqa commented on June 10, 2024

/etc/asound.conf

pcm.!default {
    type hw
    card 1
}

ctl.!default {
    type hw           
    card 1
}

from apulse.

i-rinat avatar i-rinat commented on June 10, 2024

As error message said,

Apulse does no resampling or format conversion, leaving that task to ALSA plugins. Ensure that selected device is capable of playing a particular sample format at a particular rate. They have to be supported by either hardware directly, or by "plug" and "dmix" ALSA plugins which will perform required conversions on CPU.

In your case, custom ALSA configuration wires "default" device to the hw device without plug and dmix plugins. So when apulse, which is an ALSA client, tries to open "default" device with some parameters, hardware driver says that these parameters are not supported. It's typical for the simple embedded audio adapters to support, say, only 48000 Hz. It relies on the host software to resample audio to fit supported sampling rates. Same with sample formats. As far as I know, Firefox likes to output FLOAT32LE, while simple audio adapters usually support only 16-bit signed (S16LE).

As for the fixing it, you have several options:

  1. use default ALSA configuration. It uses dmix and plug since about 2005. Most probably your ALSA version is recent enough to have them enabled by default;
  2. enhance your custom configuration to use dmix and plug for mixing and resampling;
  3. use a hardware audio adapter which supports wide range of sampling rates and formats.

Any of the three should suffice.

from apulse.

mrkapqa avatar mrkapqa commented on June 10, 2024

Thank you very much for your help!

Could resolve this by deleting /etc/asound.conf and then fixing the sound card order so that the right soundcard gets loaded into alsa.
https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture#Set_the_default_sound_card

from apulse.

mrkapqa avatar mrkapqa commented on June 10, 2024

then there was no need for apulse for my use-case anymore.
however, there are some flatpak apps that seem to rely on pulseaudio.
could i use apulse for those aswell?

from apulse.

i-rinat avatar i-rinat commented on June 10, 2024

flatpak apps
could i use apulse for those aswell?

As far as I know, it's not possible. Flatpak and other containerized app technologies tend to isolate apps. Moreover, they run in a different file tree, so even if one manages to pass LD_LIBRARY_PATH into the container itself, there are no libpulse.so.0 from apulse to load, since that library is in the host filesystem.

However, if one bundles apulse libraries when application is packaged, it may work. But then, if you are building application anyway, why not to enable ALSA in it directly?

from apulse.

Snow-W avatar Snow-W commented on June 10, 2024

I am also having an issue. When I updated from Firefox 60.x-esr to 68.6.0-esr, Firefox is not detecting the sound input device. This worked fine before updating. Did not update anything else. Sound input device is still detected by Audacity and works.

When I tried https://www.onlinemictest.com/ Firefox did not ask me for permission to access the input device. Also, the test claimed there was no input device.

A Mozilla person says this must be an incompatibility in apulse.

Is there a way to make this work or do I need to install PulseAudio?

Installed apulse is 0.1.12
Audio device is Device-1: Intel 82801I HD Audio driver: snd_hda_intel
Linux kernel is 4.9.193-amd64-smp

from apulse.

i-rinat avatar i-rinat commented on June 10, 2024

When I updated from Firefox 60.x-esr to 68.6.0-esr, Firefox is not detecting the sound input device.

I've just tried to run Firefox 68.6.0-esr (binary from https://ftp.mozilla.org) with apulse 0.1.12, and found no issues with audio playback. Microphone on https://www.onlinemictest.com/ is also detected, and I can clearly see waveforms appear in the sample box when I speak to the microphone. So, can't reproduce.

Is there a way to make this work or do I need to install PulseAudio?

Sorry, can't say anything definite about that. If PulseAudio works, why not?

from apulse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.