magogware / godot-audiostreampd

A Godot add-on to stream audio from a Pure Data patch
MIT License
20 stars 2 forks source link

Update to godot 4 #4

Open guillaume-leo opened 1 year ago

guillaume-leo commented 1 year ago

At the moment this addon doesn't work in godot 4.

Do you know which changes needs to be done ?

Nomys commented 6 months ago

Same here, it would be nice to update it to 4.2.

I checked and got some errors on variables declaration and variable type creation (PDStream) in AudioStreamPD.gd.

Sadly I'm not competent enough to update it myself.

magogware commented 6 months ago

I could look into an update; the project isn't really in my focal area right now, but I'll check out the scope of updating it and give it a shot if it's not too much effort. Not sure on a timeframe for that.

ribponce commented 1 month ago

Hi @magogware , thanks so much for the effort on this repo. I'm also trying to see if I can get it working on Godot 4.3. As someone mentioned above, the problem I'm facing right now if with the PdStream type in AudioStreamPD.gd script. Looks like this PdStream object is saved as a .tres resource on the root of the addon, but it shows as a MissingResource (not sure if problematic). But it does look like it fails to create this special type that your script references. The export syntax from Godot 3 is easily updated as seen below, but I can't figure out the PdStream issue.

@export_file("*.pd") var patch : String
@export var interval : float

Thank you!

magogware commented 1 month ago

Hey @ribponce,

Have you tried grabbing my godot-pdstream repo, running the makefile, and using the new libraries it generates? I'm not sure what it'll take to update this and the backend native code, but that library would almost certainly need updating.

magogware commented 1 month ago

Okay, I've looked into what steps will need to happen to get this updated.

  1. Turn godot-pdstream into a GDExtension module, probably using the godot-cpp-template repo
  2. Update the tool script syntax in this repo
  3. Update the resource files in this repo to use the GDExtension module

I'm not really sure I have the interest in prioritising time to do step 1 at the moment, but I'll be happy to assist anyone that takes up the task.

ribponce commented 1 month ago

I almost got it working with a different repo that already has the GDextension module approach (I found it after yours), as it was done more recently for 4.2: https://github.com/kumikohime/gdpuredata But I ran into an issue with building with scons, which I posted there as well. I believe the repo takes care of step 1 you listed? Perhaps if you have interest you can try their repo too.