[CSOUND-DEV:3285] RE: load_opcodes.c
Date | 2003-11-05 15:03 |
From | "gogins@pipeline.com" |
Subject | [CSOUND-DEV:3285] RE: load_opcodes.c |
It's not correct, and it can't be correct, because as far as I know, nobody has worked on plugin opcodes who knows how to code dynamically loaded libraries on Windows, Linux, and OS X. As far as I know, plugins haven't been implemented on OS X, but I WOULDN'T know, because I don't HAVE OS X. I would think Matt Ingalls would know. Maybe he's even implemented it. If so, you could paste his code into the aforementioned functions for Mac OS X. Whatever, the code should be consistent on all platforms. My original intention was to abstract plugin loading with the aforementioned API functions, which would be used by Csound itself as well as plugins themselves. What would really be ideal here, and maybe with you and John Ramsdell working on this maybe we can get there, is a single GNU build system that would work for all 3 major platforms (Windows, Linux, OS X). This could be done by building on Windows with Cygwin (with -mno-cygwin) or mingw/MSYS. But audio is the thorn in our side here. It might take custom build rules in the Makefile.am's for the audio driver .o's to get the audio drivers building. Original Message: ----------------- From: stevenyi stevenyi@csounds.com Date: Tue, 04 Nov 2003 22:54:58 -0800 To: csound-dev@eartha.mills.edu Subject: [CSOUND-DEV:3283] load_opcodes.c Hi all, I was trying to work with this file but got a bit confused. The way the #ifdef's are, if you have WIN32 defined, you get csoundOpenLibrary, csoundCloseLibrary, and csoundGetLibrarySymbol. If you have LINUX defined, you get the first three plus csoundLoadExternals. If you have MACINTOSH defined, you get the above four functions plus csoundLoadExternal. Is this correct? Thanks, steven -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . |
Date | 2003-11-05 16:05 |
From | ramsdell@mitre.org (John D. Ramsdell) |
Subject | [CSOUND-DEV:3288] RE: load_opcodes.c |
"gogins@pipeline.com" |
Date | 2003-11-05 18:50 |
From | stevenyi |
Subject | [CSOUND-DEV:3292] load_opcodes.c |
Hi all, I went ahead and modified load_opcodes.c in a way I think has cleaned it up. I have checked into Csound4 CVS a csound.c with stubs removed and load_opcodes.c with new code. The #ifdef's now define csoundOpenLibrary, csoundCloseLibrary, and csoundGetLibrarySymbol per platform. csoundLoadExternal and csoundLoadExternals were redone to be dependent on the first three functions, so they're now compiled in regardless. csoundLoadExternal and csoundLoadExternals should fail gracefully if the other three functions aren't implemented. csoundLoadExternals was changed to implement how it is being used in dl_opcodes.c, which is to look at cglobs.oplibs for a comma-separated string of library paths. This was done so that load_opcodes.c and csound.c can now be a drop in replacement of jpff_glue.c and dl_opcodes.c. It can probably be modified easily to implement the other functionality that was in the previous load_opcodes.c, which is to look for an environment variable and crawl the directory. One easy way I guess would be to make a comma-separated list from the directory, then join that with the one in cglobs.oplibs, then proceed from there. I have not tried this on Windows, but it looks like it would work fine. Mac functions are not implemented. Please let me know if this modification breaks anything for those using csound.c and load_opcodes.c. Thanks! steven p.s. - csoundLoadExternals as implemented is not as described in csound.h, but this is how it was implemented in dl_opcodes.c. |
Date | 2003-11-07 01:25 |
From | "Matt J. Ingalls" |
Subject | [CSOUND-DEV:3307] RE: load_opcodes.c |
plugins work in my port on osx as cfm libraries - very soon now will be finally moving to mach-o csoundlib, and i will throw in the mach-o bundle stuff in the plugin code too.. -m On Wed, 5 Nov 2003, gogins@pipeline.com wrote: > It's not correct, and it can't be correct, because as far as I know, nobody > has worked on plugin opcodes who knows how to code dynamically loaded > libraries on Windows, Linux, and OS X. As far as I know, plugins haven't > been implemented on OS X, but I WOULDN'T know, because I don't HAVE OS X. I > would think Matt Ingalls would know. Maybe he's even implemented it. If so, > you could paste his code into the aforementioned functions for Mac OS X. > > Whatever, the code should be consistent on all platforms. My original > intention was to abstract plugin loading with the aforementioned API > functions, which would be used by Csound itself as well as plugins > themselves. > > What would really be ideal here, and maybe with you and John Ramsdell > working on this maybe we can get there, is a single GNU build system that > would work for all 3 major platforms (Windows, Linux, OS X). This could be > done by building on Windows with Cygwin (with -mno-cygwin) or mingw/MSYS. > But audio is the thorn in our side here. It might take custom build rules > in the Makefile.am's for the audio driver .o's to get the audio drivers > building. > > Original Message: > ----------------- > From: stevenyi stevenyi@csounds.com > Date: Tue, 04 Nov 2003 22:54:58 -0800 > To: csound-dev@eartha.mills.edu > Subject: [CSOUND-DEV:3283] load_opcodes.c > > > Hi all, > > I was trying to work with this file but got a bit confused. The way the > #ifdef's are, if you have WIN32 defined, you get csoundOpenLibrary, > csoundCloseLibrary, and csoundGetLibrarySymbol. If you have LINUX > defined, you get the first three plus csoundLoadExternals. If you have > MACINTOSH defined, you get the above four functions plus > csoundLoadExternal. > > Is this correct? > > Thanks, > steven > > > > -------------------------------------------------------------------- > mail2web - Check your email from the web at > http://mail2web.com/ . > > |