soul-lang / SOUL

The SOUL programming language and API
Other
1.71k stars 96 forks source link

Win-x64 binaries do not run patches with "soul play" as of 0.9.59 #44

Closed agdsat134 closed 3 years ago

agdsat134 commented 3 years ago

Steps to reproduce: soul create newpatch --output=./ soul play newpatch.soulpatch

Result: Opens window, shows a loading spinner with label "newpatch"

Running: Windows 10 Pro OS build 19041.572

I've also tried the binaries for the previous version, same result. Am I just missing something?

cesaref commented 3 years ago

I've just tried, and failed to reproduce this problem - one area that might be causing problems is the choice of audio device as the command line tool doesn't necessary do the right thing. It would be good to see what the output from the above command is, as it indicates the chosen output device. Can you include that output?

agdsat134 commented 3 years ago

Hmm, when I run "soul play newpatch.soulpatch" in VS Code (Powershell), it doesn't provide any output after opening the app. It just goes back to the directory prompt.

I also tried "soul errors newpatch.soulpatch" to see if I could get it to output the errors, but it outputs "Building: F:\web_soul\test\newpatch.soulpatch" then just completely hangs until I CTRL+C out of it. I have 4 audio devices listed as active in Windows, and only one of them that I actually use (2 of them are for monitor speakers), so perhaps it's picking one of the others by default?

cesaref commented 3 years ago

The problem I think is the shell you are running, and how the output appears. I've just tried repeating the above under powershell, and it also works for me, and I see output, but there is definitely some problems with the command prompt returning and the output being interleaved on the display.

First up, try a powershell prompt outside of vscode and see if this changes behaviour.

agdsat134 commented 3 years ago

Interesting - so far I've tested it in Powershell standalone and the native windows command line and I'm getting the same result for both - after I hit enter the window opens, and the terminal goes back to the prompt as if the program closed with no output. I tried it on my laptop (also running Windows 10) and it is working fine. Also, I am able to run the patches in Waveform on the computer with the issue. So for now I'll just use that setup for development.

I'm guessing it has something to do with the hardware on my computer then. If there's anything else you can think of that I can try, let me know, but it's not a big deal if nobody else is reporting a problem. I did go into device manager and disable the other audio devices while trying each one, but that didn't make a difference.

julianstorer commented 3 years ago

That sounds unlikely - if the hardware's a problem, it should give an error message..

What happens if you try:

soul play --list-devices

or just soul with no arguments, which should at least print out a message?

agdsat134 commented 3 years ago

When I try "soul play --list-devices" I get the following:

Available audio inputs:
 - Headset Microphone (Oculus Virtual Audio Device)

Available audio outputs:
 - Speakers (USB Audio CODEC )
 - DELL U2414H (NVIDIA High Definition Audio)
 - Headphones (Oculus Virtual Audio Device)
 - DELL U2414H (NVIDIA High Definition Audio) (2)

"Speakers (USB Audio CODEC )" is my primary audio device.

When I try "soul" it outputs the usage info for the commands.

julianstorer commented 3 years ago

Hmm, well it's running then, just failing to play..

Really hard to guess what might be happening without being able to reproduce the problem, but maybe something about the Oculus drivers. I guess something else to try would be to use the --input-device= and --output-device= arguments to force it to use different devices and see if any of them work.

agdsat134 commented 3 years ago

I ran the following and it now works:

soul play --output-device="Speakers (USB Audio CODEC )" newpatch.soulpatch

I also tried the same with each of the other devices and it also opens the program without any issues (but no audio output of course, since the others are not in use on the computer.)

So it only works if I explicitly tell it to use a specific device. I also found a (possible) unrelated problem with the hot-reload feature on both computers which I'll open up in a separate issue.

julianstorer commented 3 years ago

OK, thanks - this looks like it's more of a JUCE bug than something in our code.. most likely JUCE's audio wrappers aren't quite coping with your oculus drivers, and maybe needs tweaking to fix that.

I'll ping the juce guys and see whether they have an oculus they could test with. Unfortunately this sounds like the kind of bug which will be almost impossible to debug without having the exact same setup to test on..

agdsat134 commented 3 years ago

Just an update to this: it's definitely a JUCE bug. I'm unable to even compile a fresh audio plugin using the latest version of the JUCE framework. Assertation fails at AudioProcessor::setPlayConfigDetails() (comment is "failed to find a compatible input configuration"). GUI/Audio Application works though.

Within the next few weeks I'm going to end up doing a refresh on the Windows install to get rid of the bad drivers, because uninstalling them hasn't helped. If I can provide the JUCE team with any diagnostic info in the meantime let me know.

Here's the call stack

PluginTest.exe!juce::AudioProcessor::setPlayConfigDetails(int newNumIns, int newNumOuts, double newSampleRate, int newBlockSize) Line 350 C++ PluginTest.exe!juce::AudioProcessorPlayer::setProcessor(juce::AudioProcessor processorToPlay) Line 48 C++ PluginTest.exe!juce::StandalonePluginHolder::startPlaying() Line 238 C++ PluginTest.exe!juce::StandalonePluginHolder::init(bool enableAudioInput, const juce::String & preferredDefaultDeviceName) Line 112 C++ PluginTest.exe!juce::StandalonePluginHolder::StandalonePluginHolder(juce::PropertySet settingsToUse, bool takeOwnershipOfSettings, const juce::String & preferredDefaultDeviceName, const juce::AudioDeviceManager::AudioDeviceSetup preferredSetupOptions, const juce::Array<juce::StandalonePluginHolder::PluginInOuts,juce::DummyCriticalSection,0> & channels, bool shouldAutoOpenMidiDevices) Line 103 C++ PluginTest.exe!juce::StandaloneFilterWindow::StandaloneFilterWindow(const juce::String & title, juce::Colour backgroundColour, juce::PropertySet settingsToUse, bool takeOwnershipOfSettings, const juce::String & preferredDefaultDeviceName, const juce::AudioDeviceManager::AudioDeviceSetup preferredSetupOptions, const juce::Array<juce::StandalonePluginHolder::PluginInOuts,juce::DummyCriticalSection,0> & constrainToConfiguration, bool autoOpenMidiDevices) Line 591 C++ PluginTest.exe!juce::StandaloneFilterApp::createWindow() Line 81 C++ PluginTest.exe!juce::StandaloneFilterApp::initialise(const juce::String & formal) Line 99 C++ PluginTest.exe!juce::JUCEApplicationBase::initialiseApp() Line 297 C++ PluginTest.exe!juce::JUCEApplication::initialiseApp() Line 92 C++ PluginTest.exe!juce::JUCEApplicationBase::main() Line 256 C++ PluginTest.exe!WinMain(HINSTANCE formal, HINSTANCE __formal, char formal, int formal) Line 47 C++

agdsat134 commented 3 years ago

Never mind the last post: I just created a new patch using the latest version of SOUL and it's working fine. Closing.