AudioEffects.h 5.23 KB
Newer Older
1 2 3
/*****************************************************************************
 * AudioEffects.h: MacOS X interface module
 *****************************************************************************
Felix Paul Kühne's avatar
Felix Paul Kühne committed
4
 * Copyright (C) 2004-2011 VLC authors and VideoLAN
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
 * $Id$
 *
 * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
 *          Jérôme Decoodt <djc@videolan.org>
 *          
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/

#import <Cocoa/Cocoa.h>

@interface VLCAudioEffects : NSObject {
    /* generic */
    IBOutlet id o_tableView;
    IBOutlet id o_window;
32
    intf_thread_t *p_intf;
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50

    /* Equalizer */
    IBOutlet id o_eq_enable_ckb;
    IBOutlet id o_eq_twopass_ckb;
    IBOutlet id o_eq_preamp_lbl;
    IBOutlet id o_eq_presets_popup;
    IBOutlet id o_eq_band1_sld;
    IBOutlet id o_eq_band2_sld;
    IBOutlet id o_eq_band3_sld;
    IBOutlet id o_eq_band4_sld;
    IBOutlet id o_eq_band5_sld;
    IBOutlet id o_eq_band6_sld;
    IBOutlet id o_eq_band7_sld;
    IBOutlet id o_eq_band8_sld;
    IBOutlet id o_eq_band9_sld;
    IBOutlet id o_eq_band10_sld;
    IBOutlet id o_eq_preamp_sld;

Felix Paul Kühne's avatar
Felix Paul Kühne committed
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
    /* equalizer presets */
    IBOutlet id o_eqp_panel;
    IBOutlet id o_eqp_ok_btn;
    IBOutlet id o_eqp_cancel_btn;
    IBOutlet id o_eqp_new_lbl;
    IBOutlet id o_eqp_new_fld;
    IBOutlet id o_eq_manage_panel;
    IBOutlet id o_eq_manage_ok_btn;
    IBOutlet id o_eq_manage_cancel_btn;
    IBOutlet id o_eq_manage_rename_btn;
    IBOutlet id o_eq_manage_delete_btn;
    IBOutlet id o_eq_manage_table;
    NSMutableArray *o_eq_custom_presets;
    NSMutableArray *o_eq_custom_presetnames;
    NSInteger i_to_be_renamed_preset;

67 68
    /* Compressor */
    IBOutlet id o_comp_enable_ckb;
69
    IBOutlet id o_comp_reset_btn;
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
    IBOutlet id o_comp_band1_sld;
    IBOutlet id o_comp_band1_fld;
    IBOutlet id o_comp_band1_lbl;
    IBOutlet id o_comp_band2_sld;
    IBOutlet id o_comp_band2_fld;
    IBOutlet id o_comp_band2_lbl;
    IBOutlet id o_comp_band3_sld;
    IBOutlet id o_comp_band3_fld;
    IBOutlet id o_comp_band3_lbl;
    IBOutlet id o_comp_band4_sld;
    IBOutlet id o_comp_band4_fld;
    IBOutlet id o_comp_band4_lbl;
    IBOutlet id o_comp_band5_sld;
    IBOutlet id o_comp_band5_fld;
    IBOutlet id o_comp_band5_lbl;
    IBOutlet id o_comp_band6_sld;
    IBOutlet id o_comp_band6_fld;
    IBOutlet id o_comp_band6_lbl;
    IBOutlet id o_comp_band7_sld;
    IBOutlet id o_comp_band7_fld;
    IBOutlet id o_comp_band7_lbl;
    
    /* Spatializer */
    IBOutlet id o_spat_enable_ckb;
94
    IBOutlet id o_spat_reset_btn;
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
    IBOutlet id o_spat_band1_sld;
    IBOutlet id o_spat_band1_fld;
    IBOutlet id o_spat_band1_lbl;
    IBOutlet id o_spat_band2_sld;
    IBOutlet id o_spat_band2_fld;
    IBOutlet id o_spat_band2_lbl;
    IBOutlet id o_spat_band3_sld;
    IBOutlet id o_spat_band3_fld;
    IBOutlet id o_spat_band3_lbl;
    IBOutlet id o_spat_band4_sld;
    IBOutlet id o_spat_band4_fld;
    IBOutlet id o_spat_band4_lbl;
    IBOutlet id o_spat_band5_sld;
    IBOutlet id o_spat_band5_fld;
    IBOutlet id o_spat_band5_lbl;

    /* Filter */
    IBOutlet id o_filter_headPhone_ckb;
    IBOutlet id o_filter_normLevel_ckb;
    IBOutlet id o_filter_normLevel_sld;
    IBOutlet id o_filter_normLevel_lbl;
}

/* generic */
+ (VLCAudioEffects *)sharedInstance;
- (IBAction)toggleWindow:(id)sender;
121
- (void)setAudioFilter: (char *)psz_name on:(BOOL)b_on;
122 123 124

/* Equalizer */
- (void)setupEqualizer;
Felix Paul Kühne's avatar
Felix Paul Kühne committed
125
- (void)rebuildEqMenu;
126 127 128 129 130 131 132 133 134
- (void)equalizerUpdated;
- (void)setBandSlidersValues:(float *)values;
- (void)initBandSliders;
- (void)setValue:(float)value forSlider:(int)index;
- (IBAction)eq_bandSliderUpdated:(id)sender;
- (IBAction)eq_changePreset:(id)sender;
- (IBAction)eq_enable:(id)sender;
- (IBAction)eq_preampSliderUpdated:(id)sender;
- (IBAction)eq_twopass:(id)sender;
Felix Paul Kühne's avatar
Felix Paul Kühne committed
135 136 137 138
- (IBAction)eq_nameButtonAction:(id)sender;
- (IBAction)eq_manageAction:(id)sender;
- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView;
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex;
139

140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
/* Compressor */
- (void)resetCompressor;
- (IBAction)resetCompressorValues:(id)sender;
- (IBAction)comp_enable:(id)sender;
- (IBAction)comp_sliderUpdated:(id)sender;

/* Spatializer */
- (void)resetSpatializer;
- (IBAction)resetSpatializerValues:(id)sender;
- (IBAction)spat_enable:(id)sender;
- (IBAction)spat_sliderUpdated:(id)sender;

/* Filter */
- (void)resetAudioFilters;
- (IBAction)filter_enableHeadPhoneVirt:(id)sender;
- (IBAction)filter_enableVolumeNorm:(id)sender;
- (IBAction)filter_volNormSliderUpdated:(id)sender;

158
@end