-
Notifications
You must be signed in to change notification settings - Fork 0
/
MeatscienceConvolvotron_CocoaView.h
86 lines (66 loc) · 2.32 KB
/
MeatscienceConvolvotron_CocoaView.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
* File: CocoaView.h
*
* Version: 1.0
*
* Created: 5/26/09
*
* Copyright: Copyright © 2009 Meatscience, All Rights Reserved
*
*/
#import <Cocoa/Cocoa.h>
#import <AudioUnit/AudioUnit.h>
#import <AudioToolbox/AudioToolbox.h>
#import "ConvolvotronProperties.h"
#import "MeatScienceConvolvotron_GraphView.h"
#import "MeatScienceConvolvotron_SampleView.h"
typedef struct {
NSSlider **slider;
NSTextField **textField;
NSButton **checkbox;
} UIParameter;
@interface MeatscienceConvolvotron_CocoaView : NSView
{
// IB Members
IBOutlet MeatScienceConvolvotron_GraphView * graphView;
IBOutlet MeatScienceConvolvotron_SampleView * sampleView;
IBOutlet NSSlider * wetdrySlider;
IBOutlet NSTextField * wetdryTextField;
IBOutlet NSSlider * predelaySlider;
IBOutlet NSTextField * predelayTextField;
IBOutlet NSSlider * gainSlider;
IBOutlet NSTextField * gainTextField;
IBOutlet NSButton * loadIRButton;
Boolean loadIRButtonCancels;
IBOutlet NSProgressIndicator * loadIRProgressIndicator;
IBOutlet NSTextField * fileInfoTextField;
IBOutlet NSTextField * isDemoTextField;
IBOutlet NSButton * volumeCompensationCheckbox;
IBOutlet NSPopUpButton * recentIRButton;
// Other Members
AudioUnit mAU;
AUEventListenerRef mAUEventListener;
AUParameterListenerRef mParameterListener;
FrequencyResponse *mData; // the data used to draw the filter curve
float *mSamples;
UInt32 mNumSamples;
NSColor *mBackgroundColor; // the background color (pattern) of the view
UIParameter uiParameters[kNumberOfParameters];
NSMutableArray *recentIRs;
}
#pragma mark ____ PUBLIC FUNCTIONS ____
- (void)setAU:(AudioUnit)inAU;
#pragma mark ____ INTERFACE ACTIONS ____
- (IBAction)iaParamChanged:(id)sender;
- (IBAction)iaCheckboxChanged:(id)sender;
- (IBAction)loadIRButtonPressed:(id)sender;
- (IBAction)recentIRButtonPressed:(id)sender;
#pragma mark ____ PRIVATE FUNCTIONS
- (void)_synchronizeUIWithParameterValues;
- (void)_addListeners;
- (void)_removeListeners;
- (void)_updatePeakTimerTick;
#pragma mark ____ LISTENER CALLBACK DISPATCHEE ____
- (void)_parameterListener:(void *)inObject parameter:(const AudioUnitParameter *)inParameter value:(Float32)inValue;
- (void)priv_eventListener:(void *) inObject event:(const AudioUnitEvent *)inEvent value:(Float32)inValue;
@end