PulseAudio needs to run with elevated priority. It also needs (or used to need) to elevate sound applications' priority using RealtimeKit. With the sound multiplexing happening in kernel space you can just reschedule those processes whose submitted buffers are falling below the water level for timely continuation. By taking into account if a process waits on a audio fd (read, select, poll) you also know, that this process has data ready and hence should be given CPU time soon and can adjust the scheduling in the kernel. Try to do such tricks outside the kernel.
View all comments
Show parent comment
4
u/datenwolf Jul 31 '12
PulseAudio needs to run with elevated priority. It also needs (or used to need) to elevate sound applications' priority using RealtimeKit. With the sound multiplexing happening in kernel space you can just reschedule those processes whose submitted buffers are falling below the water level for timely continuation. By taking into account if a process waits on a audio fd (read, select, poll) you also know, that this process has data ready and hence should be given CPU time soon and can adjust the scheduling in the kernel. Try to do such tricks outside the kernel.