Auto-connection concepts / Pro Tools issue
Posted: 22 Feb 2012, 13:04
So, I'm back experimenting and as previously announced I have a number of questions:
What I am trying to do is create a hybrid MIDI device and have that autoconnect itself to the default "MIDI" object. I'm fine with the first part. I can create the device and am able to send and receive data when I wire it up manually. However I seem to get stuck with the second part, mostly due to understanding basic concepts, I guess. Effectively I reached the point where your documentation is more a "to do" list
My guess would be that I need to query for remote devices, find the one I'm interested in, then query that for in- and outputs and connect myself. So I played around with those async "Find" routines and while I am in fact finding the remote device I have no real idea how to proceed from there onwards.
First of all: How about the IRemoteDevice* validity in the OnCHAI_RemoteDevice_Find_Return callback? It seems to go out of scope when that message returns and I can't seem to access it afterwards. If that is the case, am I expected to trigger In- and Output queries on that device from within the callback?
Second, when I do that (call FindFirstInputInformation_Async from the callback and FindNextInputInformation_Async from the OnRemoteDevice_XXXInputInfo_Return callback) I do get both a MID2CPInterface and a CP2MIDIInterface pointer. However I would somehow expect one of them to be an output and rather appear in OnRemoteDevice_XXXOutputInfo_Return, but I never get anything in the FindFirst / Next Output / XXXOutput sequence, both are retrieved in the input related sequence. Given that's still perfectly OK, how do I proceed from there in order to connect them to my local device?
Finally I'm afraid I found another problem in CopperLan (you'll start to hate me soon..). Namely there seems to be a conflict with Pro Tools on Windows. When CopperLan is installed, Pro Tools gets stuck and becomes unresponsive on opening or creating sessions. Uninstall CopperLan and everything is fine. I have reproduced that on Vista and Windows 7 systems, both 64bit. Of course I can't guarantee that it is not somehow related to something specific to those particular machines, but I would appreciate if you could take a look at this. After all it's about Pro Tools, so even if nobody really likes it, it will still be everywhere.
Thanks and regards
nils
What I am trying to do is create a hybrid MIDI device and have that autoconnect itself to the default "MIDI" object. I'm fine with the first part. I can create the device and am able to send and receive data when I wire it up manually. However I seem to get stuck with the second part, mostly due to understanding basic concepts, I guess. Effectively I reached the point where your documentation is more a "to do" list
My guess would be that I need to query for remote devices, find the one I'm interested in, then query that for in- and outputs and connect myself. So I played around with those async "Find" routines and while I am in fact finding the remote device I have no real idea how to proceed from there onwards.
First of all: How about the IRemoteDevice* validity in the OnCHAI_RemoteDevice_Find_Return callback? It seems to go out of scope when that message returns and I can't seem to access it afterwards. If that is the case, am I expected to trigger In- and Output queries on that device from within the callback?
Second, when I do that (call FindFirstInputInformation_Async from the callback and FindNextInputInformation_Async from the OnRemoteDevice_XXXInputInfo_Return callback) I do get both a MID2CPInterface and a CP2MIDIInterface pointer. However I would somehow expect one of them to be an output and rather appear in OnRemoteDevice_XXXOutputInfo_Return, but I never get anything in the FindFirst / Next Output / XXXOutput sequence, both are retrieved in the input related sequence. Given that's still perfectly OK, how do I proceed from there in order to connect them to my local device?
Finally I'm afraid I found another problem in CopperLan (you'll start to hate me soon..). Namely there seems to be a conflict with Pro Tools on Windows. When CopperLan is installed, Pro Tools gets stuck and becomes unresponsive on opening or creating sessions. Uninstall CopperLan and everything is fine. I have reproduced that on Vista and Windows 7 systems, both 64bit. Of course I can't guarantee that it is not somehow related to something specific to those particular machines, but I would appreciate if you could take a look at this. After all it's about Pro Tools, so even if nobody really likes it, it will still be everywhere.
Thanks and regards
nils