Hi. This is not a direct question of myself, but for my friend. My friend has a bluetooth speaker and bluetooth headphone. The issue she is facing with them:
The issue is that I set the configuration in Pulse Effects for the speakers, the bluetooth ones, not internal. Sounds right. But when I use my headphones this settings do not work and the sound is rather bad.
So I configure Pulse Effects again to fit the headphones
And then the speakers sound horrible.
The speakers suffer more than the headphones, but still.
Ideally I would want to have two profiles that could be swapped/switched automatically when I change the device.
I thought of making a script that sets the Pulse Effects preset when the device is swapped. I used Gst and here is the demo script I made to get devices:
Source code
import gi, sys
gi.require_version("Gst", "1.0")
from gi.repository import GLib, Gst
def device_edited(bus, message, arg):
if message.type == Gst.MessageType.DEVICE_ADDED:
device = message.parse_device_added()
print(f"You added device {device.get_display_name()}")
elif message.type == Gst.MessageType.DEVICE_REMOVED:
device = message.parse_device_removed()
print(f"You removed device {device.get_display_name()}")
return True
Gst.init(sys.argv)
monitor = Gst.DeviceMonitor()
bus = monitor.get_bus()
bus.add_watch(0, device_edited, None)
monitor.start()
devs = monitor.get_devices()
print("These are the devices you already have :")
for dev in devs:
print(dev.get_display_name())
print()
print("Running Loop")
GLib.MainLoop().run()
The problem is the script detects only the speaker and not the headphone. Later we came to that Pulse Effects can change presets based on device, and even it was not able to detect “headphone” as a device.
But I have seen (in Preferences > Sound) that the settings can show that my speakers are headphone, when I plug them.
1. Do you have any idea or tool or software or plugin that can change the audio profile/presets when the device is swapped?
2. How to detect headphones ? What changes do I need to make to my script?
Any kind of help is welcome