Code Fix: Add nullability flags to Vis Manager
The Visualization Manager PCM/FFT copy function was already observing these parameters for null input and only returning output to the ones which were not null. This just makes it clear that they are both optional parameters. This is useful for future visualization adventures, allowing PCM copy without invoking the FFT processing, or requesting FFT without also having to keep the PCM. This is mostly only a compile time change, and has no noticeable effect on the current runtime behavior, as the only consumers of the Visualizer data currently request both PCM and FFT. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
parent
fb97fbd202
commit
ff66c8e1a9
2 changed files with 2 additions and 2 deletions
|
@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
- (void)postSampleRate:(double)sampleRate;
|
||||
- (void)postVisPCM:(const float *)inPCM amount:(int)amount;
|
||||
- (double)readSampleRate;
|
||||
- (void)copyVisPCM:(float *)outPCM visFFT:(float *)outFFT latencyOffset:(double)latency;
|
||||
- (void)copyVisPCM:(float *_Nullable)outPCM visFFT:(float *_Nullable)outFFT latencyOffset:(double)latency;
|
||||
|
||||
- (void)reset;
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ static VisualizationController *_sharedController = nil;
|
|||
return visSamplesPosted;
|
||||
}
|
||||
|
||||
- (void)copyVisPCM:(float *)outPCM visFFT:(float *)outFFT latencyOffset:(double)latency {
|
||||
- (void)copyVisPCM:(float *_Nullable)outPCM visFFT:(float *_Nullable)outFFT latencyOffset:(double)latency {
|
||||
if(!outPCM && !outFFT) return;
|
||||
|
||||
if(!visAudio || !visAudioSize) {
|
||||
|
|
Loading…
Reference in a new issue