3 ms·
If they ever get to the point of enabling audio folks to run windows audio apps with a low-latency pre-emptible kernel, they'll get big adoption in that world.
by iainctduncan 6y ago
If they ever get to the point of enabling audio folks to run windows audio apps with a low-latency pre-emptible kernel, they'll get big adoption in that world. Right not it's ridiculous how crappy the options are for low latency given how fast our machines are.
- CyberDildonics 6y agoDoes anyone try to shift audio mixing to the GPU and use the audio output of HDMI? I don't know if modern GPUs can take buffers and move them to the audio buffer without going out and back in through PCIe but it seems plausible.
- smrq 6y agoEven if that was possible (no idea), I don't know that it would help. Graphics processing works on GPUs because it's a massively parallel task. With audio, increasing buffer sizes for more parallel processing will inherently increase latency. And if you're not dealing with massive buffers, then you're just shipping data over to the GPU for no good reason.
- CyberDildonics 6y agoThe point is more that data could be closer to where it is going to be used instead of needing the cpu to move it around at precise times. If audio is on the GPU before it is mixed, then only the mixing/filter values would need to be sent to the GPU. Maybe this would take some sort of programmable scheduling on the GPU though.
- iainctduncan 6y agoI'm not sure, but that's a different issue. The latency problem with everything except linux is we can't tell the OS to elevate our audio apps priority above the rest of the kernel, so operating system calls randomly happen and jump in front of the audio callback, hosing latency. I used to get 0.7ms latency on linux with the CPU at over 90%!!! I'm lucky to get 7ms on OSX with the CPU at 30-40%ms, sigh. It sucks so bad, it's like being allowed to use 1/4 of your computer power for real time audio. Even Windows 98 was better, you could tweak it pretty well. If you put your audio latency down to 2-3ms nowadays you can use very little of your CPU without under-runs. :-/
- CyberDildonics 6y agoThat's the point though, if the GPU could be doing something uninterrupted the variance in scheduling wouldn't be as much of a factor.
- iainctduncan 6y agoWell I'm no OS dev, so I will happily defer. But I was under the impression that this would not change the fact that a host audio app is running under user-space and can be pre-empted anytime? The way most pro-audio apps work is they have a callback they run once per audio vector size to fill a buffer of samples for the next buffer to pass to the audio subsystem. So if this gets knocked down the priority list, you get problems. Man I'd love to see any developments to improve that though, on an OS level we've been stalled for 20 FREAKING YEARS now. :-/
- WesolyKubeczek 6y agoDoesn't work like this. HDMI is a separate device; also, in a thread somewhere Paul Davis of Ardour fame explains how exactly infeasible it is. (And you won't be able to do "real time" on a GPU anyway if it's not graphics.) There's also more to audio than mixing (simple mixing was done on G3/G4, come on), when you take all the effects and filters, so to offload that reasonably you'd need an audio card with, say, an FPGA.
- CyberDildonics 6y ago> Doesn't work like this. HDMI is a separate device; also, in a thread somewhere Paul Davis of Ardour fame explains how exactly infeasible it is. (And you won't be able to do "real time" on a GPU anyway if it's not graphics.) Why? HDMI comes from the graphics card with video and audio. Also I'm pretty sure a graphics card can handle audio effects in real time. 44k samples per second per channel is going to take a lot less than running complex shaders on 240 million pixels per second.