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

deej.unmapped controls master when using bluetooth speakers #65

Open
cerahmed opened this issue Apr 15, 2023 · 4 comments
Open

deej.unmapped controls master when using bluetooth speakers #65

cerahmed opened this issue Apr 15, 2023 · 4 comments

Comments

@cerahmed
Copy link

Hey there,

I've been using a usb speaker (Pebble V3) as my main desktop speaker. This speaker can operate using USB or Bluetooth.
Today I have switched to using it over Bluetooth, and noticed that when using it as a bluetooth speaker, deej.unmapped control the speakers volume (which is master).

I switched to a wired headset and deej.unmapped worked as expected (does not control master volume).

This is a bit strange, I'm wondering if you came across this issue and have ways to solve it.

Thanks again and again (and again) for this great utility that has been treating me very well for quite some time now :)

@omriharel
Copy link
Owner

omriharel commented Apr 15, 2023 via email

@cerahmed
Copy link
Author

cerahmed commented Apr 16, 2023

Thanks for your quick response, @omriharel.
Appreciate your efforts in following up and updating the software.

So I went ahead and debugged the issue, the following information is basically what is of interest (copied after rotating the master knob):

2023-04-16 16:10:16.425 DEBUG   deej.sessions.master            Created audio session instance  {"session": "<session: master, vol: 0.53>"}
2023-04-16 16:10:16.425 DEBUG   deej.sessions.mic               Created audio session instance  {"session": "<session: mic, vol: 1.00>"}
2023-04-16 16:10:16.426 DEBUG   deej.session_finder             Enumerated device info  {"deviceIdx": 0, "deviceDescription": "headphones", "deviceFriendlyName": "Headphones (Realtek USB2.0 Audio)", "dataFlow": 0}
2023-04-16 16:10:16.426 DEBUG   deej.session_finder             Enumerating and adding process sessions for audio output device {"deviceFriendlyName": "Headphones (Realtek USB2.0 Audio)"}
2023-04-16 16:10:16.427 DEBUG   deej.session_finder             Got session count from session enumerator       {"count": 4}
2023-04-16 16:10:16.434 DEBUG   deej.sessions.rainmeter         Created audio session instance  {"session": "<session: Rainmeter.exe (pid 29048), vol: 1.00>"}
2023-04-16 16:10:16.440 DEBUG   deej.sessions.signalrgb         Created audio session instance  {"session": "<session: SignalRgb.exe (pid 17256), vol: 1.00>"}
2023-04-16 16:10:16.446 DEBUG   deej.sessions.discord           Created audio session instance  {"session": "<session: Discord.exe (pid 6112), vol: 0.30>"}
2023-04-16 16:10:16.447 DEBUG   deej.sessions.system            Created audio session instance  {"session": "<session: system sounds, vol: 1.00>"}
2023-04-16 16:10:16.447 DEBUG   deej.sessions.device.headphones Created audio session instance  {"session": "<session: Headphones (Realtek USB2.0 Audio), vol: 0.59>"}
2023-04-16 16:10:16.448 DEBUG   deej.session_finder             Enumerated device info  {"deviceIdx": 1, "deviceDescription": "headphones", "deviceFriendlyName": "Headphones ( Pebble V3\r\n)", "dataFlow": 0}
2023-04-16 16:10:16.448 DEBUG   deej.session_finder             Enumerating and adding process sessions for audio output device {"deviceFriendlyName": "Headphones ( Pebble V3\r\n)"}
2023-04-16 16:10:16.448 DEBUG   deej.session_finder             Got session count from session enumerator       {"count": 10}
2023-04-16 16:10:16.456 DEBUG   deej.sessions.epicpen           Created audio session instance  {"session": "<session: EpicPen.exe (pid 20800), vol: 1.00>"}
2023-04-16 16:10:16.464 DEBUG   deej.sessions.epicpen           Created audio session instance  {"session": "<session: EpicPen.exe (pid 20800), vol: 1.00>"}
2023-04-16 16:10:16.479 DEBUG   deej.sessions.signalrgb         Created audio session instance  {"session": "<session: SignalRgb.exe (pid 17256), vol: 1.00>"}
2023-04-16 16:10:16.484 DEBUG   deej.sessions.discord           Created audio session instance  {"session": "<session: Discord.exe (pid 6112), vol: 0.30>"}
2023-04-16 16:10:16.488 DEBUG   deej.sessions.obs64             Created audio session instance  {"session": "<session: obs64.exe (pid 2616), vol: 1.00>"}
2023-04-16 16:10:16.493 DEBUG   deej.sessions.epicpen           Created audio session instance  {"session": "<session: EpicPen.exe (pid 20800), vol: 1.00>"}
2023-04-16 16:10:16.498 DEBUG   deej.sessions.discord           Created audio session instance  {"session": "<session: Discord.exe (pid 29656), vol: 0.30>"}
2023-04-16 16:10:16.503 DEBUG   deej.sessions.chrome            Created audio session instance  {"session": "<session: chrome.exe (pid 25000), vol: 0.07>"}
2023-04-16 16:10:16.508 DEBUG   deej.sessions.epicpen           Created audio session instance  {"session": "<session: EpicPen.exe (pid 20800), vol: 1.00>"}
2023-04-16 16:10:16.509 DEBUG   deej.sessions.system            Created audio session instance  {"session": "<session: system sounds, vol: 1.00>"}
2023-04-16 16:10:16.509 DEBUG   deej.sessions.device.headphones Created audio session instance  {"session": "<session: Headphones ( Pebble V3\r\n), vol: 0.53>"}
2023-04-16 16:10:16.509 DEBUG   deej.session_finder             Enumerated device info  {"deviceIdx": 2, "deviceDescription": "microphone", "deviceFriendlyName": "Microphone (HyperX QuadCast S)", "dataFlow": 1}
2023-04-16 16:10:16.509 DEBUG   deej.sessions.device.microphone Created audio session instance  {"session": "<session: Microphone (HyperX QuadCast S), vol: 1.00>"}
2023-04-16 16:10:16.509 DEBUG   deej.sessions                   Tracking unmapped session       {"session": "<session: Rainmeter.exe (pid 29048), vol: 1.00>"}
2023-04-16 16:10:16.509 DEBUG   deej.sessions                   Tracking unmapped session       {"session": "<session: SignalRgb.exe (pid 17256), vol: 1.00>"}
2023-04-16 16:10:16.510 DEBUG   deej.sessions                   Tracking unmapped session       {"session": "<session: EpicPen.exe (pid 20800), vol: 1.00>"}
2023-04-16 16:10:16.510 DEBUG   deej.sessions                   Tracking unmapped session       {"session": "<session: EpicPen.exe (pid 20800), vol: 1.00>"}
2023-04-16 16:10:16.510 DEBUG   deej.sessions                   Tracking unmapped session       {"session": "<session: SignalRgb.exe (pid 17256), vol: 1.00>"}
2023-04-16 16:10:16.510 DEBUG   deej.sessions                   Tracking unmapped session       {"session": "<session: obs64.exe (pid 2616), vol: 1.00>"}
2023-04-16 16:10:16.510 DEBUG   deej.sessions                   Tracking unmapped session       {"session": "<session: EpicPen.exe (pid 20800), vol: 1.00>"}
2023-04-16 16:10:16.510 DEBUG   deej.sessions                   Tracking unmapped session       {"session": "<session: EpicPen.exe (pid 20800), vol: 1.00>"}
2023-04-16 16:10:16.510 DEBUG   deej.sessions                   Tracking unmapped session       {"session": "<session: Headphones ( Pebble V3\r\n), vol: 0.53>"}
2023-04-16 16:10:16.510 INFO    deej.sessions                   Got all audio sessions successfully     {"sessionMap": "<19 audio sessions>"}

A few explanation that might help in reading the debug output:

  1. My current master (default output) device is the Pebble V3, currently set at 0.53.
  2. My current default mic device is HyperX Quadcast S, set at 1.0.
  3. The unmapped knob is set at 1.0 at the time of copying the debug output.

And the following was copied after rotating ONLY the unmapped knob:

2023-04-16 16:10:16.425 DEBUG   deej.sessions.master            Created audio session instance  {"session": "<session: master, vol: 0.53>"}
2023-04-16 16:10:16.425 DEBUG   deej.sessions.mic               Created audio session instance  {"session": "<session: mic, vol: 1.00>"}
2023-04-16 16:10:16.426 DEBUG   deej.session_finder             Enumerated device info  {"deviceIdx": 0, "deviceDescription": "headphones", "deviceFriendlyName": "Headphones (Realtek USB2.0 Audio)", "dataFlow": 0}
2023-04-16 16:10:16.426 DEBUG   deej.session_finder             Enumerating and adding process sessions for audio output device {"deviceFriendlyName": "Headphones (Realtek USB2.0 Audio)"}
2023-04-16 16:10:16.427 DEBUG   deej.session_finder             Got session count from session enumerator       {"count": 4}
2023-04-16 16:10:16.434 DEBUG   deej.sessions.rainmeter         Created audio session instance  {"session": "<session: Rainmeter.exe (pid 29048), vol: 1.00>"}
2023-04-16 16:10:16.440 DEBUG   deej.sessions.signalrgb         Created audio session instance  {"session": "<session: SignalRgb.exe (pid 17256), vol: 1.00>"}
2023-04-16 16:10:16.446 DEBUG   deej.sessions.discord           Created audio session instance  {"session": "<session: Discord.exe (pid 6112), vol: 0.30>"}
2023-04-16 16:10:16.447 DEBUG   deej.sessions.system            Created audio session instance  {"session": "<session: system sounds, vol: 1.00>"}
2023-04-16 16:10:16.447 DEBUG   deej.sessions.device.headphones Created audio session instance  {"session": "<session: Headphones (Realtek USB2.0 Audio), vol: 0.59>"}
2023-04-16 16:10:16.448 DEBUG   deej.session_finder             Enumerated device info  {"deviceIdx": 1, "deviceDescription": "headphones", "deviceFriendlyName": "Headphones ( Pebble V3\r\n)", "dataFlow": 0}
2023-04-16 16:10:16.448 DEBUG   deej.session_finder             Enumerating and adding process sessions for audio output device {"deviceFriendlyName": "Headphones ( Pebble V3\r\n)"}
2023-04-16 16:10:16.448 DEBUG   deej.session_finder             Got session count from session enumerator       {"count": 10}
2023-04-16 16:10:16.456 DEBUG   deej.sessions.epicpen           Created audio session instance  {"session": "<session: EpicPen.exe (pid 20800), vol: 1.00>"}
2023-04-16 16:10:16.464 DEBUG   deej.sessions.epicpen           Created audio session instance  {"session": "<session: EpicPen.exe (pid 20800), vol: 1.00>"}
2023-04-16 16:10:16.479 DEBUG   deej.sessions.signalrgb         Created audio session instance  {"session": "<session: SignalRgb.exe (pid 17256), vol: 1.00>"}
2023-04-16 16:10:16.484 DEBUG   deej.sessions.discord           Created audio session instance  {"session": "<session: Discord.exe (pid 6112), vol: 0.30>"}
2023-04-16 16:10:16.488 DEBUG   deej.sessions.obs64             Created audio session instance  {"session": "<session: obs64.exe (pid 2616), vol: 1.00>"}
2023-04-16 16:10:16.493 DEBUG   deej.sessions.epicpen           Created audio session instance  {"session": "<session: EpicPen.exe (pid 20800), vol: 1.00>"}
2023-04-16 16:10:16.498 DEBUG   deej.sessions.discord           Created audio session instance  {"session": "<session: Discord.exe (pid 29656), vol: 0.30>"}
2023-04-16 16:10:16.503 DEBUG   deej.sessions.chrome            Created audio session instance  {"session": "<session: chrome.exe (pid 25000), vol: 0.07>"}
2023-04-16 16:10:16.508 DEBUG   deej.sessions.epicpen           Created audio session instance  {"session": "<session: EpicPen.exe (pid 20800), vol: 1.00>"}
2023-04-16 16:10:16.509 DEBUG   deej.sessions.system            Created audio session instance  {"session": "<session: system sounds, vol: 1.00>"}
2023-04-16 16:10:16.509 DEBUG   deej.sessions.device.headphones Created audio session instance  {"session": "<session: Headphones ( Pebble V3\r\n), vol: 0.53>"}
2023-04-16 16:10:16.509 DEBUG   deej.session_finder             Enumerated device info  {"deviceIdx": 2, "deviceDescription": "microphone", "deviceFriendlyName": "Microphone (HyperX QuadCast S)", "dataFlow": 1}
2023-04-16 16:10:16.509 DEBUG   deej.sessions.device.microphone Created audio session instance  {"session": "<session: Microphone (HyperX QuadCast S), vol: 1.00>"}
2023-04-16 16:10:16.509 DEBUG   deej.sessions                   Tracking unmapped session       {"session": "<session: Rainmeter.exe (pid 29048), vol: 1.00>"}
2023-04-16 16:10:16.509 DEBUG   deej.sessions                   Tracking unmapped session       {"session": "<session: SignalRgb.exe (pid 17256), vol: 1.00>"}
2023-04-16 16:10:16.510 DEBUG   deej.sessions                   Tracking unmapped session       {"session": "<session: EpicPen.exe (pid 20800), vol: 1.00>"}
2023-04-16 16:10:16.510 DEBUG   deej.sessions                   Tracking unmapped session       {"session": "<session: EpicPen.exe (pid 20800), vol: 1.00>"}
2023-04-16 16:10:16.510 DEBUG   deej.sessions                   Tracking unmapped session       {"session": "<session: SignalRgb.exe (pid 17256), vol: 1.00>"}
2023-04-16 16:10:16.510 DEBUG   deej.sessions                   Tracking unmapped session       {"session": "<session: obs64.exe (pid 2616), vol: 1.00>"}
2023-04-16 16:10:16.510 DEBUG   deej.sessions                   Tracking unmapped session       {"session": "<session: EpicPen.exe (pid 20800), vol: 1.00>"}
2023-04-16 16:10:16.510 DEBUG   deej.sessions                   Tracking unmapped session       {"session": "<session: EpicPen.exe (pid 20800), vol: 1.00>"}
2023-04-16 16:10:16.510 DEBUG   deej.sessions                   Tracking unmapped session       {"session": "<session: Headphones ( Pebble V3\r\n), vol: 0.53>"}
2023-04-16 16:10:16.510 INFO    deej.sessions                   Got all audio sessions successfully     {"sessionMap": "<19 audio sessions>"}

Notice that the master volume is now set to 1.0, where the master knob is still set at 0.53.
I couldn't identify any software related to the bluetooth speaker, but I'll keep testing and will share with you any updates.

Thanks.

@omriharel
Copy link
Owner

omriharel commented Apr 16, 2023 via email

@cerahmed
Copy link
Author

Thanks for the great tip!

Indeed it was as you mentioned.

I went ahead and modified the deviceSessionKeyPattern regex to ^.+ \(.+\r*\n*\s*\)$ and rebuilt the app.
This made the bluetooth speaker mappable given the CRLF inclusion, and now deej.unmapped works as expected.

Thanks again for the great insight, and looking forward modifying the code to account for irregular device names in the future.

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

No branches or pull requests

2 participants