rodrigodzf / Jack-Audio-For-Unity

Jack Audio support for Unity3d
MIT License
30 stars 7 forks source link

Fixes crash on Windows #5

Closed Schroedingers-Cat closed 6 years ago

Schroedingers-Cat commented 6 years ago

This PR fixes a crash when using the plugin on Windows. On starting the sample unity project, the jack server sets it's samplerate to 0Hz and rendering all jack-connected applications unstable. To fix this issue, I simply recompiled the plugin from source.

Additionally, I set up the unity project to use the settings you recommend in the readme.md: 1024 buffer size and run in background.

Schroedingers-Cat commented 6 years ago

Do you have an idea why I had to recompile the plugin in the first place?

rodrigodzf commented 6 years ago

not really, it worked fine on the computers where I tried it. perhaps it has something to do with win7

Schroedingers-Cat commented 6 years ago

OK, then this should be investigated.

Did you compile on Win7 x64 or x86? What Jack version did you use?

rodrigodzf commented 6 years ago

It was Win7 x64 if I remember correctly and jack 1.9.10

On Sep 2, 2017, at 10:00, Schroedingers-Cat notifications@github.com wrote:

OK, then this should be investigated.

Did you compile on Win7 x64 or x86? What Jack version did you use?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/rodrigodzf/Jack-Audio-For-Unity/pull/5#issuecomment-326729361, or mute the thread https://github.com/notifications/unsubscribe-auth/ADktc1Pfnnd1kL6ETKObdJUyEoAp_Sxmks5seQspgaJpZM4PKJ0W.

Schroedingers-Cat commented 6 years ago

I think I found the reason. You need to use the Jack server version that you used to compile the plugin.

Your unity plugin has been compiled using jack 1.9.10 while my version has been compiled using jack 1.9.11. I'm not able to use your plugin with Jack 1.9.11 but it works with Jack 1.9.10. This also happens vice versa, meaning I can only use my version with Jack 1.9.11 but not with 1.9.10.

This should be mentioned in the README.md.

KittyChaosPlanet commented 6 years ago

hi, so is possible to share compiled plugin for jack 1.9.11 please? I do not know how to do it. It would be great to have such great thing working!

Schroedingers-Cat commented 6 years ago

It already is in the repo: https://github.com/rodrigodzf/Jack-Audio-For-Unity/raw/master/sample_jackscene/Assets/Plugins/x86_64/AudioPluginDemo.dll

KittyChaosPlanet commented 6 years ago

is it in this too rght? https://github.com/Schroedingers-Cat/Jack-Audio-For-Unity/tree/debug/crash-42-fx-outs

I start example scene in Unity Editor. Unity shows up in Jack connections, but Unitzy Freeze / or Jack server stops after that play moment. I am not sure what is reason. I will be searching again, but it is not clear to me. I use Jack for other apps, and it is ok.

Schroedingers-Cat commented 6 years ago

is it in this too rght? https://github.com/Schroedingers-Cat/Jack-Audio-For-Unity/tree/debug/crash-42-fx-outs

That one fixes a crash if you use more than 40 jack output channels in Unity. It has been compiled with Jack 1.9.11, too. So it should work with your Jack 1.9.11.

Can you give more details about your system? OS, bit, Unity version, Jack version and all that stuff. And please double check that you are using Jack 1.9.11 and not another version. Is your Jack x64 or x86?

KittyChaosPlanet commented 6 years ago

Hi, I am back.. Windows 10 64-bit. --- Unity version 2017.1.1f1 Jack, installed with windows instructions, it is 1 .9.11 - 64 bit It was not easy for me to install it (Win terminal) Jack was much more clear when I was Ubuntu user. Actually I need win 10.

So can you recomend something to me please? i am looking forward for jack Unity audio connection for my project. I heard about other Jack core software, but didnt make it working yet on this system.

THX