Skip to content

Commit

Permalink
fix: pulse, mount socket path even when we are not in charge of start…
Browse files Browse the repository at this point in the history
…ing the container
  • Loading branch information
ABeltramo committed Oct 29, 2023
1 parent 9796efe commit 9ced011
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/wolf/wolf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ std::optional<AudioServer> setup_audio_server(const std::string &runtime_dir) {
.status = docker::CREATED,
.ports = {},
.mounts = {docker::MountPoint{.source = runtime_dir, .destination = "/tmp/pulse/", .mode = "rw"}},
.env = {{"XDG_RUNTIME_DIR", runtime_dir}}},
.env = {"XDG_RUNTIME_DIR=/tmp/pulse/"}},
// The following is needed when using podman (or any container that uses SELINUX). This way we can access the
// socket that is created by PulseAudio from other containers (including this one).
R"({
Expand Down Expand Up @@ -227,11 +227,8 @@ auto setup_sessions_handlers(const immer::box<state::AppState> &app_state,
auto audio_server_name = audio_server ? audio::get_server_name(audio_server->server) : "";
full_env.set("PULSE_SINK", pulse_sink_name);
full_env.set("PULSE_SOURCE", pulse_sink_name + ".monitor");

if (audio_server->container) {
full_env.set("PULSE_SERVER", audio_server_name);
mounted_paths.push_back({audio_server_name, audio_server_name});
}
full_env.set("PULSE_SERVER", audio_server_name);
mounted_paths.push_back({audio_server_name, audio_server_name});

auto render_node = session->app->render_node;

Expand Down

0 comments on commit 9ced011

Please sign in to comment.