Playrec - Forum

Multi-channel Matlab Audio

You are not logged in.

#1 2008-11-19 20:14:04

rjollos
New member
From: Seattle, WA, USA
Registered: 2008-11-18
Posts: 3

Trouble compiling on OSX 10.5

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)


Attachments:
Attachment Icon JACK compilation errors.rtf, Size: 96,028 bytes, Downloads: 498

Offline

 

#2 2008-11-19 20:23:17

rjollos
New member
From: Seattle, WA, USA
Registered: 2008-11-18
Posts: 3

Re: Trouble compiling on OSX 10.5

Attached: Compiler errors when ASIO is selected.


Attachments:
Attachment Icon ASIO compilation errors.rtf, Size: 38,068 bytes, Downloads: 581

Offline

 

#3 2008-11-19 20:25:27

rjollos
New member
From: Seattle, WA, USA
Registered: 2008-11-18
Posts: 3

Re: Trouble compiling on OSX 10.5

Attached: Compiler errors when JACK is selected.


Attachments:
Attachment Icon JACK compilation errors.rtf, Size: 96,028 bytes, Downloads: 497

Offline

 

#4 2008-12-07 18:43:15

Rob
Administrator
Registered: 2007-12-23
Posts: 48

Re: Trouble compiling on OSX 10.5

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

 

#5 2008-12-08 05:48:36

Ryan Ollos
Guest

Re: Trouble compiling on OSX 10.5

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

 

#6 2009-10-23 12:07:48

himork
New member
Registered: 2009-10-23
Posts: 3

Re: Trouble compiling on OSX 10.5

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

 

#7 2010-07-09 12:49:30

max_mattus
New member
Registered: 2010-07-09
Posts: 2

Re: Trouble compiling on OSX 10.5

The solution proposed by himork works for me. Thank you!

Mac OS 10.6.4
Matlab 2009b

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB