Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-12-26 14:44:46

77as40um4bnr
Member
Registered: 2019-12-26
Posts: 7

Changing audio output with PulseAudio plugin and Media Keys

Hello there!

I've got a problem with changing my audio output with pulseaudio plugin. There is only a volume bar and no dropdown or whatever to pick output from. I've got headphones and speakers connected at the same time and I've configured pulseaudio to make them independent. Previously I was using Gnome DE with Audio Output Switcher extension and it worked just like I wanted.
I can change my output through pavucontrol -> output devices -> port but it's not that comfortable to do. I have also tried pasystray I've read about on my search journey about that problem but it doesn't show my output devices only default audio sink.
Is there any way to make pulseaudio plugin to show my output devices or with some other plugin?

Without making another post there is another problem. My mouse has 3 buttons that work as media keys on keyboard like play/pause, next song, previous song. It's working very well with my music player (Audacious) but I want those keys to work with music player only. If I have opened another media program like SMPlayer media keys work with both SMPlayer and Audacious which is what I don't want to happen. On gnome there was kinda application capturing like if I opened Audacious media keys worked only with it even if I would open SMPlayer and same goes the other way around. Here on XFCE it works fully globally. Can I make it work like on gnome or just assing media keys to Audacious?

Offline

#2 2019-12-26 15:10:59

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,015

Re: Changing audio output with PulseAudio plugin and Media Keys

Hello and welcome. I'll try to answer the first question.

77as40um4bnr wrote:

I've got a problem with changing my audio output with pulseaudio plugin. There is only a volume bar and no dropdown or whatever to pick output from.

Which version of the plugin are you running? As of version 0.3.1, a device selection dropdown was added to the plugin.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2019-12-26 15:14:11

77as40um4bnr
Member
Registered: 2019-12-26
Posts: 7

Re: Changing audio output with PulseAudio plugin and Media Keys

Thanks for a quick reply.

It's 0.4.2.

Offline

#4 2019-12-26 15:18:32

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,015

Re: Changing audio output with PulseAudio plugin and Media Keys

And you don't have a dropdown like this one?
screenshot.png


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2019-12-26 15:21:22

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,015

Re: Changing audio output with PulseAudio plugin and Media Keys

77as40um4bnr wrote:

Without making another post there is another problem. My mouse has 3 buttons that work as media keys on keyboard like play/pause, next song, previous song. It's working very well with my music player (Audacious) but I want those keys to work with music player only. If I have opened another media program like SMPlayer media keys work with both SMPlayer and Audacious which is what I don't want to happen. On gnome there was kinda application capturing like if I opened Audacious media keys worked only with it even if I would open SMPlayer and same goes the other way around. Here on XFCE it works fully globally. Can I make it work like on gnome or just assing media keys to Audacious?

The pulseaudio plugin has an option to manage multimedia keys (Properties > Media Players > Enable multimedia keys for playback control). Does flipping that option make a difference?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#6 2019-12-26 15:26:46

77as40um4bnr
Member
Registered: 2019-12-26
Posts: 7

Re: Changing audio output with PulseAudio plugin and Media Keys

ToZ wrote:

And you don't have a dropdown like this one?

No, I don't, only volume bar and media applications.

ToZ wrote:
77as40um4bnr wrote:

Without making another post there is another problem. My mouse has 3 buttons that work as media keys on keyboard like play/pause, next song, previous song. It's working very well with my music player (Audacious) but I want those keys to work with music player only. If I have opened another media program like SMPlayer media keys work with both SMPlayer and Audacious which is what I don't want to happen. On gnome there was kinda application capturing like if I opened Audacious media keys worked only with it even if I would open SMPlayer and same goes the other way around. Here on XFCE it works fully globally. Can I make it work like on gnome or just assing media keys to Audacious?

The pulseaudio plugin has an option to manage multimedia keys (Properties > Media Players > Enable multimedia keys for playback control). Does flipping that option make a difference?

Yes, i tinkered with it. If it's enabled every media app is controlled with media keys, if disabled not a single one works.

Offline

#7 2019-12-27 00:48:29

Skaperen
Member
From: right by Jesus, our Saviour
Registered: 2013-06-15
Posts: 819

Re: Changing audio output with PulseAudio plugin and Media Keys

i don't have much of a dropdown, either.  but i haven't pursued it since i use pavucontrol and keep an instance ready and running all the time.

Offline

#8 2019-12-27 01:10:33

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,015

Re: Changing audio output with PulseAudio plugin and Media Keys

77as40um4bnr wrote:
ToZ wrote:

And you don't have a dropdown like this one?

No, I don't, only volume bar and media applications.

What sinks does pulseaudio show?

pacmd list-sinks | grep -A1 index

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#9 2019-12-27 14:48:04

77as40um4bnr
Member
Registered: 2019-12-26
Posts: 7

Re: Changing audio output with PulseAudio plugin and Media Keys

  * index: 0
	name: <alsa_output.pci-0000_00_1b.0.analog-stereo>

Offline

#10 2019-12-27 16:30:15

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,015

Re: Changing audio output with PulseAudio plugin and Media Keys

77as40um4bnr wrote:
  * index: 0
	name: <alsa_output.pci-0000_00_1b.0.analog-stereo>

That's why you don't have a drop-down showing available devices in the plugin, pulseaudio only shows one available sink (the dropdown is hidden if only one sink is available).

Earlier you mentioned that you configured pulseaudio to make the headphones and speakers independent. I guess this doesn't make them show up as separate sinks?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#11 2019-12-27 16:38:19

77as40um4bnr
Member
Registered: 2019-12-26
Posts: 7

Re: Changing audio output with PulseAudio plugin and Media Keys

ToZ wrote:

That's why you don't have a drop-down showing available devices in the plugin, pulseaudio only shows one available sink (the dropdown is hidden if only one sink is available).

Ok then, is there any way to unhide it? It's the same audio setup I had on Gnome and it didn't bother with me having only one audio sink.

ToZ wrote:

Earlier you mentioned that you configured pulseaudio to make the headphones and speakers independent. I guess this doesn't make them show up as separate sinks?

No, but they are listed under output devices in pavucontrol as different ports. I see no reason why wouldn't they be under pulseaudio plugin dropdown if I can change them in pavucontrol.

Offline

#12 2019-12-27 17:43:18

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,015

Re: Changing audio output with PulseAudio plugin and Media Keys

77as40um4bnr wrote:
ToZ wrote:

That's why you don't have a drop-down showing available devices in the plugin, pulseaudio only shows one available sink (the dropdown is hidden if only one sink is available).

Ok then, is there any way to unhide it? It's the same audio setup I had on Gnome and it didn't bother with me having only one audio sink.

Not that I am aware of. It will unhide if more than one sink is available.

ToZ wrote:

Earlier you mentioned that you configured pulseaudio to make the headphones and speakers independent. I guess this doesn't make them show up as separate sinks?

No, but they are listed under output devices in pavucontrol as different ports. I see no reason why wouldn't they be under pulseaudio plugin dropdown if I can change them in pavucontrol.

It looks like a bug report / enhancement request already exists for this added functionality.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#13 2019-12-27 18:54:29

77as40um4bnr
Member
Registered: 2019-12-26
Posts: 7

Re: Changing audio output with PulseAudio plugin and Media Keys

ToZ wrote:

Not that I am aware of. It will unhide if more than one sink is available.

Ok. Pardon my ignorance but can I 'make' a new sink, so i can use pulseaudio plugin's functionality to switch my output devices easily?

ToZ wrote:

It looks like a bug report / enhancement request already exists for this added functionality.

Indeed there is and it's over 2 years old now. I'm not sure whether I bump that old thread or make a new one.

What about media keys? Do you know of a way to 'attach' them to certain application only?

Offline

#14 2019-12-28 00:05:16

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,015

Re: Changing audio output with PulseAudio plugin and Media Keys

77as40um4bnr wrote:

Ok. Pardon my ignorance but can I 'make' a new sink, so i can use pulseaudio plugin's functionality to switch my output devices easily?

I'm not that familiar with pulseaudio configuration. Here is a thread post on doing something similar. Perhaps this is helpful.

Indeed there is and it's over 2 years old now. I'm not sure whether I bump that old thread or make a new one.

Add your comment to the bug report to bump the developer.

What about media keys? Do you know of a way to 'attach' them to certain application only?

Not sure if this is possible through Xfce, but what if you just cleared the media key shortcuts in SMPlayer?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#15 2019-12-28 02:02:15

MrEen
Member
Registered: 2019-04-19
Posts: 295

Re: Changing audio output with PulseAudio plugin and Media Keys

I don't know if this is a workable solution for you, but you could use something like the following to change the ports which could then be tied to keyboard shortcuts:

pacmd set-sink-port alsa_output.pci-0000_00_1b.0.analog-stereo analog-output-headphones

and:

pacmd set-sink-port alsa_output.pci-0000_00_1b.0.analog-stereo analog-output-lineout

Offline

#16 2019-12-29 20:37:38

77as40um4bnr
Member
Registered: 2019-12-26
Posts: 7

Re: Changing audio output with PulseAudio plugin and Media Keys

Ok, I will bump that thread.

No, clearing keys in SMPlayer seem to have literally no effect. I've both cleared keyboard shortcuts and disabled global media keys tickbox and they still work.

Thank you, MrEen, for that, I will surely settle with that solution.

Offline

Board footer

Powered by FluxBB