MusicKit
0.0.0
|
00001 00002 // 00003 // $Id$ 00004 // 00005 // Original Author: Leigh Smith, <leigh@leighsmith.com> 00006 // 00007 // Copyright (c) 2003, The MusicKit Project. All rights reserved. 00008 // 00009 // Permission is granted to use and modify this code for commercial and 00010 // non-commercial purposes so long as the author attribution and copyright 00011 // messages remain intact and accompany all relevant code. 00012 // 00014 00015 #import <Foundation/Foundation.h> 00016 //#import <SndKit/SndKit.h> 00017 // TODO while not within the SndKit framework. 00018 #import "SndAudioProcessor.h" 00019 #import <AudioUnit/AudioUnit.h> 00020 00030 @interface SndAudioUnitProcessor : SndAudioProcessor 00031 { 00033 AudioUnit audioUnit; 00035 int inputBusNumber; 00037 unsigned int inputChannelCount; 00041 int outputBusNumber; 00043 int parameterListLength; 00045 AudioUnitParameterID *parameterIDList; 00047 BOOL auIsNonInterleaved; 00049 float *interleavedInputSamples; 00050 } 00051 00061 + (NSArray *) availableAudioProcessors; 00062 00067 + (SndAudioProcessor *) audioProcessorNamed: (NSString *) processorName; 00068 00072 - (AudioUnit) audioUnit; 00073 00074 // TODO perhaps rename superclass and this to method initWithAudioUnitNamed: and remove paramCount parameter. 00075 00076 /* 00077 @brief Given a name previously returned by availableAudioUnits, a SndAudioUnitProcessor instance is created. 00078 @param audioUnitName The name of a unit as returned by <B>+availableAudioProcessors</B>. 00079 00080 A SndAudioUnitProcessor instance is created for each AudioUnit. SndAudioUnitProcessor factory methods 00081 are the overseer of multiple available AudioUnits, each one is loaded and instantiated as a 00082 SndAudioUnitProcessor instance. 00083 */ 00084 - initWithParamCount: (const int) count name: (NSString *) audioUnitName; 00085 00089 - (BOOL) processReplacingInputBuffer: (SndAudioBuffer *) inB 00090 outputBuffer: (SndAudioBuffer *) outB; 00091 00092 00093 - (float) paramValue: (const int) index; 00094 00095 - (NSString *) paramName: (const int) index; 00096 00097 - (NSString*) paramLabel: (const int) index; 00098 00099 - (NSString *) paramDisplay: (const int) index; 00100 00101 - (void) setParam: (const int) index toValue: (const float) parameterValue; 00102 00103 @end