Conversation
| { | ||
| pv->vt = VT_UI4; | ||
| pv->uintVal = m_AsioDevice.GetConfig().isMicrophone ? Microphone : LineLevel; | ||
| pv->ulVal = m_AsioDevice.GetConfig().isMicrophone ? Microphone : LineLevel; |
There was a problem hiding this comment.
According to MS docs, this should be using uintval.
Why did you change it to use ulval?
There was a problem hiding this comment.
In Wine, tagPROPVARIANT::uintval does not exist. Both uintval and ulval are defined as VT_UI4, where this page only mentions ulval:
https://learn.microsoft.com/en-us/windows/win32/api/propidl/ns-propidl-propvariant
Since it's all the same union, and both are 32-bit unsigned integer, it should be functionally equivalent.
RS_ASIO/AsioHelpers.cpp
Outdated
|
|
||
| std::string ConvertWStrToStr(const TCHAR* keyName) | ||
| { | ||
| std::wstring ws( (const wchar_t*)keyName ); |
There was a problem hiding this comment.
TCHAR is not always a wchar_t*.
depending on _UNICODE (or something similar, can't remember right now) it might also just be a char* which would make the conversion even easier, but I would also rename this whole function to ConvertTcharToStr or something similar.
There was a problem hiding this comment.
Ah, I missed that. I've moved this to Utils.cpp, and put 2 function overloads there for char* and wchar_t*, so the compiler picks the right one.
|
This looks very good! I left a couple of comments on some things that I found could be improved but overall looks good. |
229e271 to
a237ed1
Compare
I have not done proper testing yet, currently I'm struggling with wineasio/jack/pipewire under Wine. As for testing: Under steam/wine, audio-output works, I see nothing weird in the logs, but audio input does not work (with and without the changes in this PR, due to pipewire). |
a237ed1 to
56116c5
Compare
|
If it works under steam/wine it should be ok. The only thing that could be an issue is the workaround for Just let me know if/when you manage to test it on actual windows and I'll merge it if all ok :) |
- open() needs linux filenames, so use Win32 API. - std::array needs to be initialized.
56116c5 to
6acf209
Compare
|
It took a bit to get Rocksmith itself running, but I've tested the PR as it is now: I did make some changes:
|
|
Everything looks great, and very nice catch on the uninitialized pointers! |
Note sure how well this fits your plans, let's see:
This PR adapts the code to make it compatible with GCC, with the minimal set of changes to achieve that.
That will allow cross-compiling and also directly building it as WINE dll.
The latter gives the RS-ASIO dll direct access to the linux libraries, which makes interfacing with pipewire, jack or others easier.