Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 91 lines (77 sloc) 2.856 kB
89771a8 @artgillespie Initial import. (Previously tracked with hg.)
authored
1 /*
2 * The MIT License
3 *
4 * Copyright (c) 2009 Art Gillespie
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 *
24 */
25
26 #import <Cocoa/Cocoa.h>
27 #import <AudioToolbox/AudioToolbox.h>
28 #import "CAAudioUnit.h"
29
30 #import "GSAudioFilePlayer.h"
31 #import "GSABDropView.h"
32
33 @interface AudioCompareController : NSObject {
34 IBOutlet NSWindow * window;
35 IBOutlet NSSlider * masterVolumeSlider;
36 IBOutlet NSButton * playButton;
37 IBOutlet NSButton * toggleFileButton;
38 IBOutlet NSButton * blindButton;
39
40 IBOutlet NSMenuItem * playMenu;
41 IBOutlet NSMenuItem * switchMenu;
42 IBOutlet NSMenuItem * blindMenu;
43 IBOutlet NSMenuItem * returnToZeroMenu;
44 IBOutlet NSMenuItem * clearPadMenu;
45
46 IBOutlet GSABDropView * aView;
47 IBOutlet GSABDropView * bView;
48 IBOutlet GSABDropView * cView;
49 IBOutlet GSABDropView * dView;
50
51 NSArray * dropViews;
52
53 BOOL blindCompare;
54
55 AUGraph auGraph;
56 AUNode outputNode;
57 AUNode mixerNode;
58 CAAudioUnit * mixerAU;
59
60 NSMutableArray * filePlayers;
61
62 int currentChannel;
63
64 int markedFile;
65 }
66
67 -(void)setFile:(NSURL*)fileURL forChannel:(int)channel;
68 -(void)setPlayingChannel:(int)channel;
69 -(void)muteAllChannels;
70 -(void)soloChannel:(int)channel;
71 -(void)setGain:(float)gain forChannel:(int)channel;
72 -(IBAction)masterVolumeChanged:(id)sender;
73 -(IBAction)togglePlay:(id)sender;
74 -(IBAction)toggleFilePlayback:(id)sender;
75 -(IBAction)toggleBlindCompare:(id)sender;
76 -(IBAction)returnToZero:(id)sender;
77 -(BOOL)_createAUGraph:(NSError**)error;
78 -(NSString*)filePathForChannel:(int)channelId;
79 -(int)selectedChannel;
80 -(BOOL) isPlaying;
81 -(BOOL)channelHasFile:(int)channelId;
82 -(void)clearChannel:(int)channelId;
83 -(IBAction)clearCurrentChannel:(id)sender;
84 -(int)_countLoadedChannels;
85 -(void)_updateViews;
86
87 @property (readonly) int selectedChannel;
88 @property (readonly) BOOL blindCompare;
89 @property (readonly) int markedFile;
90 @end
Something went wrong with that request. Please try again.