Closed mraerino closed 4 years ago
Thanks.
I'll probably tweak it a bit to not have extra _method there, accept None as default sink and volume as the usual float arg.
Also, wonder if you might want to use libcanberra for such samples instead - check it out, if you haven't.
thanks for the really fast merge! are you going to do a release?
Yup, just did, should be 20.1.2 on pypi (when it updates its caches).
Check out 47767121 btw for changes in the fuction signature. Should work with same args as you had though, but sink is optional (None = default one) and allows for volume/proplist.
Loading sample via pulse API is probably way too complicated for this module, as you'd probably want to look it up in XDG theme dirs, add some proplist stuff from that, then decode whatever format (mp3, ogg, flac, wav, etc) and send that to pulse in async fashion, but guess you already do loading via some other means.
This exposes the c api command
pa_context_play_sample
from the librarythe volume parameter is actually different than in other commands so I decided to always pass "keep volume".