00001 /* Copyright: © Copyright 2003 Apple Computer, Inc. All rights reserved. 00002 00003 Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. 00004 ("Apple") in consideration of your agreement to the following terms, and your 00005 use, installation, modification or redistribution of this Apple software 00006 constitutes acceptance of these terms. If you do not agree with these terms, 00007 please do not use, install, modify or redistribute this Apple software. 00008 00009 In consideration of your agreement to abide by the following terms, and subject 00010 to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs 00011 copyrights in this original Apple software (the "Apple Software"), to use, 00012 reproduce, modify and redistribute the Apple Software, with or without 00013 modifications, in source and/or binary forms; provided that if you redistribute 00014 the Apple Software in its entirety and without modifications, you must retain 00015 this notice and the following text and disclaimers in all such redistributions of 00016 the Apple Software. Neither the name, trademarks, service marks or logos of 00017 Apple Computer, Inc. may be used to endorse or promote products derived from the 00018 Apple Software without specific prior written permission from Apple. Except as 00019 expressly stated in this notice, no other rights or licenses, express or implied, 00020 are granted by Apple herein, including but not limited to any patent rights that 00021 may be infringed by your derivative works or by other works in which the Apple 00022 Software may be incorporated. 00023 00024 The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO 00025 WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED 00026 WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00027 PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN 00028 COMBINATION WITH YOUR PRODUCTS. 00029 00030 IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR 00031 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 00032 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00033 ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION 00034 OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT 00035 (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN 00036 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00037 */ 00038 /* SampleEffectCocoaUI */ 00039 00040 #import <Cocoa/Cocoa.h> 00041 #import <AudioUnit/AUCocoaUIView.h> 00042 #import <AudioToolbox/AudioToolbox.h> 00043 00044 @interface SampleEffectCocoaUI : NSObject <AUCocoaUIBase> 00045 { 00046 IBOutlet NSMatrix *indexedParamMatrix; 00047 IBOutlet NSSlider *param1Slider; 00048 IBOutlet NSTextField *param1TextField; 00049 IBOutlet NSSlider *param2Slider; 00050 IBOutlet NSTextField *param2TextField; 00051 IBOutlet NSPopUpButton *presetPopup; 00052 00053 IBOutlet NSView *itsView; 00054 AudioUnit itsAU; 00055 00056 AUParameterListenerRef mParameterListener; 00057 } 00058 00059 - (void) updateControlValues; 00060 - (void) addListeners; 00061 - (void) removeListeners; 00062 00063 - (IBAction)indexedParamChanged:(id)sender; 00064 - (IBAction)param1Changed:(id)sender; 00065 - (IBAction)param2Changed:(id)sender; 00066 - (IBAction)presetChanged:(id)sender; 00067 00068 - (void) setParam1Value: (Float32) value; 00069 - (void) setParam2Value: (Float32) value; 00070 - (void) setParam3Value: (Float32) value; 00071 00072 00073 - (NSString *) description; // returns a string description of the audio unit 00074 00075 @end 00076 00077 void ParameterListener( void * inRefCon, 00078 void * inObject, 00079 const AudioUnitParameter *inParameter, 00080 Float32 inValue);