[Equalizer] Remove unnecessary code
This code is obsolete, remove it. Signed-off-by: Christopher Snowhill <kode54@gmail.com>xcode15
parent
740613b95a
commit
9e66838b9b
|
@ -565,19 +565,6 @@ NSDictionary *makeRGInfo(PlaylistEntry *pe) {
|
|||
|
||||
- (void)audioPlayer:(AudioPlayer *)player removeEqualizer:(AudioUnit)eq {
|
||||
if(eq == _eq) {
|
||||
OSStatus err;
|
||||
CFPropertyListRef classData;
|
||||
UInt32 size;
|
||||
|
||||
size = sizeof(classData);
|
||||
err = AudioUnitGetProperty(eq, kAudioUnitProperty_ClassInfo, kAudioUnitScope_Global, 0, &classData, &size);
|
||||
if(err == noErr) {
|
||||
CFPreferencesSetAppValue(CFSTR("GraphEQ_Preset"), classData, kCFPreferencesCurrentApplication);
|
||||
CFRelease(classData);
|
||||
}
|
||||
|
||||
CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
|
||||
|
||||
[equalizerWindowController setEQ:nil];
|
||||
|
||||
_eq = nil;
|
||||
|
|
|
@ -272,12 +272,10 @@ void equalizerLoadPreset(AudioUnit au) {
|
|||
cog_equalizer_band_settings = _cog_equalizer_band_settings();
|
||||
}
|
||||
|
||||
float preamp = [[NSUserDefaults standardUserDefaults] floatForKey:[cog_equalizer_band_settings objectAtIndex:0]];
|
||||
|
||||
AudioUnitSetParameter(au, kGraphicEQParam_NumberOfBands, kAudioUnitScope_Global, 0, 1, 0);
|
||||
for(NSInteger i = 1; i < [cog_equalizer_band_settings count]; ++i) {
|
||||
float value = [[NSUserDefaults standardUserDefaults] floatForKey:[cog_equalizer_band_settings objectAtIndex:i]];
|
||||
AudioUnitSetParameter(au, (int)(i - 1), kAudioUnitScope_Global, 0, value + preamp, 0);
|
||||
AudioUnitSetParameter(au, (int)(i - 1), kAudioUnitScope_Global, 0, value, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue