Dear community,
at the moment I am preparing for some real time processing on audio recordings. I want to end the inifinite recording loop, when the visualizing window is closed. How can I achieve this, i cannot even find the handle to the plotting window.
so far the loop closes when the window with tunable properties is closed and then the spectrumAnalyzer() window is closed.
Note: this is about a spectrumAnalyzer object, not dsp.spectrumAnalyzer()
Unfortunately i cannot have a look into the first, since it is p-code
deviceReader = audioDeviceReader('NumChannels',2);
specScope = spectrumAnalyzer('SampleRate',deviceReader.SampleRate, ...
'Method','Filter bank', ...
'PlotAsTwoSidedSpectrum',false, ...
'FrequencyScale','Log', ...
'AveragingMethod','Exponential', ...
'ChannelNames',{'Input channel 1','Output channel 1'}, ...
'YLimits',[-102.67239232318423 -22.46657271946507]);
sut = audiopluginexample.SpeechPitchDetector;
setSampleRate(sut,deviceReader.SampleRate);
tuner = parameterTuner(sut);
figs=findall(0,'type','figure');
while all(ishandle(figs))
[in,novr] = deviceReader();
nOverruns = nOverruns + novr;
specScope([in(:,1),out(:,1)]);