[Visualization Controller] Minor guard check
Guard check in case visualization controller is called before any data is posted to it. Signed-off-by: Christopher Snowhill <kode54@gmail.com>main
parent
9f03b72b69
commit
18824e0e18
|
@ -82,10 +82,16 @@ static VisualizationController *_sharedController = nil;
|
|||
|
||||
- (void)copyVisPCM:(float *)outPCM visFFT:(float *)outFFT latencyOffset:(double)latency {
|
||||
if(!outPCM && !outFFT) return;
|
||||
|
||||
|
||||
if(!visAudio || !visAudioSize) {
|
||||
if(outPCM) bzero(outPCM, sizeof(float) * 4096);
|
||||
if(outFFT) bzero(outFFT, sizeof(float) * 2048);
|
||||
return;
|
||||
}
|
||||
|
||||
float tempPCM[4096];
|
||||
if(!outPCM) outPCM = &tempPCM[0];
|
||||
|
||||
|
||||
@synchronized(self) {
|
||||
if(!sampleRate) {
|
||||
bzero(outPCM, 4096 * sizeof(float));
|
||||
|
|
Loading…
Reference in New Issue