Commit Graph

185 Commits

Author SHA1 Message Date
Brian 'morlenxus' Miculcy b386d7b911 e mixer - unmute on wheel volume change up/down on gadget
@feat
2020-11-11 15:45:34 +00:00
Carsten Haitzler 0b1c4100ef e gadgets - as per email to e-devbel - it's easier to fix old so rm new
new gadget infra--
2020-07-07 23:34:27 +01:00
Michael Bouchaud (yoz) fb23acf874 mixer: factorize backend emix infra
Summary:
The mixer gadgets suffer of a bad design between old and new gadget infra.
This commit refactorize the mixer backend to get only one instance
between old and new gadget. This resolve many problems as e_client_volume
integration or the default_sink choosen in one of this modules.
Now it will be easier to maintain this code and better support when we will
remove old gadget infra.

Reviewers: zmike, devilhorns, stephenmhouston

Reviewed By: zmike

Subscribers: cedric

Tags: #enlightenment-git

Differential Revision: https://phab.enlightenment.org/D7718
2019-03-18 08:54:42 -04:00
Carsten Haitzler 3b359b4ea7 mixer - put back parent process hunting for things like spotify 2019-01-16 16:40:20 +00:00
Carsten Haitzler a841544d03 e client mixer handling - fix segv where inputs/sink cause segvs
so i've been seeing this thing where inputs are deleted and then the
sink is appropriately deleted from clients but not all the client
windows it could have been on. the problem seems to manifest if
multiple windows come from the same app playing audio so the sink may
be assigned to only 1 window not all of them.

this seems to nuke the segv as the sink/input was being left dangling on a
window due to the logic in the add/del handling to give up when it finds the
first window target and not all of them.

so after a day or so of testing my segv's are gone. yay!

@fix.
2019-01-16 11:31:41 +00:00
Michael Bouchaud (yoz) 4cc4260c42 mixer: Add sink_input association on client add event
Summary:
As the pulseaudio sink could be created before the window, we list
sink_inputs from pulseaudio on client add event. This make to not miss
an association and provide the volume control feature as expected.

Reviewers: zmike, devilhorns

Reviewed By: zmike

Subscribers: cedric

Tags: #enlightenment-git

Differential Revision: https://phab.enlightenment.org/D7559
2019-01-10 11:34:23 +01:00
Carsten Haitzler 7c6702e2fd mixer - fix exe handler del and handle to stop crashes after mixer run
running emixer from the mixer module popup was resulting in crashes.
it was this exe event handler handle and leaving a dangling garbage
ptr after it was deleted.

@fix
2018-05-19 00:58:03 +09:00
Carsten Haitzler b9d166f804 use safer ecore_exe flags that close stdin/out/err if possible
this is specifically needed for wayland but is relevant to x with
startx too ... dont let processes that e runs like apps inherit
stdin/out/err as it may be a tty and thus allow apps to do nasty
things with that tty.

@fix
2017-09-23 23:10:35 +09:00
Carsten Haitzler da791a0bf5 e mixer - handle pulse exit/disconnect and not keep e client sinks
we keps e client sinks even if we were dicsonnected from pulse... this
caused fun crashes. fix

@fix
2017-08-20 01:02:03 +09:00
Stephen 'Okra' Houston 20f94cec74 Bryce/Gadgets: Add backlight, xkbswitch, and mixer gadgets. This should round out the core gadget ports.
All three of these gadgets are ports of the existing modules of the same name and are contained within those directories.  Once the move from shelves -> bryce and gadcon->gadgets is complete, backlight and mixer will likely need to go into the sysinfo gadget.
2017-05-11 17:13:15 -05:00
Marcel Hollerbach 56246e0f08 mixer: be prepared for sinks without any volume
for the case that a sink does not have any volume we would access
NULL[0], which leads to a crash, this fixes that.

fix T5298
2017-04-07 11:53:56 +02:00
Marcel Hollerbach 9745890a37 Revert "Revert "mixer: do not set back the value from emix once the drag is finished""
This reverts commit fba185798c.

There is not even a description why you reverted it. This is a bugfix
that fixed a bug. So talk to me what the issue is, but please stop
reverting commits silently.
2017-02-23 09:08:24 +01:00
Michael Bouchaud cb6ea9f747 e_client_volume: check volume setted after a slider drag 2017-02-23 00:36:17 +01:00
Michaël Bouchaud (yoz) fba185798c Revert "mixer: do not set back the value from emix once the drag is finished"
This reverts commit 8724313b8e.
2017-02-22 22:59:13 +01:00
Michaël Bouchaud (yoz) dbdf411b48 mixer: use VOLSET macro in volume output set 2017-02-22 22:59:13 +01:00
Michael Bouchaud 9320b0e4ea e_client_volume: forget to remove the separator 2017-02-20 01:48:40 +01:00
Michael Bouchaud 51a5ec4e6a e_client_volume: display a control per stream in the popup volume
This commit enhance the e_client_volume popup. Now you could see which sink
belongs to an e_client and allow you to control it. Sadly I haven't added a
scroller to this popup, I will add it later. Lots of calcs is needed to
display it correctly.
2017-02-20 02:23:16 +01:00
Michael Bouchaud 0a73905895 e_client_volume: add E_EVENT_CLIENT_VOLUME_SINK handler
This commit introduce 3 new handlers to e_client_volume API. These allow to
catch event about sink add, del and update
2017-02-20 02:21:14 +01:00
Michael Bouchaud 939ac0b93d e_client_volume: add sink_name_get API to e_client_volume 2017-02-20 00:46:59 +01:00
Mike Blumenkrantz 49d9cea5aa center menu-triggered volume popup on same zone as client 2016-11-07 11:26:46 -05:00
Michaël Bouchaud (yoz) be154b60c8 mixer: close the file descriptor on error.
CID: 1365407
2016-11-07 10:32:04 +01:00
Michaël Bouchaud (yoz) 568a676073 mixer: Don't sync volume sink with e_client if they have more than one.
If we got more than one volume sink in e_client and we change the volume
of one of them all sink of this e_client are updated to the same volume.
So don't update e_client volume if we got more than 1 sink.

T4821
2016-11-07 10:26:56 +01:00
Michaël Bouchaud (yoz) ec12cff9f4 mixer: fix a typo spotted by coverity
CID: 1365340
2016-11-07 10:19:28 +01:00
Michaël Bouchaud (yoz) 2a0b4dfbc4 mixer: fix coverity issues 2016-11-02 15:27:38 +01:00
Stefan Schmidt b13486599e mixer: remove unused variables 2016-10-31 11:34:31 +01:00
Stefan Schmidt f606935067 mixer: mark unused function parameter as such 2016-10-31 11:34:02 +01:00
Marcel Hollerbach 8724313b8e mixer: do not set back the value from emix once the drag is finished
emix can still have wrong values from pa, and thus the value will jump
back and later come back to the right pos:

Here a video of what is happening:
http://omicron.homeip.net/filedump/mixer_gadget_bug.ogv

Thank you morluxus!
2016-10-28 11:41:00 +02:00
Michaël Bouchaud (yoz) b2d67bd68a Revert "mixer: lock up the slider for the case a drag is in progress"
This reverts commit eed35d3c4f.

This is a bad workaround, I have fixed the issue so we don't need it
anymore.
2016-10-27 22:38:46 +02:00
Michaël Bouchaud (yoz) b65cb5df92 mixer: add volume control to e_client menu
Add a button to the window menu, when clicked this one make a new window to
control the volume of the app.

@features
2016-10-27 22:34:17 +02:00
Michaël Bouchaud (yoz) 307f0831ce mixer: use the new e_client api to export volume control by app.
We use the pulseaudio backend to export volume control by app.
This commit introduce 3 news shortcuts to control the volume with the current
focused window.

@features
2016-10-27 21:54:40 +02:00
Marcel Hollerbach 838dde02ee mixer: we changed that name when we merged the mixer in 2016-10-11 14:16:53 +02:00
Marcel Hollerbach eed35d3c4f mixer: lock up the slider for the case a drag is in progress
if you click on the slider in the gadget the slider jumps a back to the
old volume and then to the new volume, this is because a pulseaudio
update is sent while the last changed event was called, but not the
drag_stop callback.
2016-09-14 10:43:17 +02:00
Marcel Hollerbach 1a3086b2c2 mixer: introduce emix_max_volume_get
This lets the module decide what its maximum value is.
Everything over 100% is considered overloading. And is protected by the
mixer and the gadget.
2016-09-07 11:05:11 +02:00
Marcel Hollerbach 1da2bbcd9c mixer: introduce Barrier checks
in this barrier checks the module checks that the user is explicit going
over the value of 100%
2016-09-07 11:05:11 +02:00
Mike Blumenkrantz b64a637428 allow mixer volume increase actions to exceed 100%
ref 0bbb20a3be

cc @raster probably should have some kind of theme indicator in the theme
for "high" volumes > 100%
2016-04-18 11:44:52 -04:00
Mike Blumenkrantz d1d30029d1 select mixer popup sink after popup has been fully initialized
attempting to select too early results in callbacks being triggered
before various widgets are available
2016-01-08 12:05:41 -05:00
Marcel Hollerbach f174008a83 mixer: only save state if not in init
If we are calling emix_config_save_state_get while in init, we are
freeing the list emix_config_save_state_restore is iterating over.
This leads to crashes.

@fix T2942
@fix T2906
2015-12-18 13:21:08 +01:00
Mike Blumenkrantz 3ad521ab9c ensure that all mixer volumes resolve to the appropriate gadget icon
reported by Jef91 in #e
2015-11-11 11:54:58 -05:00
Marcel Hollerbach 2fd6f95a9b mixer: start app from bin directory
before the app was installed into the modules directory, now its
installed to the bin directory
2015-10-13 22:06:00 +02:00
Carsten Haitzler 9c5b6acb05 e mixer - be more robust if pulse exits/crashes and def sink is null
ensure there are protections everywhere for when default sink is null
- mixer did crash when pulse crashed and a popup was to be shown...
2015-10-10 11:07:24 +09:00
Carsten Haitzler 2a0b1c024b e mixer - save state when we get change events too
this plugs a gap where wrong state is saved.
2015-09-06 20:04:22 +09:00
Carsten Haitzler 04496541c4 e mixer - fix up saving to save everything
as pointed out by jackdanielsz and bu5hm4n - this doesnt save
everything. like all the outputs and ports and... so now it does.
everything is saved and restored is "remember" is enabled. now
everything should be fine.
2015-09-02 18:31:44 +09:00
Carsten Haitzler f18d9258fc e mixer - discovered bug as a lack of feature - does not remember volume
i have never seen this before until last night. on some systems audio
starts up volume 0 and muted (either or) and thus on login the volume
is not where you left it and you have to manually fix it every time.
this fixes this by having mixer remember the last volume and mute
state you set (option to enable/disable too) and handles "upgrading"
to remember by default if you have old config

@feature / @fix
2015-09-02 12:49:42 +09:00
Carsten Haitzler bdcbf06b0f e - mixer - fix leak when seting volume
fixes a lieak i spotted in mixer after moving to epulse core. fix for
e20
2015-09-02 00:03:57 +09:00
Marcel Hollerbach 5675ed26cd mixer: Fix segfault when backend does not have any sink 2015-08-10 19:25:27 +02:00
Marcel Hollerbach 0a26246848 mixer: this if does not make much sense 2015-08-10 19:14:51 +02:00
Carsten Haitzler 0bbb20a3be e - mixer - allow to 150% volume with some "stickynedd" from 100 to 120 2015-06-14 15:01:44 +09:00
Carsten Haitzler 921d4dee2b e - mixer - clean up popup a bit with mute next to slider etc. 2015-06-09 17:22:40 +09:00
Carsten Haitzler dd6e4f33f8 e mixer - fix segv on desklock if default sink not set yet 2015-06-09 16:18:24 +09:00
Carsten Haitzler 5d7fa51309 mixer - dont make list scrollable horizontally for nicer look 2015-06-09 16:17:07 +09:00