Skip to content

Conversation

@yara-blue
Copy link
Member

Its basically the same as the microphone builder. It will replace the OutputStream. In the future we'll add more abstractions on top. Until its done it lives under an experimental flag.

Names are subject to change too, Speakers is probably not ideal but it conveys the meaning better then OutputStream. I'm thinking of having a Source -> Stream -> Sink terminolgy where a Sink could be the audio card, the network or a file (the wavwriter).

Copy link
Member

@roderickvd roderickvd left a comment

Choose a reason for hiding this comment

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

In RustAudio/cpal#956 I was also toying around with the idea of a StreamConfigBuilder - let me know how we can align those efforts!

@roderickvd
Copy link
Member

As for naming, here are some suggestions:

  • OutputBuilder, InputBuilder, Output, Input
  • PlaybackBuilder, CaptureBuilder, Playback, Capture

If we want to use Source → Stream → Sink terminology (pretty accurate actually) then to disambiguate we should rename the existing Sink to something like MixerQueue, AudioQueue, or QueuedOutput.

yara-blue and others added 9 commits January 3, 2026 00:18
Its basically the same as the microphone builder. It will replace the
OutputStream. In the future we'll add more abstractions on top. Until
its done it lives under an experimental flag.

Names are subject to change too, Speakers is probably not ideal but it
conveys the meaning better then OutputStream. I'm thinking of having a
Source -> Stream -> Sink terminolgy where a Sink could be the audio
card, the network or a file (the wavwriter).
@yara-blue
Copy link
Member Author

If we want to use Source → Stream → Sink terminology (pretty accurate actually) then to disambiguate we should rename the existing Sink to something like MixerQueue, AudioQueue, or QueuedOutput.

Agreed, we should. Sink would be the perfect name for this "concept". We can have a file sink as well (the current to_wav thing). We can do that after merging this though.

Its already pretty big. Makes sense to land it as is and then tweak as I use it. The next thing I'd like to add after this is a new Source trait called FixedSource.

Hit that merge button if you think we can get it in.

Copy link
Member

@roderickvd roderickvd left a comment

Choose a reason for hiding this comment

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

I found a few last points.

@yara-blue yara-blue requested a review from roderickvd January 3, 2026 22:12
@yara-blue
Copy link
Member Author

Thanks for the review, should be good to merge now :)

Copy link
Member

@roderickvd roderickvd left a comment

Choose a reason for hiding this comment

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

LGTM

@yara-blue yara-blue merged commit 600962d into master Jan 3, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants