An Objective-C wrapper on the Apple AudioUnits API.
It's far from complete — I'm implementing things as I need them. It should get improved as I get further along in my projects.
The CRRenderSin example is a translation of the Apple provided DefaultOutputUnit to use the CRAudioUnits framework. The FindAudioUnits example lists all the installed AudioUnits and information about them.
The CRFilePlayer example plays an audio file and lets you select an effect audio unit component to process the file as it plays. It's not very robust, but it should give you the idea. I've tested it with stereo AIFF files (SInt16 samples), and provide an example file that works on my machine. (NOTE: I just noticed that it doesn't work if your sound file has a space in its pathname...)
CRFilePlayer requires sndlib. I included a compiled version of the sndlib library because I found it to be a bit of a pain to compile on MacOS X. If you don't have sndlib installed on your machine, you can modify the CRFilePlayer project to point the sndlib library to the one I provide.
To use, get the CRAudioUnits, compile them and put the resulting framework into your ~/Library/Frameworks/ folder (or the /System/Library/Frameworks/). You may need to update the path to the framework in the provided examples before they will compile.
A couple of things to note:
1. Stuffit might mess up long file names on uncompressing. I switched to compressing the examples with tar/gzip to avoid this, but it didn't seem to work. SinPlayerWithImplicitConversion.h and -.mm get their names munged, so you will have to fix them if you use stuffit. OpenUp opens tar/gzip files and perserves long file names.
2. You may have some warnings about paths not existing — ProjectBuilder has references to stuff in my directory hierarchy, which you may need to fix. Again, next update, I'll see about fixing these annoyances.
Unfortunately, no documentation at the moment, besides what's in the header files. Just look at the examples for now. Doco hopefully coming...
Bugs squashed in release 0.91:
New features in release 0.91:
![]() |
CRAudioUnits | The Framework |
![]() |
FindAudioUnits/CRRenderSin/CRFilePlayer | The Examples |
![]() |
CRFilePlayer Sounds | Example Sounds |
![]() |
SndLib | SndLib Compiled |
![]() |
Create documentation |
![]() |
Implement tests using Obj-C port of Kent Beck's framework |
![]() |
Implement more functionality |
![]() |
Tie in with Michael Thornburgh's CoreAudio/HAL wrapper |
Home | Illposed Software | Music | Articles | Links | Contact