Skip to content

Add audio support#141

Draft
TahiTi wants to merge 6 commits intoThePorgs:devfrom
TahiTi:audio_support
Draft

Add audio support#141
TahiTi wants to merge 6 commits intoThePorgs:devfrom
TahiTi:audio_support

Conversation

@TahiTi
Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
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 😉

Comment thread exegol/utils/SoundUtils.py Outdated
Comment thread exegol/utils/SoundUtils.py Outdated
Comment thread exegol/utils/SoundUtils.py Outdated
Comment thread exegol/utils/SoundUtils.py Outdated
Comment thread exegol/model/ContainerConfig.py Outdated
Comment thread exegol/utils/SoundUtils.py Outdated
Copy link
Copy Markdown
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
Copy Markdown
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