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

[pulseaudio] Make the process method asynchronous #15179

Merged
merged 2 commits into from
Jul 6, 2023

Conversation

dalgwen
Copy link
Contributor

@dalgwen dalgwen commented Jul 4, 2023

Following some rewrite with openhab/openhab-core#3461

  • Makes the process method a little bit asynchronous, and uses the new 'complete' system to signal core that the sound is fully played.
  • Supports more stream class (and not only the arbitrary FixedLengthAudioStream)
  • Use Disposable to get rid of deletable resource used by stream.

Implementation remark : I do not use AudioSinkSync or AudioSinkAsync as a base class because the PulseAudioAudioSink already extends another class. Separing concern does not seem a good idea as it breaks the symetry with AudioSource.

And use the new 'complete' system to signal core that the sound is fully played.

Signed-off-by: Gwendal Roulleau <[email protected]>
@dalgwen dalgwen requested a review from peuter as a code owner July 4, 2023 21:04
@dalgwen dalgwen mentioned this pull request Jul 4, 2023
13 tasks
Apply code review

Signed-off-by: Gwendal Roulleau <[email protected]>
Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

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

LGTM, thank you

@lolodomo lolodomo merged commit 94a761f into openhab:main Jul 6, 2023
@lolodomo lolodomo added the enhancement An enhancement or new feature for an existing add-on label Jul 6, 2023
@lolodomo lolodomo added this to the 4.0 milestone Jul 6, 2023
@dalgwen dalgwen deleted the pulseaudio_sink branch July 8, 2023 06:53
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request Jul 8, 2023
* [pulseaudio] Make the process method asynchronous

And use the new 'complete' system to signal core that the sound is fully played.

---------

Signed-off-by: Gwendal Roulleau <[email protected]>
matchews pushed a commit to matchews/openhab-addons that referenced this pull request Aug 9, 2023
* [pulseaudio] Make the process method asynchronous

And use the new 'complete' system to signal core that the sound is fully played.

---------

Signed-off-by: Gwendal Roulleau <[email protected]>
Signed-off-by: Matt Myers <[email protected]>
austvik pushed a commit to austvik/openhab-addons that referenced this pull request Mar 27, 2024
* [pulseaudio] Make the process method asynchronous

And use the new 'complete' system to signal core that the sound is fully played.

---------

Signed-off-by: Gwendal Roulleau <[email protected]>
Signed-off-by: Jørgen Austvik <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants