[CSOUND-DEV:5269] Mac OSX real time audio in Csound 4
Date | 2004-08-24 11:55 |
From | ramsdell@mitre.org (John D. Ramsdell) |
Subject | [CSOUND-DEV:5269] Mac OSX real time audio in Csound 4 |
I think this is a question for Matt, but it may be for John. I made it so that libcsound generated on Mac OSX can be built with real time audio enabled, and made this configuration the default. To do this, I added csound/rtcore.c to the list of source files used to build on Mac OSX, and added "-framework CoreAudio" to the link command. To avoid duplicate main routines, I modified csound/rtcore.c so that the main routine is omitted when DARWIN is defined. Is this the correct way to enable real time audio on OSX? I hope the code does not depend on initialization performed in main. I noticed that the only meaningful difference between the files csound/rtcore.c and csound/rtcoreaudio.c is that one only acknowledges Matt, but the other acknowledges both Matt and John. Why are both files in the repository? With the above changes, and the previously mentioned edits to csound/{aiff.c,linevent.c,soundio.c}, Csound 4 compiles and links on OS X. Unfortunately, when I try to build the package in an environment in which FLTK is available, the compilation fails. It fails compiling our old "friend" widgets.cpp. John $ make Making all in csound make all-am source='widgets.cpp' object='widgets.o' libtool=no \ depfile='.deps/widgets.Po' tmpdepfile='.deps/widgets.TPo' \ depmode=gcc3 /bin/sh ../depcomp \ g++ -DHAVE_CONFIG_H -I. -I. -I. -fno-exceptions -fno-rtti -g -O2 -Wall -I/Us\ers/ramsdell/include -c -o widgets.o `test -f 'widgets.cpp' || echo './'`widget\s.cpp widgets.cpp: In function `void displ(float, float)': widgets.cpp:1786: error: `gcvt' undeclared (first use this function) widgets.cpp:1786: error: (Each undeclared identifier is reported only once for each function it appears in.) /usr/include/gcc/darwin/3.3/c++/bits/stl_construct.h: At top level: widgets.cpp:1428: warning: `long unsigned int threadHandle' defined but not used widgets.cpp:1706: warning: `void fltkRun(void*)' defined but not used widgets.cpp:1737: warning: `void fltkKeybRun(void*)' defined but not used make[2]: *** [widgets.o] Error 1 make[1]: *** [all] Error 2 make: *** [all-recursive] Error 1 $ ../../bin/fltk-config --cxxflags -I/Users/ramsdell/include $ ../../bin/fltk-config --version 1.1.4 $ |
Date | 2004-08-24 12:39 |
From | ramsdell@mitre.org (John D. Ramsdell) |
Subject | [CSOUND-DEV:5270] Re: Mac OSX real time audio in Csound 4 |
ramsdell@mitre.org (John D. Ramsdell) writes: > widgets.cpp:1786: error: `gcvt' undeclared (first use this function) Hmm. This function in declared in stdlib.h on Linux and has a man page. http://www.opengroup.org/onlinepubs/007908799/xsh/gcvt.html John |
Date | 2004-08-24 12:46 |
From | John ffitch |
Subject | [CSOUND-DEV:5273] Re: Mac OSX real time audio in Csound 4 |
And I have fixed this many times and people keep returning to non-sdtandard code |
Date | 2004-08-24 20:15 |
From | Anthony Kozar |
Subject | [CSOUND-DEV:5274] Re: Mac OSX real time audio in Csound 4 |
On 8/24/04 6:55 AM, John D. Ramsdell |
Date | 2004-08-26 08:08 |
From | jpff@codemist.co.uk |
Subject | [CSOUND-DEV:5275] Re: Mac OSX real time audio in Csound 4 |
>>>>> "John" == John D Ramsdell |
Date | 2004-08-27 15:46 |
From | ramsdell@mitre.org (John D. Ramsdell) |
Subject | [CSOUND-DEV:5276] Re: Mac OSX real time audio in Csound 4 |
jpff@codemist.co.uk writes: > I have removed gcvt from the sources twice. It is not a standard > function, and its use is totally frivolous. Perhaps I have to > remove it again (and again) John, I compared the version of widget.cpp in Csound.tar.gz of package csound version csound4.23f12 and found quite a few differences with the csound/widget.cpp in the csound module, however, both files contained references to gcvt. I also looked at InOut/widgets.cpp in the csound5 module, and noticed it does not contain references to gcvt. I modified the csound/widget.cpp in the csound module so that it uses sprintf instead of gcvt by copying code from the csound5 version. I also fixed csound/{aiff.c,linevent.c,soundio.c} so that non-standard definitions of the read and write system calls are not used whenever MACOSX is defined. With these changes, the system compiles and builds on OSX. All changes were documented in ChangeLog. John |
Date | 2004-08-27 15:51 |
From | ramsdell@mitre.org (John D. Ramsdell) |
Subject | [CSOUND-DEV:5277] Re: Mac OSX real time audio in Csound 4 |
Anthony Kozar |
Date | 2004-08-27 16:03 |
From | ramsdell@mitre.org (John D. Ramsdell) |
Subject | [CSOUND-DEV:5278] Re: Mac OSX real time audio in Csound 4 |
ramsdell@mitre.org (John D. Ramsdell) writes: > Anthony Kozar |
Date | 2004-08-27 19:19 |
From | Anthony Kozar |
Subject | [CSOUND-DEV:5279] Re: Mac OSX real time audio in Csound 4 |
On 8/27/04 11:03 AM, John D. Ramsdell |
Date | 2004-08-28 15:09 |
From | ramsdell@mitre.org (John D. Ramsdell) |
Subject | [CSOUND-DEV:5280] Csound 4 GBS for Mac OSX |
I release csound-4.23f12gbs.4.tar.gz in the csoundgbs package. This source distributions compiles and links on Mac OSX. It also contains an improvement by jpff documented in the ChangeLog as "Skip initialization options". Thanks John. I don't have access to a console, so I've never seen or heard the results of running binaries built with this release. This version does use FLTK if it is available. John |
Date | 2004-08-29 20:23 |
From | Anthony Kozar |
Subject | [CSOUND-DEV:5285] Re: Csound 4 GBS for Mac OSX |
Success! (Well mostly). I was able to compile and install everything with the standard ./configure, make, and make install. Since I still don't have X11 or FLTK, configure correctly set up the compilation without them and did turn on RT Audio. That is the good news. The bad news is that RT audio does not work (at least for me). I get a Bus Error whenever I use -odac or -odevaudio. Both of these work fine with the binary I compiled from jpff's distribution of 4.23f12. Other differences/problems that I noticed: 1. The jpff binary reports the message "Csound tidy up: Bus Error" at the end of some runs (especially csound without arguments) but the GBS version does not (this is good of course, but I'd like to know why). 2. The problem that I was looking for originally (not being able to read orchestra files with line endings from another platform) IS present. 3. The default installation location of /usr/local/bin is not on the default path for OS X user accounts (at least under 10.2). I will go ahead and fix #2 by removing the patch I applied from jpff's 4.23f12. I would like to get an OS X binary release out soon. I will be adding the materials I have here for making an OS X installer package (with default location of /usr/bin). That should make it easy for the average OS X user to install. So, #3 may or may not be a problem (depending on what we expect of someone who is recompiling csound for some reason). It would be nice to integrate the installer-maker commands into the GBS build process as an optional step once I have it working. I will try to investigate the real-time audio problem as well (which I suspect may be linked to #1), but I would appreciate advice from anyone who understands how it works on OS X. Anthony On 8/28/04 10:09 AM, John D. Ramsdell |
Date | 2004-08-31 01:09 |
From | ramsdell@mitre.org (John D. Ramsdell) |
Subject | [CSOUND-DEV:5286] Re: Csound 4 GBS for Mac OSX |
Anthony Kozar |
Date | 2004-09-10 07:37 |
From | Anthony Kozar |
Subject | [CSOUND-DEV:5294] Re: Csound 4 GBS for Mac OSX |
On 8/30/04 8:09 PM, John D. Ramsdell |