필터 지우기
필터 지우기

how to remove the data (output of the function 'getaudiodata') from the memory buffer when I record an audio for long time and plot it at the same time?

조회 수: 2 (최근 30일)
I record an audio signal from microphone and I plot it in real time. Simply I have:
rObj=audiorecorder(fs, 24, 2);
recordblocking(rObj)
y=getaudiodata(rObj);
data accumulates in samples so it can not do recording for long time. Is it possible to remove data from the memory sometimes?

답변 (1개)

Walter Roberson
Walter Roberson 2018년 6월 13일
No, it is not.
If you do not need to keep all of the data until the end, and the amount of data is not easily handled, then you should not be using audiorecorder: you should be using the Audio System Toolbox, probably with audioDeviceReader()
  댓글 수: 23
Walter Roberson
Walter Roberson 2018년 7월 21일
That BufferSize is too small, should be at least as large as SamplesPerFrame.
You should probably be telling animatedline to limit the number of points it displays.
hoda kazemzadeh
hoda kazemzadeh 2018년 7월 23일
I am trying to modify my code in GUI. I dont use audiotimer function now. In 'OutputFcn' I write the dsp.audiorecorder and step functions and display the signal. I get this error when it reaches the line of 'step' function :
A given audio device may only be opened once.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by