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 PipeWire support #16

Merged
merged 4 commits into from
Dec 25, 2022
Merged

Add PipeWire support #16

merged 4 commits into from
Dec 25, 2022

Conversation

diamondburned
Copy link
Contributor

Usage: gr -b pipewire -d 'he400i-rtings-sink.eq'

@diamondburned
Copy link
Contributor Author

Words cannot describe how cursed some of the code I just wrote are.

@diamondburned
Copy link
Contributor Author

@diamondburned
Copy link
Contributor Author

Current issues:

  • Once a device is disconnected and reconnected, pw-cat will make no attempt to relink it.
  • This doesn't work with devices that have >2 ports (Focusrite 4i4, etc.)

input/pipewire/pipewire.go Outdated Show resolved Hide resolved
input/pipewire/dump.go Outdated Show resolved Hide resolved
@noriah noriah added the enhancement New feature or request label Dec 21, 2022
noriah
noriah previously requested changes Dec 24, 2022
Copy link
Owner

@noriah noriah left a comment

Choose a reason for hiding this comment

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

Ignore this review please

@noriah noriah self-requested a review December 24, 2022 22:04
@noriah noriah dismissed their stale review December 24, 2022 22:04

ignore this for now. something buggy

Copy link
Owner

@noriah noriah left a comment

Choose a reason for hiding this comment

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

Small changes

input/common/execread/execread.go Outdated Show resolved Hide resolved
dst[n%framesz][n/framesz] = reader.next()
}
mu.Unlock()
sampleDuration := time.Duration(
Copy link
Owner

@noriah noriah Dec 24, 2022

Choose a reason for hiding this comment

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

currently the way the buffer is read means this will sometimes be too short. can we double this (or just 1.5x) for now and fix it properly later with some refactoring?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I made it so that it's 2x until the read expires once, then it's 1x for all future deadlines until it's sending samples again.

@noriah noriah merged commit 2c7b8be into noriah:main Dec 25, 2022
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.

None yet

2 participants