views:

35

answers:

1

MODIFIED:

Hi all, I need to detect if any data sent to Audio Card during a period of time.

Thanks to Philip Regan's help, I found a simple sample code about audio recording as shown in following link:

http://developer.apple.com/library/mac/#samplecode/AudioQueueTools/Listings/aqrecord_cpp.html#//apple_ref/doc/uid/DTS10004380-aqrecord_cpp-DontLinkElementID_5

and I managed to run it successfully.

But it seems that it records sound from internal microphone, for, when dumping the captured signal to screen in format of Hex, if I mute the internal microphone, data captured turn out to be all zero values, otherwise, the output data will be random numbers.

Unfortunately, if I mute the internal microphone, nothing can be captured, else, I can't test is any voice from another computer because of the noice from microphone.

In this situation, capture the out-coming signal of Audio Card will help. But I don't know how to capture it.

Any ideas?

A: 

Not by default, no. You'll need to access the lower-level APIs to get this information, and without an extension, Applescript doesn't work down to that level.

Philip Regan
Thanks very much, I am trying that. But, indeed, I have not found what I need. Anyone who gives APIs related will do me a lot of favor.
If you haven't yet, then I would highly suggest rewording and retagging your question. The `applescript` tag doesn't get much attention around here and using just `hardware` isn't enough. I would think that what you are looking for would be in the Core Audio or Carbon APIs.
Philip Regan
Thanks, I have modified my question and its tag.