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

Added Pulse.get_sink_by_name and Pulse.get_source_by_name #17

Merged
merged 1 commit into from
Sep 20, 2017

Conversation

natesymer
Copy link
Contributor

I am writing a tool for implementing the function row in Python. To do so, I needed some extra functionality from libpulse, the ability to get a sink given a name.

Yes, I know one could get a list of all the sinks and search them, but, what happens if you want to do this multiple times per second? What happens if you want to use things like @DEFAULT_SINK@? You need to use pa_get_sink_info_by_name(). Using a patched version of pulsectl with this function wrapped gave me a 33% reduction in average memory use for my program.

I urge you to merge this.

@mk-fg mk-fg merged commit 32a5444 into mk-fg:master Sep 20, 2017
@mk-fg
Copy link
Owner

mk-fg commented Sep 20, 2017

Thanks!

Indeed, it should be much less code and much more efficient and robust (esp. with large number of sinks/sounrces) than iteration/filtering.
Only reason these funcs were not wrapped is because things get added here on as-needed basis (as libpulse has a ton of stuff), and no one mentioned them yet :)

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.

None yet

2 participants