Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
cleaned up capturing audio chapter
  • Loading branch information
karlstav authored Dec 15, 2024
1 parent 0063288 commit be0f0c4
Showing 1 changed file with 21 additions and 25 deletions.
46 changes: 21 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,36 +241,33 @@ cava is in homebrew.
Capturing audio
---------------

### Pulseaudio

Just make sure you have installed pulseaudio dev files and that cava has been built with pulseaudio support (it should be automatically if the dev files are found).

If you're lucky all you have to do is to run cava.

If nothing happens you might have to use a different source than the default. The default might also be your microphone. Look at the [config](#configuration) file for help.

All config options are set in the [config file](#configuration).

### Pipewire

Set

method = pipewire

The default source is `auto` and will most likely be your currently selected output.
This is the default input method if supported on your system. The default source is `auto` and will most likely be your currently selected output.
If you run wireplumber you can use `wpctl` to get the `object.path` or `object.serial` of the desired device to visualize.

e.g.

source = alsa:pcm:3:front:3:playback


### ALSA
### Pulseaudio

method = pulse

The default source is `auto` and should be your currently selected output.

If nothing happens you might have to use a different source than the default. The default might also be your microphone.

Set

### ALSA

method = alsa

in the [config](#configuration) file.

ALSA can be difficult because there is no native way to grab audio from an output. If you want to capture audio straight fom the output (not just mic or line-in), you must create an ALSA loopback interface, then output the audio simultaneously to both the loopback and your normal interface.

Expand Down Expand Up @@ -325,8 +322,6 @@ I had some trouble with sync (the visualizer was ahead of the sound). Reducing t

### Sndio

Set

method = sndio

Sndio is the audio framework used on OpenBSD, but it's also available on FreeBSD, NetBSD and Linux.
Expand Down Expand Up @@ -389,8 +384,6 @@ server.

### OSS

Set

method = oss

The audio system used on FreeBSD is the Open Sound System (OSS).
Expand Down Expand Up @@ -448,8 +441,6 @@ replace `-l dsp.cava` with `-l dsp`. Virtual OSS can be configured and started a

### JACK

Set

method = jack

The JACK Audio Connection Kit (JACK) is a professional sound server API which is available on several
Expand Down Expand Up @@ -540,15 +531,17 @@ where `AA:BB:CC:DD:EE:FF` is squeezelite's MAC address (check the LMS Web GUI (S
Note: squeezelite must be started with the `-v` flag to enable visualizer support.

### macOS
```
method = portaudio
```

Note: Cava doesn't render correctly within the default macOS terminal. In order to achieve an optimal display, install [Kitty](https://sw.kovidgoyal.net/kitty/index.html). Beware that you may run in to the issue presented in #109; however, it can be resolved with [this](https://stackoverflow.com/questions/7165108/in-os-x-lion-lang-is-not-set-to-utf-8-how-to-fix-it).
Portaudio is the default and only supported way of capturing audio on macOS. Unfortunately portaudio can not capture audio directly from the output, but there are severeal ways to achive this:

**Background Music**

Install [Background Music](https://github.com/kyleneideck/BackgroundMusic) which provides a loopback interface automatically. Once installed and running just edit your [config](#configuration) to use this interface with portaudio:

```
method = portaudio
source = "Background Music"
```

Expand All @@ -563,9 +556,14 @@ method = portaudio
source = "Soundflower (2ch)"
```



Note: Cava doesn't render correctly within the default macOS terminal. In order to achieve an optimal display, install [Kitty](https://sw.kovidgoyal.net/kitty/index.html). Beware that you may run in to the issue presented in #109; however, it can be resolved with [this](https://stackoverflow.com/questions/7165108/in-os-x-lion-lang-is-not-set-to-utf-8-how-to-fix-it).


### Windows

Should capture the audio from the default output device automatically.
Should capture the audio from the default output device automatically. No config needed.


Running via ssh
Expand Down Expand Up @@ -650,8 +648,6 @@ If cava quits unexpectedly or is force killed, echo must be turned on manually w
Configuration
-------------

As of version 0.4.0 all options are done in the config file, no more command-line arguments!

By default a configuration file is created upon first launch in `$XDG_CONFIG_HOME/cava/config` or `$HOME/.config/cava/config`, but cava can also be made to use a different file with the `-p` option.

Sending cava a SIGUSR1 signal, will force cava to reload its configuration file. Thus, it behaves as if the user pressed <kbd>r</kbd> in the terminal. One might send a SIGUSR1 signal using `pkill` or `killall`.
Expand Down

0 comments on commit be0f0c4

Please sign in to comment.