You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.
I'm having mixed results building my patch for Unity using the same .pd files that produced working .dll's on the enzienaudio.com website generator. On my end the python script seems to complete with no errors. I can take the resulting files and use the jdk to produce an Android AudioLib.so that builds and works correctly in Unity and built on my Android device.
I'm running into issue with the Win64 and iOS plugins though. Building the visual studio project completes with no errors, but in the Unity editor, I receive the following error when trying to run with the resulting AudioLib.dll:
`Microsoft Visual C++ Runtime Library
Assertion failed!
Program: ...layer.010.unity.win.x64\Hv AccoPlayer AudioLib.dll File: d: heavy builds \accordata \ unity\ sour... \ heavycontext.cpp Line: 133
Expression: false && -::sendMessageToReceiver - The input message queue is full and cannot accept more messages until they have been processed. Try increasing the inQueueKb size in the new with_options(l constructor.'
Since I had success with the Android build I also tried my luck with OSX, but when using the Xcode built bundle Unity crashes with a similar error:
Application Specific Information:
Assertion failed: (false && "::sendMessageToReceiver - The input message queue is full and cannot accept more messages until they " "have been processed. Try increasing the inQueueKb size in the new_with_options() constructor."), function sendMessageToReceiver, file /Users/user912434/Downloads/AccoplayerV10_buildFiles/unity/source/heavy/HeavyContext.cpp, line 133.
I have tried with a less complex test patch, and there it was working correctly in Unity and built for both Android and Win64. It would suggest there is something wrong with my source patch, but the same patch worked correctly when it was built on enzienaudio.com.
My .pd source files are located here: https://github.com/moshang/Accordata/tree/master/Assets/Plugins/AccoPlayer_Source
The project on on Github runs correctly, by the way, since I'm still using the Win64 AudioLib.dll created on by your website. With those files I'm good to go on Android and Win64, but I'm stuck making updates to the PD project and I don't have a working OSX/iOS solution.
The text was updated successfully, but these errors were encountered:
Have you tried following the indications in the error message?
Try increasing the inQueueKb size in the new_with_options() constructor.")
If you go to the generated files, you will find: source/unity/Hv_xxx_AudioLib.cs, where xxxx is the name of your patch.
In there you will find a line like:
public Hv_xxxx_Context(double sampleRate, int poolKb=10, int inQueueKb=2, int outQueueKb=2) {
There, try increasing the default value for inQueueKb. If this works, you can change the default behaviour of hvcc by editing hvcc.py, either changing the heuristic or setting static values:
# generate patch heuristics to ensure enough memory allocated for the patch
"memoryPoolSizesKb": {
"internal": 10, # TODO(joe): should this increase if there are a lot of internal connections?
"inputQueue": max(2, int(len(in_parameter_list) + len(in_event_list) / 4)),
"outputQueue": max(2, int(len(out_parameter_list) + len(out_event_list) / 4)),
}
Sweet success! Raising the inQueueKb from the default (in my case) 5 to 7 got rid off the crashes. For future use, I've updated the line in hvcc.py to: "inputQueue": max(7, int(len(in_parameter_list) + len(in_event_list) / 4)),
I still had an issue where the audio would crackle severely inside the Unity editor, but would sound fine when built. I resolved this by going to Project Settings/Audio in Unity and changing the System Sample Rate setting to 44100 and DSP Buffer Size to Best Performance.
My patch is now confirmed working in Win X64, Android, and iOS. Heavy rocks!
Thanks for the help!
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm having mixed results building my patch for Unity using the same .pd files that produced working .dll's on the enzienaudio.com website generator. On my end the python script seems to complete with no errors. I can take the resulting files and use the jdk to produce an Android AudioLib.so that builds and works correctly in Unity and built on my Android device.
I'm running into issue with the Win64 and iOS plugins though. Building the visual studio project completes with no errors, but in the Unity editor, I receive the following error when trying to run with the resulting AudioLib.dll:
Since I had success with the Android build I also tried my luck with OSX, but when using the Xcode built bundle Unity crashes with a similar error:
I have tried with a less complex test patch, and there it was working correctly in Unity and built for both Android and Win64. It would suggest there is something wrong with my source patch, but the same patch worked correctly when it was built on enzienaudio.com.
My .pd source files are located here: https://github.com/moshang/Accordata/tree/master/Assets/Plugins/AccoPlayer_Source
The project on on Github runs correctly, by the way, since I'm still using the Win64 AudioLib.dll created on by your website. With those files I'm good to go on Android and Win64, but I'm stuck making updates to the PD project and I don't have a working OSX/iOS solution.
The text was updated successfully, but these errors were encountered: