mrRay / vvopensource

OSC and MIDI frameworks for OS X and iOS, a framework for managing and rendering to GL textures in OS X, and a functional ISF (interactive shader format) implementation for OS X.
231 stars 33 forks source link

OSC inPort Duplicity #37

Open TGDrakaRG opened 2 years ago

TGDrakaRG commented 2 years ago

Hi there Mr Ray, first of all thank you for a fantastic framework. I’m using your framework in several Swift apps, with no real issues. There is one problem I would like to solve however… The OSC inPort creation routine works fine, except when another App is using that inPort already, in which case this results in a crash (the App just exits) I believe this is referred to in your code as ‘BAIL’? .What I would like to do is check if the inPort is already being used by another App, and if it is, increment the port number by 1 until the app finds an inPort it can successfully open a socket on. I have got around this so far in several very inelegant ways that I am not happy with… Any suggestions would be much appreciated.

On another note, there are many messages in XCode saying OSCSpinLock is deprecated… do you have any plans to update your code to avoid these, or could you give me a pointer as to how to do it myself? The Apple docs are vague and imprecise to say the least,

Thank you very much!