-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This filter replaces the old one, and uses OpenAL Soft presets. Since there aren't that many of those, I've left off configuration for now, except to turn it on or off. Signed-off-by: Christopher Snowhill <[email protected]>
- Loading branch information
Showing
15 changed files
with
1,427 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// | ||
// HeadphoneFilter.h | ||
// CogAudio Framework | ||
// | ||
// Created by Christopher Snowhill on 1/24/22. | ||
// | ||
|
||
#ifndef HeadphoneFilter_h | ||
#define HeadphoneFilter_h | ||
|
||
#import <Accelerate/Accelerate.h> | ||
#import <Cocoa/Cocoa.h> | ||
|
||
@interface HeadphoneFilter : NSObject { | ||
vDSP_DFT_Setup dftSetupF; | ||
vDSP_DFT_Setup dftSetupB; | ||
|
||
size_t fftSize; | ||
size_t fftSizeOver2; | ||
size_t bufferSize; | ||
size_t paddedBufferSize; | ||
int channelCount; | ||
|
||
DSPSplitComplex signal_fft; | ||
DSPSplitComplex input_filtered_signal_per_channel[2]; | ||
DSPSplitComplex input_filtered_signal_totals[2]; | ||
DSPSplitComplex *impulse_responses; | ||
|
||
float **prevInputs; | ||
|
||
float *left_result; | ||
float *right_result; | ||
|
||
float *paddedSignal; | ||
} | ||
|
||
+ (BOOL)validateImpulseFile:(NSURL *)url; | ||
|
||
- (id)initWithImpulseFile:(NSURL *)url forSampleRate:(double)sampleRate withInputChannels:(int)channels withConfig:(uint32_t)config; | ||
|
||
- (void)process:(const float *)inBuffer sampleCount:(size_t)count toBuffer:(float *)outBuffer; | ||
|
||
- (void)reset; | ||
|
||
@end | ||
|
||
#endif /* HeadphoneFilter_h */ |
Oops, something went wrong.