Compiling Problem with AudioUnit Framework

Discussion in 'Mac Programming' started by Thethuthinang, May 3, 2012.

  1. macrumors member

    Joined:
    Jan 3, 2011
    #1
    I am having trouble getting a project using AudioUnit.h to compile. I made a simple test project to try to locate the error. Here is the .h file:

    Code:
    #import <Cocoa/Cocoa.h>
    #import <AudioUnit/AudioUnit.h>
    
    @interface THController : NSObject {
    	AudioComponentInstance x;
    }
    
    @end
    
    I've added the AudioUnit framework. I get "syntax error before AudioComponentInstance". In my real project I get a lot of "undeclared . . ." messages as well. What's going on?
     
  2. thread starter macrumors member

    Joined:
    Jan 3, 2011
    #2
    It seems I am using some old code. The variable AudioComponentInstance is contained in AudioComponent.h, which is not a part of the AudioUnit framework. Does anyone know about this?
     

Share This Page