Skip to content
Snippets Groups Projects
Commit 9dbbb96a authored by Florent Berthaut's avatar Florent Berthaut
Browse files

Add test for gdpd initialisation

parent 854f762f
No related branches found
No related tags found
No related merge requests found
...@@ -78,6 +78,7 @@ func _ready(): ...@@ -78,6 +78,7 @@ func _ready():
# PureData mode # PureData mode
if _pd_mode==PdMode.LIBPD : if _pd_mode==PdMode.LIBPD :
var gdpdir = DirAccess.open("res://addons/gdpd") var gdpdir = DirAccess.open("res://addons/gdpd")
var gdpdok : bool = false
if gdpdir : if gdpdir :
_gdpd = ClassDB.instantiate("GdPd") _gdpd = ClassDB.instantiate("GdPd")
add_child(_gdpd) add_child(_gdpd)
...@@ -85,6 +86,7 @@ func _ready(): ...@@ -85,6 +86,7 @@ func _ready():
# Get all input and output devices # Get all input and output devices
var inps = _gdpd.get_available_input_devices() var inps = _gdpd.get_available_input_devices()
var outs = _gdpd.get_available_output_devices() var outs = _gdpd.get_available_output_devices()
if inps.size()>0 and outs.size()>0 :
# Initialise the first ones # Initialise the first ones
_gdpd.init_devices(inps[0], outs[0]) _gdpd.init_devices(inps[0], outs[0])
# Open patch # Open patch
...@@ -92,7 +94,9 @@ func _ready(): ...@@ -92,7 +94,9 @@ func _ready():
var patch_name = global_patch.split("/")[-1] var patch_name = global_patch.split("/")[-1]
var patch_dir = global_patch.trim_suffix(patch_name) var patch_dir = global_patch.trim_suffix(patch_name)
_gdpd.openfile(patch_name, patch_dir) _gdpd.openfile(patch_name, patch_dir)
else : gdpdok=true
if not gdpdok :
print("IVMI : Could not load gdpd addon") print("IVMI : Could not load gdpd addon")
_pd_mode=PdMode.OSC _pd_mode=PdMode.OSC
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment