soul-lang / SOUL

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

Command Line Util `soul play` not closing soul process #18

Closed eaeiv closed 4 years ago

eaeiv commented 4 years ago

Windows x64 10.0.17763 Build 17763 Scarlett 2i2 SOUL master branch Command Line Utils v0.8.875

I just pulled the repo's master branch and installed 0.8.875 of the command line tools to mess around with the standalone example .soul files. When using soul play [soul file] the first time, the program spawns a soul process, outputs execution info to my terminal, and outputs the audio. However, the soul process never closes. Running another soul play command yields another spawned soul process, command line output, but no audio. By repeating this you can spawn keep spawning new soul processes that will never close or output any audio.

Killing all of the soul processes fixes the audio issue allowing the soul play command to output audio, but the process still has to be killed manually.

Can anyone else replicate this issue?

cesaref commented 4 years ago

That's an odd one - i take it you mean playing a soul file, not a soulpatch? I'll try and replicate this

cesaref commented 4 years ago

I've reproduced this behaviour on windows. The issue I think is to do with how the Projucer project is configured, so i'm going to investigate what can be done. If you launch a soulpatch, you end up with a GUI window for the soul process, so closing it is much easier! Also, if you run it under cygwin it behaves how you'd probably expect (the command prompt doesn't return and you can control-c the running process).

The problem with only the first running soul.exe giving audio output is due to an exclusive opening of the audio driver if it's available. This gives the best performance, but is clearly something that you may not want so I think it's best if we add support for exclusive access as a command line option (not the default).

cesaref commented 4 years ago

I believe this is fixed in the current version