Audio Device Fails to respond, somethimes.

조회 수: 1 (최근 30일)
Tim Mottram
Tim Mottram 2011년 9월 5일
Hi Guys, I was wondering about the origin of the "Audio Device fails to respond" error when using WAVRECORD? It seems to crop up when I sample over long periods of time, 4-5 minuets and above. Is it to do with a memory issue? Seems to happen with high sample frequencies as well.. Thanks in advance :) Tim

답변 (2개)

Daniel Shub
Daniel Shub 2011년 9월 5일
The wavrecord function is Windows only. Windows handling of sound is crappy. To make matters worse, MATLAB's handling of sound is crappy. Finally, wavrecord is a depreciated function that doesn't use some of the newer and better underlying sound code. At a minimum switch to audiorecorder. Even better switch to something based on portaudio.
  댓글 수: 1
Tim Mottram
Tim Mottram 2011년 9월 6일
Hi Daniel,
Thanks for your reply, is there a way to record for an exact amount of time (I could use record(r) then wait for say 10 secs but that seems imprecise). I am performing spectral analysis on the data so the time sampled for is very important to me. I also couldn't find anything in matlab about portaudio? I'm running 2010a if that helps.
Thanks in advance :)
Tim

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


Walter Roberson
Walter Roberson 2011년 9월 6일
There is no known way to do anything in the Universe for an exact amount of time. Some of the leading theories are that time and space are quantized, whereas other important theories are that when you get to sufficiently small distances, time and distance become indeterminate and variable.
The situation in MATLAB is even worse: you cannot be sure of doing anything in MATLAB to within the nearest year of when you would like it done. Now, delays of multiple years are uncommon in MATLAB, but even in regular processing, the highest precision you should expect in normal operations is +/- 1/60th of a second.
If high accuracy of timestamping of audio is important to you, then you should switch to using an analog to digital convertor that has a built-in facility for time-stamping every sample: once it is time-stamped as it is received by the hardware that is running independently of the operating system, system busyness, interrupt latency, and buffering issues in transferring the data in to MATLAB become much less important.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by