This is my first question on dsp. I am looking for something very simple here and I am sure there are libraries that will do pitch recognition and FFT but my requirement is very simple.

I have a PC and I am using the audio input for analog signal feedback and output for controlling the device. I am using windows as the OS.

  1. I want to ensure that I have full control on the audio output and no other program or the OS will stream sounds into the same channel.

  2. I want to output precisely at a known time interval

  3. I want to check if the feedback matches with what is expected of the device.

Any snippet of code or an article to do the same will be useful. I can provide more details if there is something missing in my question.

  • $\begingroup$ How precise is "precise"? Is a delay in the order of hundreds of ms acceptable to you? Can you please clarify your third question? What are the input and output of your system and your "device"? $\endgroup$
    – A_A
    Commented May 18, 2018 at 13:47
  • $\begingroup$ 10ms is a reasonably precise in my world. But I would hope that I can get 1ms. $\endgroup$
    – Ram
    Commented May 18, 2018 at 14:04
  • $\begingroup$ PC output: a wave signal that has encoded information using amplitude and frequency $\endgroup$
    – Ram
    Commented May 18, 2018 at 14:05
  • $\begingroup$ PC Input: the device sends signal with information encoded as amplitude and frequency $\endgroup$
    – Ram
    Commented May 18, 2018 at 14:06
  • $\begingroup$ #1 and #2 will be very hard and are operating-system dependent. For example, the sound samples will go through the sound card drivers and there's no easy way to tell what they do and how much latency they add. #3, you can connect an oscilloscope to the sound card's output and see the signal. $\endgroup$
    – MBaz
    Commented May 18, 2018 at 14:37

1 Answer 1


The best performance you will be able to squeeze out of a PC is with an audio interface that supports ASIO.

To be able to get near 10ms of total delay (input and output) you will also need a very fast machine. Not only in terms of CPU but more importantly in terms of memory performance.

On top of this delay, you are going to have to add the delay in processing your signal and generating the output signal.

1ms (total delay (?) ) on the hardware you are describing is unrealistic.

The way ASIO works will handle issues #1,#2. I am still not really sure what you mean by #3. If you want to use the PC to drive a device with some signal and collect the response of the device to that signal then that is relatively easily achievable with an ASIO enabled audio interface too.

Hope this helps.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.