Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add audio support #141

Draft
wants to merge 6 commits into
base: dev
Choose a base branch
from
Draft

Add audio support #141

wants to merge 6 commits into from

Conversation

TahiTi
Copy link

@TahiTi TahiTi commented Feb 23, 2023

Description

Adding audio support to containers using PulseAudio server socket.

Point of attention

TODO :

  • find pulseAudio path for Windows/WSL
  • add MacOS support

@TahiTi TahiTi changed the base branch from master to dev February 23, 2023 14:38
if not self.__enable_sound:
logger.verbose("Config: Enabling sound sharing")
try:
self.addVolume(SoundUtils.getPulseAudioSocketPath(), "/run/user/0/pulse/native", must_exist=False)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why must_exist is set to False here ? Shouldn't be True instead ?
If the socket is not present, the feature cannot be activated.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just below, he left a commented FIXME, indicating that a solution must be found here. In it's current state and in this context, the addVolume function raises an error when must_exist is True 😉

exegol/utils/SoundUtils.py Outdated Show resolved Hide resolved
exegol/utils/SoundUtils.py Outdated Show resolved Hide resolved
exegol/utils/SoundUtils.py Outdated Show resolved Hide resolved
exegol/utils/SoundUtils.py Outdated Show resolved Hide resolved
exegol/model/ContainerConfig.py Outdated Show resolved Hide resolved
exegol/utils/SoundUtils.py Outdated Show resolved Hide resolved
Copy link
Member

@ShutdownRepo ShutdownRepo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TahiTi forgot to edit this PR to a draft, doing it now

if not self.__enable_sound:
logger.verbose("Config: Enabling sound sharing")
try:
self.addVolume(SoundUtils.getPulseAudioSocketPath(), "/run/user/0/pulse/native", must_exist=False)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just below, he left a commented FIXME, indicating that a solution must be found here. In it's current state and in this context, the addVolume function raises an error when must_exist is True 😉

@ShutdownRepo ShutdownRepo marked this pull request as draft February 23, 2023 16:42
@ShutdownRepo ShutdownRepo added enhancement New feature or request coming soon labels Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sound sharing support
3 participants