Reputation: 83
I've tried to use AKEqualizerFilters to make an equalizer for iOS, but it seems like they have no effect on the sound at all. The normal sound comes out, but the filters don't affect it at all. I'm using v4 of AudioKit with objective-c. Player is set with no sound at first, the user has to select a file to load first. I followed the instructions from the AudioKit Playground to get this far https://audiokit.io/playgrounds/Effects/Graphic%20Equalizer/
Also worth noting, that I tried this with HighShelf, LowShelf and Peaking Parametric Equalizers as well, but also no effect on the sound.
@property(nonatomic, retain) AKPlayer* player;
@property(nonatomic, retain) AKEqualizerFilter* lowFilter;
@property(nonatomic, retain) AKEqualizerFilter* midFilter;
@property(nonatomic, retain) AKEqualizerFilter* highFilter;
_player = [[AKPlayer alloc] init];
// Setting the filters here initially has no effect on the sound
_lowFilter = [[AKEqualizerFilter alloc] init:_player centerFrequency:50 bandwidth:100 gain:1.0];
_midFilter = [[AKEqualizerFilter alloc] init:_lowFilter centerFrequency:350 bandwidth:300 gain:1.0];
_highFilter = [[AKEqualizerFilter alloc] init:_midFilter centerFrequency:5000 bandwidth:1000 gain:1.0];
AKManager.output = _highFilter;
// these also have no effect
[_lowFilter setGain:0.0];
[_midFilter setGain:5.0];
[_highFilter setGain:10.0];
Upvotes: 0
Views: 45
Reputation: 83
Figured it out. Turns out the file I was trying to play wasn't even going through AKPlayer, it was using another system we're using to play songs from the cloud.
Leaving the code snippet here in case anyone wants to use it for future reference
Upvotes: 1