Buffer issue: Long latency, no real time pass.

6 posts / 0 new
Last post
vampm
vampm's picture
Joined: December 12, 2011

I have to use 2048 samples, because if I use 1024 I have glitches and below 1024 The program is not responding. This is causing very long latency. Is there any way to have a real-time audio pass (without any buffer)?

Ross B.
Ross B.'s picture
Joined: April 11, 2009

Hi,

There is always buffering in any Audio application on a computer. The idea is to set it low enough that the delay is not noticeable. I agree that 1024 samples or more will be noticeable.

Are you on Windows or Mac? On Windows I recommend that you seek out an ASIO driver for your audio hardware. Usually the lowest buffer setting you can safely use is ruled by your sound card and your system setup. There are some ideas about tweaking system setup here:
http://www.audiomulch.com/help/real_time.htm
But the behaviour you describe sounds more like you need to investigate using a different driver (if on Windows) or perhaps a limitation of your audio interface if you're on Mac.

Please tell us more about your setup and we might be able to offer some other suggestions.

Ross.

vampm
vampm's picture
Joined: December 12, 2011

Thanx for your support!
I know that there is always a buffer in everything, but for example the low latency output plugin for winamp has buffer, but its more like that it takes the sound and pass it more directly.

I have wn xp, and AC97 audio codec (chip in motherboard. I use the default drivers because I had some issues if I remember correct with newer). I tried to see what ASIO is some weeks ago for another reason but I dont know what it is and as I understand it doesnt fit for my soundchip.

Also one more thing: I use audiomulch with virtual cable. I dont know if its virtual cable's fault, but whet I take input sound from one virtual cable, pass it to crossfader and pass to another virtual audio cable, the sound comes out like "mono" (the left and right channels are correctly placed).

Ross B.
Ross B.'s picture
Joined: April 11, 2009

For ASIO on any standard windows audio hardware you can try this:
http://www.asio4all.com

This is more or less the equivalent to using a low-latency output plugin in WinAmp. It's an ASIO driver that talks direct to the lowest level driver for your AC97 chipset.

Not sure about the VAC issue. You could check that the left and right channels are correctly assigned in the AudioMulch settings for input and output (not both going to channel 1 of VAC).

vampm
vampm's picture
Joined: December 12, 2011

Hi again on this. I am going to ressurect this post instead of recreating a new one, as I had left the matter it as is.

At first I didnt knew what asio was about. Now I realize that programs must support it. The audio player that I use does not support it, so using asio with audimulch is not going to work.

Also the mono matter is solved, it was vac's setup.

So back to the topic, I believe IMO (I am no expert at all, but that just an opion) that the internal pipeline of audiomulch is forcing someone to use etc 1024 saples * 2. A possible fix for this, again IMO, is to make audiomulch take input direct, without buffer (just listen and copy), do any process as fast as possible(here is the cpu speed if I am not wrong), and then output again direct without buffer.

This is just a speculation; I might miss many thing about how the whole program works internally, but its my thout! :)

admin
admin's picture
Joined: July 8, 2011

I have answered your very technical questions below, however they are largely pointless -- Windows Multimedia API can not achieve low latency. You need to use ASIO for that. Also I don't think VAC is designed for low latency. To be honest I am surprised that you can manage so low as 1024 x 2 buffers.

You should investigate JACK.

> the internal pipeline of audiomulch is forcing someone to use etc 1024 saples * 2

Any audio software must use buffers. There is no such thing as "take direct input". Audio is always passed between programs or drivers using buffers. Sometimes you can control the size and number of buffers, but you can never have no buffers.

Audio software must use at least double-buffers... with a single buffer you cannot avoid glitches (while the software is using one buffer there is no place for the sound to go).

 > do any process as fast as possible(here is the cpu speed if I am not wrong), and then output again direct without buffer.

This is not practical. You would have to do the processing instantly. If the processing takes any time at all you need 2 buffers. AudioMulch is designed so that the processing can take close to 100% and still get no glitches.