Multi-channel Matlab Audio
You are not logged in.
Hi,
I have been able to compile with Core Audio API, however compilation fails when I select the ASIO and/or Jack Audio Connection Kit APIs.
My configuration is:
* Mac OSX 10.5.5
* Playrec 2.1.1
* GCC-4.0 compiler
* Port Audio Library V19 2007-12-07
* ASIO SDK v2.2
* MATLAB r2008b
During mex -setup, I selected the options file:
2: /Applications/MATLAB_R2008b.app/bin/gccopts.sh :
Template Options file for building gcc MEX-files
My install directory is PLAYREC = /Users/ap/MATLAB/AudioTools/plarec_2_1_1
Port Audio is installed in $PLAYREC/lib/portaudio
The ASIO SDK is installed in $PLAYREC/lib/ASIOSDK2
The JACK compilation errors are attached. I'll attach the ASIO compilation errors in a post to follow.
The errors where generated when trying to compile ASIO only, and JACK only. As I mentioned, compilation is successful when only Core Audio is selected.
Last edited by rjollos (2008-11-19 20:27:10)
Offline
Attached: Compiler errors when ASIO is selected.
Offline
Attached: Compiler errors when JACK is selected.
Offline
Hi!
Sorry for the delay in replying. The options within Playrec when compiled on Mac have not been very thoroughly tested because I have had to rely on other people to try things out. Therefore it is likely that not all options will necessarily work (the GUI rules out all of those that I knew would definitely not work, but doesn't mean all those available will definitely work).
Do you have a reason to get this compiling with ASIO and/or JACK or were you just trying it to see if it worked? As you've got CoreAudio working, I believe this should be sufficient for almost all cases.
If you do have a reason to get either ASIO or JACK running then let me know and I'll try and investigate further.
Thanks,
Rob
Offline
Rob wrote:
Hi!
Do you have a reason to get this compiling with ASIO and/or JACK or were you just trying it to see if it worked? As you've got CoreAudio working, I believe this should be sufficient for almost all cases.
Thanks,
Rob
Yeah, you are right, as far as I have seen CoreAudio will work for my purposes. Thanks for the feedback!
- Ryan
Hi rjollos,
I had exactly the same problem when trying to compile playrec (OSX 10.5.8, Matlab 2009b, GCC 4.0, Playrec 2.1.1, Portaudio v19) with CoreAudio. After some trial and error and by reading this other post http://www.playrec.co.uk/forum/viewtopic.php?id=68 I actually found a solution that works for me.
The problem is in the linker that does not find a number of symbols which are defined in the frameworks CoreServices, CoreFoundation, AudioUnit, AudioToolbox and CoreAudio. The solution to add the 'extra_flags' from the other post was correct, but mex() must pass these flags only to the linker. So the solution is to add this code at line 108 in the file 'compile_playrec_func.m':
extra_flags = [extra_flags,{'LDFLAGS=\$LDFLAGS -framework CoreServices -framework CoreFoundation -framework AudioUnit -framework AudioToolbox -framework CoreAudio'}];
where LDFLAGS are gcc flags for the linking phase (see also this post in the Matlab forum: http://www.mathworks.de/matlabcentral/n … ead/148409 ).
Hope this is useful for you.
Cheers
Marco
Offline
The solution proposed by himork works for me. Thank you!
Mac OS 10.6.4
Matlab 2009b
Offline