[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[fluid-dev] Re: FluidGUI on OS X
From: |
Ebrahim Mayat |
Subject: |
[fluid-dev] Re: FluidGUI on OS X |
Date: |
Tue, 25 May 2004 10:24:26 +0200 |
On May 24, 2004, at 6:28 PM, Ken Ellinwood wrote:
It might not be a simple matter to enable the TCP command port for
OS-X. The command port logic is currently written to assume that all
I/O with the client can be accomplished via read() and write() using
the file descriptor returned from the socket open call. This
definetly does not work on Windows, where send() and recv() must be
used.
The read() function which is defined to read input can be used on OS X.
It is part of libc and defined in the unistd.h, sys/types.h and
sys/uio.h headers. The write() API allows you to communicate with other
users, by copying lines from your terminal to theirs. So yes, the
read() and write() functions can be used on OS X.
The question is, what does the socket API look like on OS-X? Will
read() and write() work to perform I/O over the socket?
The socket() function call on OS X is similar to its BSD
implementation. So, off the cuff, yes, it should work together with
read() and write() for I/O. As to the precise application of socket(),
I haven't had any experience since I am not a programmer but a musician
who is interested in musical software. :-)
If yes, then simply rebuild fluidsynth with the TCP server enabled
(in config_macosx_pb.h, comment out the #define WITHOUT_SERVER line).
I'll give this a go.
One other important question: what do you precisely mean by the term
"TCP command port"? As with Linux, any OS X process can spawn a child
process and execute any command/program in that subprocess. This is
only limited by file system permissions. Inter-process communication
occurs via local domain sockets, pipes, or network sockets (e.g., TCP).
In most cases though, this communication occurs through pipes rather
than through TCP/IP.
At one point I had planned on providing a patch for fluidsynth that
would introduce the necessary polymorphism required in order to
support the command shell on the terminal and over sockets. Its not a
small task, and now that Peter has started an effort to provide a JNI
interface to fluidsynth, its more likely that a true cross-platform
implementation of FluidGUI will rely on the JNI interface and not the
TCP command shell interface.
Is JNI some kind of a Java superclass?
Regards.
Ebrahim