[Equalizer] Remove unnecessary code
This code is obsolete, remove it. Signed-off-by: Christopher Snowhill <kode54@gmail.com>lastfm
parent
3c86758cb5
commit
e6c3fcaa0d
|
@ -565,19 +565,6 @@ NSDictionary *makeRGInfo(PlaylistEntry *pe) {
|
||||||
|
|
||||||
- (void)audioPlayer:(AudioPlayer *)player removeEqualizer:(AudioUnit)eq {
|
- (void)audioPlayer:(AudioPlayer *)player removeEqualizer:(AudioUnit)eq {
|
||||||
if(eq == _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];
|
[equalizerWindowController setEQ:nil];
|
||||||
|
|
||||||
_eq = nil;
|
_eq = nil;
|
||||||
|
|
|
@ -272,12 +272,10 @@ void equalizerLoadPreset(AudioUnit au) {
|
||||||
cog_equalizer_band_settings = _cog_equalizer_band_settings();
|
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);
|
AudioUnitSetParameter(au, kGraphicEQParam_NumberOfBands, kAudioUnitScope_Global, 0, 1, 0);
|
||||||
for(NSInteger i = 1; i < [cog_equalizer_band_settings count]; ++i) {
|
for(NSInteger i = 1; i < [cog_equalizer_band_settings count]; ++i) {
|
||||||
float value = [[NSUserDefaults standardUserDefaults] floatForKey:[cog_equalizer_band_settings objectAtIndex: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