After 7-8 hours of work, I again have Csound 5 working somewhat on MacOS 9.
(The last time I worked on this was last June).
I had to "slash and burn" a lot of functionality like graphs, rt audio,
midi, and the utilities for now. And many files that used to be in the
build had to be removed (I imagine this is because most of them have become
plugins -- I haven't compiled any plugins yet). I noticed none of the
utilities seem to be part of the main library any more. Is this correct?
(I could not compile files like hetro.c and lpanal.c).
Almost everything compiled nicely once I added new files and started to
convert the Mac code over to using the API (Perf is no longer directly
accessing Csound globals!). libsndfile is working.
There was a crash in dispexit() because a NULL pointer was passed to the
ExitGraph callback. And no files other than orch/score could be read or
written until the new code in envvar.c was fixed for MacOS-style pathnames.
It is late, so I am going to wait until tomorrow to commit the changes.
Just thought you all might like to know that I am back on track and expect
that the migration to Csound 5 and the API might be smoother than I had
thought. (Basically, I don't expect MacOS 9 Csound to be able to use
PortAudio or PortMidi, but I think that will be OK since the host app can
set callbacks for rt audio and midi).
Thanks to everyone for all of their hard work in recent months and for being
careful to keep the code as portable as possible !!
I've been continuing to work on this and making more progress. (You can
safely ignore this progress report if uninterested in the Legacy Mac
I have removed or replaced about half of the references to the
mills_macintosh macro in the core Csound code. Many of them should have
been "mac_classic" anyways (indicating features that should be available in
any version of Csound for MacOS 9, not just the Mills interface version).
This was easy to do since it seems that a lot of the Mills-specific code had
already been removed (most notably in argdecode.c). I am not sure why this
was done, but many of the special Mac options _might_ no longer be necessary
after switching over to the API completely.
I compiled a Csound5Lib shared library containing none of the Mills Mac code
from Perf, and only exporting the API functions. Then I compiled Perf with
none of the Csound code but linking to the shared library and it does work.
(This would seem to indicate that I have been successful in eliminating all
of the non-API dependencies between the two). So, I am now at a state
similar to where Matt must have been several years ago with the first
version of MacCsound (ahhh ... progress ;)
Next up will probably be to register callbacks for graphs and maybe even
real-time audio in the new Perf "host" application. (and committing
yesterday's changes). Eventually, I anticipate combining the old Mills
Csound and Perf apps into a single host application, adding host-based Midi
(thus hopefully avoiding any licensing issues), etc. I might be looking for
a spiffy new name for this host ...