I too have struggled getting DReaM to compile under Visual Studio. I've slogged through QT errors, Visual Studio errors, and missing libraries and headers. I admitted defeat and went down another route. I now have DReaM 2.2.1 running under Windows 10 and decoding Radio Marti with the new xHE-AAC codec.
I did very little but make a few tweaks to the X11 and Pulse Audio configurations to get things working under WSL2 and Ubuntu 20. For me it was the difference of not working & working.
Firstly, acquaint yourself with the process described here. I'll list the alterations that are needed below.
WSL Update - Microsoft is shipping a new WSL2 kernel. If you get an error trying to start Ubuntu 20, read the error message. The ask.ms link will automatically download an MSI with the new kernel.
Use VcXsrv for your X11 server. I have been a fan of XMing for years, paying for it yearly. However, I simply could not get XMing to work with WSL2. Yet VcXsrv worked.
When starting VcXsrv, provide the -ac parameter to disable IP authentication. WSL2 runs Linux on a different IP address than the Windows computer. If you don't provide the -ac parameter, it won't work.
**Before even attempting to go further, make sure that X11 is working. ** Start VcXsrv and try to run xclock or xeyes (you may need to install x11-utils). If you can't get these working, there's no point going on until this is solved.
Follow the instructions to download and configure PulseAudio for Windows, but make this key change to default.pa at line 61: load-module module-native-protocol-tcp auth-ip-acl=0.0.0.0 auth-anonymous=1
Go into the settings for the Windows firewall and ensure that the pulseaudio.exe file is added as an exception for both private and public networks. I struggled until I realized that the firewall is treating WSL2 as an external computer thus the public exception is necessary.
Be sure that pulseaudio.exe is started as an administrator, otherwise the record functionality will not function. It helped in debugging to increase the logging level. I also found better success if I used the option to increase the priority of pulseaudio. I use the following PowerShell script to start the PulseAudio server.
• #Requires -RunAsAdministrator
• & .\pulseaudio --high-priority=1 --log-level=3
Before trying to build DReaM, test the audio. **
a. From WSL2, run pactl info. You'll either get information back (success) or an error.
b. If you have VLC installed, try playing a music file or connecting to a streaming audio service**.
Now build DReaM. The supplied DreamBuildUbuntu.sh works great. I actually installed and upgraded all of the packages (i.e. the apt-get install lines in the script) first.
As stated, in the article, run DReaM by dream -I pulse -O pulse.
Believe it or not, it works! Audio starts to play when the SNR reaches around 11dB. When the signal is below that, you'll see a lot of failed decoded messages or buffer errors. Eventually DReaM might crash. Just relaunch it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I too have struggled getting DReaM to compile under Visual Studio. I've slogged through QT errors, Visual Studio errors, and missing libraries and headers. I admitted defeat and went down another route. I now have DReaM 2.2.1 running under Windows 10 and decoding Radio Marti with the new xHE-AAC codec.
I did very little but make a few tweaks to the X11 and Pulse Audio configurations to get things working under WSL2 and Ubuntu 20. For me it was the difference of not working & working.
Firstly, acquaint yourself with the process described here. I'll list the alterations that are needed below.
https://github.com/keyboarderror/DreamBuild
WSL Update - Microsoft is shipping a new WSL2 kernel. If you get an error trying to start Ubuntu 20, read the error message. The ask.ms link will automatically download an MSI with the new kernel.
Use VcXsrv for your X11 server. I have been a fan of XMing for years, paying for it yearly. However, I simply could not get XMing to work with WSL2. Yet VcXsrv worked.
When starting VcXsrv, provide the -ac parameter to disable IP authentication. WSL2 runs Linux on a different IP address than the Windows computer. If you don't provide the -ac parameter, it won't work.
**Before even attempting to go further, make sure that X11 is working. ** Start VcXsrv and try to run xclock or xeyes (you may need to install x11-utils). If you can't get these working, there's no point going on until this is solved.
Follow the instructions to download and configure PulseAudio for Windows, but make this key change to default.pa at line 61: load-module module-native-protocol-tcp auth-ip-acl=0.0.0.0 auth-anonymous=1
Go into the settings for the Windows firewall and ensure that the pulseaudio.exe file is added as an exception for both private and public networks. I struggled until I realized that the firewall is treating WSL2 as an external computer thus the public exception is necessary.
Be sure that pulseaudio.exe is started as an administrator, otherwise the record functionality will not function. It helped in debugging to increase the logging level. I also found better success if I used the option to increase the priority of pulseaudio. I use the following PowerShell script to start the PulseAudio server.
• #Requires -RunAsAdministrator
• & .\pulseaudio --high-priority=1 --log-level=3
Before trying to build DReaM, test the audio. **
a. From WSL2, run pactl info. You'll either get information back (success) or an error.
b. If you have VLC installed, try playing a music file or connecting to a streaming audio service**.
Now build DReaM. The supplied DreamBuildUbuntu.sh works great. I actually installed and upgraded all of the packages (i.e. the apt-get install lines in the script) first.
As stated, in the article, run DReaM by dream -I pulse -O pulse.
Believe it or not, it works! Audio starts to play when the SNR reaches around 11dB. When the signal is below that, you'll see a lot of failed decoded messages or buffer errors. Eventually DReaM might crash. Just relaunch it.