plutoberth / sonyheadphonesclient Goto Github PK
View Code? Open in Web Editor NEWA {Windows, macOS, Linux} client recreating the functionality of the Sony Headphones app
License: MIT License
A {Windows, macOS, Linux} client recreating the functionality of the Sony Headphones app
License: MIT License
Currently the macOS version uses 'placeholder' icons for the statusbar button. It would be great if there were proper icons (that work on macOS 10.10 and higher) for the statusbar button/toggle.
The only thing I've used the Sony Connect app on my phone was for the EQ. I have multiple sets of headphones because I use to do music production, so sound is quite important to me. I've set the EQ on my app, but the settings don't propagate on my laptop and PC. So....will EQ support be added? It would be greatly appreciated
Not sure how similar the protocol will be compare to M3 but I guess they will be similar.
Hi!
I've managed to hide the dock icon, while keeping the menu bar. For me, the dock icon doesn't make much sense, cause the best thing about the macOS app is the quick toggle between noise cancelling and ambient mode.
I have little experience with native Objective-C, but managed to hide the dock icon using following modifications:
LSUIElement String 1
- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag
{
//new
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
[NSApp setPresentationOptions:NSApplicationPresentationDefault];
[NSMenu setMenuBarVisible:NO];
[NSMenu setMenuBarVisible:YES];
// end
if (flag) {
return NO;
}
else {
[_window makeKeyAndOrderFront:self];
return YES;
}
}
Maybe we can manage the settings via menu bar?
Documentation on running on Linux
Great work! But, for some people on Linux, documentation for running the script could be better because file is not allowed to be executable by default. Pls add (chmod -x [build-file] to README).
Please post your experiences with the software here.
Would it be possible to add support for the XM5, at the moment it's unable to connect and this tool is literally the lifeline for using Sony headphones on a PC.
What happens?
When the app is minimized, it consumes entire CPU core. Looks like some UI check without a timer - when in foreground or overlayed by another window, everything is fine
How to reproduce
What should happen
Minimizing shouldn't affect CPU usage
Version
Headphones Client: v.1.0.2, Aug 20 Release
OS: Windows 10 20H2, latest stable
Figure out how to include the font correctly so that it'd work regardless of the current working dir when opening the program. See CrossPlatformGUI::CrossPlatformGUI
.
Currently, when you set the scale to zero it doesn't turn ASM off correctly. The Off\On mode might work here
Headset: WF-1000XM4
Client version: v1.2
OS: Windows 11
Description: Can't connect
Errors: Couldn't connect: 10049
Any chance TWS earbuds like the WF-1000XM4 can be supported?
Opening this issue to gauge interest for WH-1000XM4 support. I own this model and would love to be able to use this client with it. I have zero experience in C++, but I'm happy to test and provide logs for anyone who might choose to tackle this. I should be able to run either the Mac or Windows version (via Bootcamp).
FWIW it seems the app in its current state is close to being able to support the XM4s. Here are my results when attempting to use it with my pair:
Note: tested using the macOS build from @semvis123 on Mojave
1. Start app
success
2. Select 'Connect to Bluetooth Device' and choose WH-1000XM4
connection success
3. Use the slider to change Ambient Sound Level
ambient sound successfully changed
4. Make another change to either Ambient Sound or the Focus on Voice option
app crashes
The app doesn't crash for me when the only action is connecting/disconnecting the bluetooth device.
We need to recv messages correctly in a way that will not block the main thread, so that the sequence number will stay consistent. Maybe emulate a callback somehow?
big sad. it doesn't show up in the app
Running Arch here, got past the glew 2.1 errors originally and now the application runs fine as expected but when I select WF-1000XM4 I receive "Could not connect to bluetooth socket"
Bluez-git 5.60
bluetooth-support 1-3
bluez-qt 5.84
Tried a few things but can't seem to get past this point but no luck, suggestions?
Currently it fails to catch the error that happen when it connects for example.
This is because the connection happens in a different thread, when the recoverableException is thrown from that thread, it doesn't get catched and thus crashes the client.
This could be solved by passing an error handler to the bluetoothConnector, but I can't get that to work.
My approach was to have a void
that gets defined in MacOSBluetoothConnector::MacOSBluetoothConnector
, but that gives an error at compilation: Reference to non-static member function must be called
.
Used code:
// macosbluetoothconnector.mm
MacOSBluetoothConnector::MacOSBluetoothConnector(void (&errorCallback)(RecoverableException))
{
this->errorHandler = errorCallback;
}
// macosbluetoothconnector.h
private:
void *rfcommDevice;
void *rfcommchannel;
std::thread* uthread = NULL;
void errorHandler(RecoverableException);
Hi, while trying to run the tool I get the error
./SonyHeadphonesClient: error while loading shared libraries: libGLEW.so.2.1: cannot open shared object file: No such file or directory
even though I have the shared library installed.
I am running on Manjaro Linux.
How can I get it to work?
We need to figure out a way to deploy the Qt version (in branch qt-staging
) properly, allowing users to download and run the app out of the box. Might need a deb or a Windows installer.
I don't now if this is possible, but it would be nice if we can mute the mic!
Very nice work, thanks for this component.
Headset: WF-1000XM3
Client version: 1.2
OS: Ubuntu 21.04
Description:
Headset was recognized. Ambient sound control switch works, but takes about ~ 2 seconds to come into effect. Switching from 0 (ANC) to 1 (wind noise control) doesn't apply the change, but switching from 0 to another value above 1 and back to 1 applies (wind noise control).
Please react to this issue if you want Linux support
Hi guys, I try to install your project, but I have this error:
09:06 ➜ cmake ..
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
CMake Warning (dev) at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to find_package_handle_standard_args
(DBUS) does
not match the name of the calling package (DBus). This can lead to
linux/FindDBus.cmake:59 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:60 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found DBUS: /usr/include/dbus-1.0;/usr/lib/x86_64-linux-gnu/dbus-1.0/include
-- Found GLEW: /usr/include (found version "2.2.0")
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- Configuring done
CMake Error at CMakeLists.txt:8 (add_executable):
Cannot find source file:
imgui/imgui.cpp
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
.hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
I am using Ubuntu 22.04.1 LTS
Headset: WH-XB900N
Client version: v1.3
OS: macOS Monterey v12.3.1
Description: App doesn't work.
Specifically: Successfully connect headphones to laptop via bluetooth. Launch SonyHeadphonesClient. Click "Connect to Bluetooth Device" (had to grant permission the first time -- did so). Select headphones from list. "Enable Ambient Sound Control" is already ticked, try to move the slider and the app beachballs and does not recover :(
This is on a Macbook Air early 2015.
In many cases, the application will output an uninformative error and crash. In some cases, such as a device disconnection, it's possible to handle it gracefully and just disconnect the headphones from the UI.
Headset: WH1000XM5
Client Version: v1.3.1
OS: Windows 11
Description: Couldn't connect, error 10049 even after restart.
I assume this is a false positive, but just wanted to share this as this has caused some frustratiion to work around. Have used the client successfully over the past couple months with no issues. Detected via Bitdefender as Gen:Variant.Lazy.257289 on one of my PCs.
Uploaded the exe to VirusTotal:
Headset: WF-C500
Client version: v1.2
OS: Windows 10
Description:
Couldn't Connect: 10049
The Sony Wf-1000xm3 do not support volume control on Linux. It would be great if the Bluetooth commands for it could be reverse engineered.
Many users in #29 had to install additional packages to run the app. Figure out the required packages for more popular distros and add that to the README.
It freezes on macOS Monterey when it waits for the response data, it never receives anything.
The receive data method in the IOBluetoothRFCOMMChannelDelegate
doesn't seem to get called.
It's probably caused by a bug in Monterey.
Hi, tried connecting to my WF-1000XM4's from the Mac app. App crashes. I also have an android phone with Sony's headphone app.
Please let me know if there is some logs / script I can provide / run to help reverse engineer the device communication protocol.
Kind regards
Hi, I'm having trouble compiling this package.
I cannot use the precompiled release, as Arch is on GLEW 2.2, and I'm using Wayland (which requires GLEW to be compiled with some options), so simply downloading an old version is not that straight forward.
So I'm trying now to compile from source and I'm getting the following log.
[dries@DriesPC build]$ cmake ..
-- The C compiler identification is GNU 11.1.0
-- The CXX compiler identification is GNU 11.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.7.3")
CMake Warning (dev) at /usr/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (DBUS) does
not match the name of the calling package (DBus). This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
linux/FindDBus.cmake:59 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:58 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found DBUS: /usr/include/dbus-1.0;/usr/lib/dbus-1.0/include
-- Found GLEW: /usr/include (found version "2.2.0")
-- Found OpenGL: /usr/lib/libOpenGL.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dries/Projects/SonyHeadphonesClient/Client/build
[dries@DriesPC build]$ cmake --build .
[ 5%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/BluetoothWrapper.cpp.o
[ 11%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/ByteMagic.cpp.o
[ 17%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/CommandSerializer.cpp.o
[ 23%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/TimedMessageQueue.cpp.o
[ 29%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/CrossPlatformGUI.cpp.o
In file included from /home/dries/Projects/SonyHeadphonesClient/Client/CrossPlatformGUI.h:10,
from /home/dries/Projects/SonyHeadphonesClient/Client/CrossPlatformGUI.cpp:1:
/home/dries/Projects/SonyHeadphonesClient/Client/SingleInstanceFuture.h:15:33: error: expected unqualified-id before ‘)’ token
15 | SingleInstanceFuture<T>() = default;
| ^
/home/dries/Projects/SonyHeadphonesClient/Client/SingleInstanceFuture.h:21:48: error: invalid declarator before ‘other’
21 | SingleInstanceFuture<T>(std::future<T> other);
| ^~~~~
/home/dries/Projects/SonyHeadphonesClient/Client/SingleInstanceFuture.h:21:47: error: expected ‘)’ before ‘other’
21 | SingleInstanceFuture<T>(std::future<T> other);
| ~ ^~~~~~
| )
/home/dries/Projects/SonyHeadphonesClient/Client/SingleInstanceFuture.h:48:8: error: no declaration matches ‘SingleInstanceFuture<T>::SingleInstanceFuture(std::future<_Res>)’
48 | inline SingleInstanceFuture<T>::SingleInstanceFuture(std::future<T> other) : std::future<T>(std::move(other)) {}
| ^~~~~~~~~~~~~~~~~~~~~~~
/home/dries/Projects/SonyHeadphonesClient/Client/SingleInstanceFuture.h:48:8: note: no functions named ‘SingleInstanceFuture<T>::SingleInstanceFuture(std::future<_Res>)’
/home/dries/Projects/SonyHeadphonesClient/Client/SingleInstanceFuture.h:12:7: note: ‘class SingleInstanceFuture<T>’ defined here
12 | class SingleInstanceFuture : public std::future<T>
| ^~~~~~~~~~~~~~~~~~~~
/home/dries/Projects/SonyHeadphonesClient/Client/SingleInstanceFuture.h: In instantiation of ‘void SingleInstanceFuture<T>::setFromAsync(Func, Args&& ...) [with Func = CrossPlatformGUI::_drawDeviceDiscovery()::<lambda()>; Args = {}; T = void]’:
/home/dries/Projects/SonyHeadphonesClient/Client/CrossPlatformGUI.cpp:112:40: required from here
/home/dries/Projects/SonyHeadphonesClient/Client/SingleInstanceFuture.h:33:15: error: cannot bind non-const lvalue reference of type ‘std::future<void>&’ to an rvalue of type ‘std::future<void>’
33 | *this = std::async(std::launch::async, func, std::forward<Args>(args)...);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/dries/Projects/SonyHeadphonesClient/Client/SingleInstanceFuture.h:51:83: note: initializing argument 1 of ‘SingleInstanceFuture<T> SingleInstanceFuture<T>::operator=(std::future<_Res>&) [with T = void]’
51 | inline SingleInstanceFuture<T> SingleInstanceFuture<T>::operator=(std::future<T>& other)
| ~~~~~~~~~~~~~~~~^~~~~
/home/dries/Projects/SonyHeadphonesClient/Client/SingleInstanceFuture.h: In instantiation of ‘void SingleInstanceFuture<T>::setFromAsync(Func, Args&& ...) [with Func = CrossPlatformGUI::_drawDeviceDiscovery()::<lambda()>; Args = {}; T = std::vector<BluetoothDevice>]’:
/home/dries/Projects/SonyHeadphonesClient/Client/CrossPlatformGUI.cpp:146:48: required from here
/home/dries/Projects/SonyHeadphonesClient/Client/SingleInstanceFuture.h:33:15: error: cannot bind non-const lvalue reference of type ‘std::future<std::vector<BluetoothDevice> >&’ to an rvalue of type ‘std::future<std::vector<BluetoothDevice> >’
33 | *this = std::async(std::launch::async, func, std::forward<Args>(args)...);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/dries/Projects/SonyHeadphonesClient/Client/SingleInstanceFuture.h:51:83: note: initializing argument 1 of ‘SingleInstanceFuture<T> SingleInstanceFuture<T>::operator=(std::future<_Res>&) [with T = std::vector<BluetoothDevice>]’
51 | inline SingleInstanceFuture<T> SingleInstanceFuture<T>::operator=(std::future<T>& other)
| ~~~~~~~~~~~~~~~~^~~~~
/home/dries/Projects/SonyHeadphonesClient/Client/SingleInstanceFuture.h: In instantiation of ‘void SingleInstanceFuture<T>::setFromAsync(Func, Args&& ...) [with Func = CrossPlatformGUI::_drawASMControls()::<lambda()>; Args = {}; T = int]’:
/home/dries/Projects/SonyHeadphonesClient/Client/CrossPlatformGUI.cpp:223:41: required from here
/home/dries/Projects/SonyHeadphonesClient/Client/SingleInstanceFuture.h:33:15: error: cannot bind non-const lvalue reference of type ‘std::future<int>&’ to an rvalue of type ‘std::future<int>’
33 | *this = std::async(std::launch::async, func, std::forward<Args>(args)...);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/dries/Projects/SonyHeadphonesClient/Client/SingleInstanceFuture.h:51:83: note: initializing argument 1 of ‘SingleInstanceFuture<T> SingleInstanceFuture<T>::operator=(std::future<_Res>&) [with T = int]’
51 | inline SingleInstanceFuture<T> SingleInstanceFuture<T>::operator=(std::future<T>& other)
| ~~~~~~~~~~~~~~~~^~~~~
/home/dries/Projects/SonyHeadphonesClient/Client/SingleInstanceFuture.h: In instantiation of ‘void SingleInstanceFuture<T>::setFromAsync(Func, Args&& ...) [with Func = CrossPlatformGUI::CrossPlatformGUI(BluetoothWrapper)::<lambda()>; Args = {}; T = std::vector<BluetoothDevice>]’:
/home/dries/Projects/SonyHeadphonesClient/Client/CrossPlatformGUI.cpp:245:44: required from here
/home/dries/Projects/SonyHeadphonesClient/Client/SingleInstanceFuture.h:33:15: error: cannot bind non-const lvalue reference of type ‘std::future<std::vector<BluetoothDevice> >&’ to an rvalue of type ‘std::future<std::vector<BluetoothDevice> >’
33 | *this = std::async(std::launch::async, func, std::forward<Args>(args)...);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/dries/Projects/SonyHeadphonesClient/Client/SingleInstanceFuture.h:51:83: note: initializing argument 1 of ‘SingleInstanceFuture<T> SingleInstanceFuture<T>::operator=(std::future<_Res>&) [with T = std::vector<BluetoothDevice>]’
51 | inline SingleInstanceFuture<T> SingleInstanceFuture<T>::operator=(std::future<T>& other)
| ~~~~~~~~~~~~~~~~^~~~~
make[2]: *** [CMakeFiles/SonyHeadphonesClient.dir/build.make:132: CMakeFiles/SonyHeadphonesClient.dir/CrossPlatformGUI.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/SonyHeadphonesClient.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
[dries@DriesPC build]$
Move long-running IO to a different thread
Sometimes exceptions will not be processed because the object isn't checked every frame like we used to do in imgui.
Please react to this issue if you want macOS support
Hi,
first of all: great work, I love this project.
Secondly: Would it be possible to support custom voice packs?
You can change the language in the app and the new sound files are then uploaded to the headphones.
Could we mimic this process and provide our own files?
The primary reason for me would be a shorter startup time (Why bother me with a "power - on", I would just use a very short empty file here cause I'm always late and every second counts ;) ) and shorter breaks in a meeting (I know I can completely turn off the output, but for know I don't know the battery state then).
Did you record the data from the bluetooth connection to reverse engineer this protocol?
Can you give hints on how to start?
Do you think there is the risk of bricking the device?
I am the package-maintainer of the nix-package. But currently it does not build on aarch64 out of the box.
I am currently getting this issue:
building
build flags: -j2 SHELL=/nix/store/99bgmihz5ybclg11h00nm9lgqmsfhp4p-bash-5.1-p16/bin/bash
[ 11%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/ByteMagic.cpp.o
[ 11%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/BluetoothWrapper.cpp.o
In file included from /build/source/Client/CommandSerializer.h:2,
from /build/source/Client/BluetoothWrapper.h:4,
from /build/source/Client/BluetoothWrapper.cpp:1:
/build/source/Client/Constants.h:110:18: error: enumerator value '-1' is outside the range of underlying type 'char'
110 | OUT_OF_RANGE = -1
| ^
/build/source/Client/Constants.h:129:18: error: enumerator value '-1' is outside the range of underlying type 'char'
129 | OUT_OF_RANGE = -1
| ^
In file included from /build/source/Client/ByteMagic.h:9,
from /build/source/Client/ByteMagic.cpp:1:
/build/source/Client/Constants.h:110:18: error: enumerator value '-1' is outside the range of underlying type 'char'
110 | OUT_OF_RANGE = -1
| ^
/build/source/Client/Constants.h:129:18: error: enumerator value '-1' is outside the range of underlying type 'char'
129 | OUT_OF_RANGE = -1
| ^
make[2]: *** [CMakeFiles/SonyHeadphonesClient.dir/build.make:90: CMakeFiles/SonyHeadphonesClient.dir/ByteMagic.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/SonyHeadphonesClient.dir/build.make:76: CMakeFiles/SonyHeadphonesClient.dir/BluetoothWrapper.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/SonyHeadphonesClient.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
for version 1.2
I did remove the line containing UNKNOWN = -1
. For the newer version OUT_OF_RANGE
appeard as well. So I am suggesting in fixing this bug upstream, then patching it all the times.
I would be happy to have a proper fix. Maybe setting it to the maximum would result in the same behavior?
The program works very well, it would be nice if you add a shortcut with the new update
Sony 1000WH4 can work in 2 modes:
I would like to be able to easily switch between these, as I both listen to music and sometimes use HF for online meetings.
Is there a switch implemented in this client?
If no, I would like to contribute and implement it.
Hello - thank you for the great project.
I came looking for an app like this because my WH-1000XM3 seemingly randomly changed the function of the NC/AMBIENT button from the very useful "switch between noise canceling-levels" to the useless recording that says "the google assistant is not connected". According to this article: https://helpguide.sony.net/mdr/wh1000xm3/v1/en/contents/TP0001703075.html I can change that back with the Sony App, but because of Sonys history of installing rootkits on their customers' computers and/or forcefully taking away features and making products worse with forced firmware upgrades installing the official app is not an option for me.
The adjustment of noise-cancelling works well on my WH-1000XM3 with this app, but if you could add the ability to remap the NC/AMBIENT button from the "Google Assistant is not connected"-recording back to adjusting the noise-cancelling levels that would be AMAZING!
Thank you very much in advance
The Qt version (branch qt
) currently doesn't compile on macOS. Technically this isn't Qt's fault, it's just that previously CMake wasn't used so it doesn't link IOBluetooth (and maybe other things 🤡) properly
I set up Actions for Linux and Windows so that we have automatic builds on all platforms :)
Sadly, I'm not sure how to do it for mac and I don't have a local env to test stuff anyway. Any chance you could help on this, @semvis123 ?
As the title says, any way for to switch quality/stable mode?
WH-1000XM2/XM3 does not support equalizer with LDAC, which is quite sad since you lose Clear Bass at phone.
When you connect it back to PC, you likely don't want to use SBC or similar.
Sony design for this is quite ****** since they enable/disable Bluetooth codecs from headphones to ensure devices won't use high quality ones in case you require simpler codecs.
I am getting a couple of compiler (GNU 11.2.0) errors:
In file included from /tmp/SonyHeadphonesClient/Client/CrossPlatformGUI.h:10,
from /tmp/SonyHeadphonesClient/Client/CrossPlatformGUI.cpp:1:
/tmp/SonyHeadphonesClient/Client/SingleInstanceFuture.h:15:33: error: expected unqualified-id before ‘)’ token
15 | SingleInstanceFuture<T>() = default;
| ^
/tmp/SonyHeadphonesClient/Client/SingleInstanceFuture.h:21:48: error: invalid declarator before ‘other’
21 | SingleInstanceFuture<T>(std::future<T> other);
| ^~~~~
/tmp/SonyHeadphonesClient/Client/SingleInstanceFuture.h:21:47: error: expected ‘)’ before ‘other’
21 | SingleInstanceFuture<T>(std::future<T> other);
| ~ ^~~~~~
| )
/tmp/SonyHeadphonesClient/Client/SingleInstanceFuture.h:48:8: error: no declaration matches ‘SingleInstanceFuture<T>::SingleInstanceFuture(std::future<_Res>)’
48 | inline SingleInstanceFuture<T>::SingleInstanceFuture(std::future<T> other) : std::future<T>(std::move(other)) {}
| ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/SonyHeadphonesClient/Client/SingleInstanceFuture.h:48:8: note: no functions named ‘SingleInstanceFuture<T>::SingleInstanceFuture(std::future<_Res>)’
/tmp/SonyHeadphonesClient/Client/SingleInstanceFuture.h:12:7: note: ‘class SingleInstanceFuture<T>’ defined here
12 | class SingleInstanceFuture : public std::future<T>
| ^~~~~~~~~~~~~~~~~~~~
/tmp/SonyHeadphonesClient/Client/SingleInstanceFuture.h: In instantiation of ‘void SingleInstanceFuture<T>::setFromAsync(Func, Args&& ...) [with Func = CrossPlatformGUI::_drawDeviceDiscovery()::<lambda()>; Args = {}; T = void]’:
/tmp/SonyHeadphonesClient/Client/CrossPlatformGUI.cpp:112:40: required from here
/tmp/SonyHeadphonesClient/Client/SingleInstanceFuture.h:33:15: error: cannot bind non-const lvalue reference of type ‘std::future<void>&’ to an rvalue of type ‘std::future<void>’
33 | *this = std::async(std::launch::async, func, std::forward<Args>(args)...);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/SonyHeadphonesClient/Client/SingleInstanceFuture.h:51:83: note: initializing argument 1 of ‘SingleInstanceFuture<T> SingleInstanceFuture<T>::operator=(std::future<_Res>&) [with T = void]’
51 | anceFuture<T> SingleInstanceFuture<T>::operator=(std::future<T>& other)
| ~~~~~~~~~~~~~~~~^~~~~
/tmp/SonyHeadphonesClient/Client/SingleInstanceFuture.h: In instantiation of ‘void SingleInstanceFuture<T>::setFromAsync(Func, Args&& ...) [with Func = CrossPlatformGUI::_drawDeviceDiscovery()::<lambda()>; Args = {}; T = std::vector<BluetoothDevice>]’:
/tmp/SonyHeadphonesClient/Client/CrossPlatformGUI.cpp:146:48: required from here
/tmp/SonyHeadphonesClient/Client/SingleInstanceFuture.h:33:15: error: cannot bind non-const lvalue reference of type ‘std::future<std::vector<BluetoothDevice> >&’ to an rvalue of type ‘std::future<std::vector<BluetoothDevice> >’
33 | *this = std::async(std::launch::async, func, std::forward<Args>(args)...);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/SonyHeadphonesClient/Client/SingleInstanceFuture.h:51:83: note: initializing argument 1 of ‘SingleInstanceFuture<T> SingleInstanceFuture<T>::operator=(std::future<_Res>&) [with T = std::vector<BluetoothDevice>]’
51 | anceFuture<T> SingleInstanceFuture<T>::operator=(std::future<T>& other)
| ~~~~~~~~~~~~~~~~^~~~~
/tmp/SonyHeadphonesClient/Client/SingleInstanceFuture.h: In instantiation of ‘void SingleInstanceFuture<T>::setFromAsync(Func, Args&& ...) [with Func = CrossPlatformGUI::_drawASMControls()::<lambda()>; Args = {}; T = int]’:
/tmp/SonyHeadphonesClient/Client/CrossPlatformGUI.cpp:223:41: required from here
/tmp/SonyHeadphonesClient/Client/SingleInstanceFuture.h:33:15: error: cannot bind non-const lvalue reference of type ‘std::future<int>&’ to an rvalue of type ‘std::future<int>’
33 | *this = std::async(std::launch::async, func, std::forward<Args>(args)...);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/SonyHeadphonesClient/Client/SingleInstanceFuture.h:51:83: note: initializing argument 1 of ‘SingleInstanceFuture<T> SingleInstanceFuture<T>::operator=(std::future<_Res>&) [with T = int]’
51 | anceFuture<T> SingleInstanceFuture<T>::operator=(std::future<T>& other)
| ~~~~~~~~~~~~~~~~^~~~~
/tmp/SonyHeadphonesClient/Client/SingleInstanceFuture.h: In instantiation of ‘void SingleInstanceFuture<T>::setFromAsync(Func, Args&& ...) [with Func = CrossPlatformGUI::CrossPlatformGUI(BluetoothWrapper)::<lambda()>; Args = {}; T = std::vector<BluetoothDevice>]’:
/tmp/SonyHeadphonesClient/Client/CrossPlatformGUI.cpp:245:44: required from here
/tmp/SonyHeadphonesClient/Client/SingleInstanceFuture.h:33:15: error: cannot bind non-const lvalue reference of type ‘std::future<std::vector<BluetoothDevice> >&’ to an rvalue of type ‘std::future<std::vector<BluetoothDevice> >’
33 | *this = std::async(std::launch::async, func, std::forward<Args>(args)...);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/SonyHeadphonesClient/Client/SingleInstanceFuture.h:51:83: note: initializing argument 1 of ‘SingleInstanceFuture<T> SingleInstanceFuture<T>::operator=(std::future<_Res>&) [with T = std::vector<BluetoothDevice>]’
51 | anceFuture<T> SingleInstanceFuture<T>::operator=(std::future<T>& other)
| ~~~~~~~~~~~~~~~~^~~~~
Just tested, WH-1000XM2 works, no issues.
Thank you!
Edit for clarity:
Tested on Linux.
Ambient sound control, voice focus works well, just like in the gif.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.