Pulse Audio backend not connecting, when the server path is configured via a config file

Open
#1,252 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust

Research direction

The issue identifies the Pulse Audio backend and pulseaudio::Client::from_env as the entry point; start by tracing how that call selects the server and review the linked pulseaudio-rs issue about parsing default-server from the config file. Done when the backend connects to the server configured there when no environment variable supplies its path. No test file or specific implementation location is named.

Written by the indexing model from the issue text.

Description

dependencies host - pulseaudio platform - linux

Current implementation of Pulse Audio backend unconditionally calls pulseaudio::Client::from_env, which in turn looks for the Pulse Audio server socket only based on some environment variables.

This is a problem, when the path to the server is not set in an environment variable, but via the pulse-client config file ( https://man.archlinux.org/man/pulse-client.conf.5.en - key default-server ). This setting is currently ignored, which makes cpal to either connect to a wrong server instance, or not connecting at all.

In my opinion, processing of the config file logically belongs to the pulseaudio crate. However, because it leads to an unexpected behavior of cpal, and one could also claim that cpal could technically parse the config file itself, I decided to open issues for both cpal and pulseaudio crates (pulseaudio issue: https://github.com/colinmarc/pulseaudio-rs/issues/8)

Dominant language
Rust
Stars
4k
Forks
554
Avg merge
1d 3h
Merged PRs (30d)
1

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from RustAudio/cpal

All issues in RustAudio/cpal

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.