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

[Audio] Add piped audio stream and fix raw PCM streams format #3960

Merged
merged 5 commits into from Jan 7, 2024

Conversation

GiviMAD
Copy link
Member

@GiviMAD GiviMAD commented Dec 25, 2023

Hello,

I want to add a new audio stream implementation to send infinite audio streams and multiplex its data to the different consumers. At the same time I discovered I had committed an error across all the source implementations which is create its format using the CONTAINER_WAV while those streams are raw pcm streams and should use the CONTAINER_NONE instead (I don't think it needs to be treated as a bug and back-ported because I was consistent with the error and it has no effect on the 4.1.x code).

I'm going to open a PR in the add-ons to adapt them to these changes.

The use cases for the new stream type are:

  • Be consistent across the source implementations because both the built-in system source and the pulseaudio binding source are using the same mechanism for sharing data, and I'm planning on try to add another one and it requires same mechanism either.
  • Been able to send infinite streams and handle them in a specific way; I want to use these to be able to connect a source with a sink and also to try to stream music from the server.

@GiviMAD GiviMAD requested a review from a team as a code owner December 25, 2023 12:41
@wborn wborn added the enhancement An enhancement or new feature of the Core label Dec 30, 2023
@GiviMAD GiviMAD force-pushed the audio/piped_audio_fix_pcm branch 2 times, most recently from 8b667c4 to 33b9703 Compare December 31, 2023 15:01
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
@GiviMAD
Copy link
Member Author

GiviMAD commented Jan 5, 2024

I have rebased the PR to remove a comment change that has been already fixed at main and was not related.

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
@kaikreuzer kaikreuzer self-assigned this Jan 6, 2024
Copy link
Member

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

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

Thanks, looks good to me, I've added mainly some JavaDoc improvements.

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
@GiviMAD
Copy link
Member Author

GiviMAD commented Jan 7, 2024

I have added a size method to check the number of streams in the group in case is needed.

Copy link
Member

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

@kaikreuzer kaikreuzer merged commit 3c61c1d into openhab:main Jan 7, 2024
3 checks passed
@kaikreuzer kaikreuzer added this to the 4.2 milestone Jan 7, 2024
cipianpascu pushed a commit to cipianpascu/openhab-core that referenced this pull request Jan 17, 2024
…b#3960)

* [Audio] Add piped audio stream and fix pcm format usage

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
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 of the Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants