Posts

Post not yet marked as solved
0 Replies
516 Views
Apparently, the call to performDefaultImplementation of an AppleScript is called on the main runloop with the defaultModes only, so it is not called while a menu (or contextual menu) is open. This is very unfortunate as it means the execution of these scripts is delayed until after the menu is closed. Looking for a way to change this behaviour but I have no clue how... Thanks ! Daniel
Posted
by dtapie.
Last updated
.
Post not yet marked as solved
0 Replies
822 Views
Hi, I have been searching all over for a way to do this on macOS: playing different stereo files on different pairs of audio outputs of the same hardware device. I am currently using AVAudioEngine with two AVAudioPlayerNodes and I can mix them and change the mapping of the entire mix through the use of AudioUnitSetProperty on the engine output, but I cannot have multiple AVAudioPlayerNodes play on different outputs. Obviously, being on macOS I cannot use AVAudioSession... Thank you if anyone has any idea on how to achieve this !
Posted
by dtapie.
Last updated
.
Post not yet marked as solved
7 Replies
927 Views
I am trying to have multiple applications listen to the same port but from different local IP addresses but it looks like it doesn't work. Here is my code: localEndPoint = nw_endpoint_create_host(ip1, port1234) nw_parameters_set_local_endpoint(params, localEndPoint); ... nw_listener_create(params) ... So application 1 will use ip1 and application 2 a different local address (ip2) to listen from. When I do that, the second app launched always fails to start the listener with an "address already in use" error. I thought it was possible, but I am obviously wrong... Any insight anyone ? Thanks ! Daniel
Posted
by dtapie.
Last updated
.
Post marked as solved
5 Replies
1.3k Views
So I'd like to listen on port 80 for instance and depending on the request, upgrade the connection to WebSocket or leave it as HTTP. I could have two different servers on two different ports, but that is not what I want as they need to share the same port. Thank you ! Daniel Tapie
Posted
by dtapie.
Last updated
.
Post marked as solved
1 Replies
3.1k Views
Hi, I have been successful at writing Swift code using a NWListener to listen to WebSocket connections on a specific port, but I do not seem to be able to get the path from the URL for creating different types of connections. For instance, differentiating between ws://127.0.0.1:80/updates and ws://127.0.0.1:80/changes. I'd like to be able to get the "updates" or "changes" part when I receive the new connection notification. Having more sample code around WebSockets and how the upgrade process works that would also be great. Thank you ! Daniel Tapie
Posted
by dtapie.
Last updated
.