Announcement

Collapse
No announcement yet.

Ubuntu Desires Lower Audio Latency For Gaming

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by RealNC View Post
    That results in the game taking exclusive control of the card. Nothing else will be audible. Which is a disaster. Unless you talk to the dmix device. In that case, you're back to high latency.
    Originally posted by christian_frank View Post
    to be more specific , this is only the fact for non hw mixing cards ...which sadly seem to be very popular nowadays ..i love my hw mixing soundblaster
    Originally posted by RealNC View Post
    HW mixing is useless though. It was nice on my 486. That Gravis Ultrasound rocket the boat. But today, mixing can be done on the CPU so easily, it's not worth having it in HW.
    "ALSA is useless" "HW mixing fixes that" "HW mixing is useless" Wat?!

    You posed a problem. A solution was offered. You rejected it without justification.

    Also, the dmix buffer size can be adjusted.

    Comment


    • #32
      Originally posted by unix_epoch View Post
      "ALSA is useless" "HW mixing fixes that" "HW mixing is useless" Wat?!
      Where exactly did you see "ALSA is useless" being said?

      You posed a problem. A solution was offered. You rejected it without justification.
      Justification was given. If you want more: this "solution" requires me to buy a new sound card. I already have one for which I paid good money for. If that's what it would take for gaming on Linux, no thanks. I'll keep using Windows for this, since it works awesome there without hardware mixing (which just proves how useless it is).


      Also, the dmix buffer size can be adjusted.
      Is there a "defaults.pcm.dmix.*" option for this? I'd like to try it and see whether audio skipping becomes a problem with smaller buffers.
      Last edited by RealNC; 11-02-2012, 04:39 AM.

      Comment


      • #33
        Originally posted by unix_epoch View Post
        "ALSA is useless" "HW mixing fixes that" "HW mixing is useless" Wat?!

        You posed a problem. A solution was offered. You rejected it without justification.

        Also, the dmix buffer size can be adjusted.
        +1

        Gaming software always has a very high CPU usage.

        For software mixing problem, high CPU load always means bad latency for software mixing solution.

        Having a dedicated hardware for sound mixing is always a good idea.

        Take a look on Windows:

        Windows XP: hardware mixing
        Windows 7: change to software mixing which cause serious latency problem http://www.youtube.com/watch?v=iujDVsg_2xY
        Windows 8: http://msdn.microsoft.com/en-us/libr.../br259116.aspx they realize their mistake and go back to hardware mixing again

        I wonder those PA developers will follow the stupid Microsoft again?
        Last edited by unknown2; 11-02-2012, 04:47 AM.

        Comment


        • #34
          Originally posted by unknown2 View Post
          Gaming software always has a very high CPU usage.

          For software mixing problem, high CPU load always means bad latency for software mixing solution.
          Mixing can run at high priority. Load doesn't affect it much.

          Having a dedicated hardware for sound mixing is always a good idea.
          No, it's not.

          Take a look on Windows:

          Windows XP: hardware mixing
          Windows 7: change to software mixing which cause serious latency problem http://www.youtube.com/watch?v=iujDVsg_2xY
          That happens when you try to monitor the output from the card; it raises latency.

          Comment


          • #35
            Latency numbers seem to be completely made up

            Hi,

            I'm the author of the current SDL pulse-audio backend (not the original author, but I rewrote it to fix several issues with the original), see:
            http://hg.libsdl.org/SDL/rev/5b99971a27b4

            The numbers posted in this article seem completely made up to me. In my experience (back when I was working on this), When using SDL
            based games (I did most of my testing with ioquake3) one could set the latency lower when using the pulse-audio backend then when
            using the alsa backend (with pulseaudio disabled of course). This is due to pulseaudio using high res timers to schedule sending data
            to the cards buffers rather then relying on the often somewhat "crude" (wrt granularity) interrupts from the soundcard.

            Now if you look at the patch you will notice it is using the new (back in 2009) PA_STREAM_ADJUST_LATENCY flag, if their testing did
            not include this flag, and instead was relying on pulseaudio's defaults, or if they were going something -> alsa -> alsa-plugin-pulseaudio
            rather then directly talking to pulse, then yes 25 ms makes a lot of sense. But then they have just been doing it wrong.

            Back in 2009 I good get excellent latencies using SDL with its pulse-audio backend, provided the game *actually asked* SDL for such a
            low latency ...

            Regards,

            Hans

            Comment


            • #36
              Originally posted by RealNC View Post
              Mixing can run at high priority. Load doesn't affect it much.
              If running at high priority can solve the problem, then ubuntu developer will not "Desires" Lower Audio Latency For Gaming.
              and this post will not exist at all.

              Besides, software mixing running at high priority will probably preempt the game unexpectedly. The "jitter" will be transferred from the sound to the game - network packet drop, video frame skipping.


              Why don't you try to watch a HD movie when your CPU is under full load by low priority programs? Is the movie still ok?

              If linux kernel's scheduler is good at realtime, you should not be affected, right?

              Originally posted by RealNC View Post
              No, it's not.
              Try to archive low latency with cheap card+user level software mixing is very difficult. There is no free lunch.

              The miserable history of linux audio proves that kernel mixing/hardware mixing are superior solution (low cpu usage and good latency)


              Originally posted by RealNC View Post
              That happens when you try to monitor the output from the card; it raises latency.
              try googling yourself about Windows 7 audio latency, this is not the only post
              Last edited by unknown2; 11-02-2012, 05:36 AM.

              Comment


              • #37
                Originally posted by RealNC View Post
                That results in the game taking exclusive control of the card. Nothing else will be audible. Which is a disaster. Unless you talk to the dmix device. In that case, you're back to high latency.
                you are talking about OSS. With ALSA multiple programs can access the sound card.

                I never understood that soundserver idea anyway. You've to configure more for the same solution. Softwaredevelopers have to code more and add special cases for every friggin soundserver. And to top it off, you get 0 advantage from it over direct ALSA. Nada. In fact, you now have a high latency aswell. Well done.

                Also, now you can't even remove PulseAudio anymore without losing the sound control in Ubuntu anymore. (alsamixer is nice, but you always need to open a terminal for it, instead of just using a slider in the top menu bar like it should be)

                And you introduced another level of error into the system.
                Last edited by Detructor; 11-02-2012, 06:07 AM.

                Comment


                • #38
                  Klang

                  Isn't Klang supposed to fix the latency issue?
                  http://www.phoronix.com/scan.php?pag...tem&px=MTE1MDc

                  Comment


                  • #39
                    Originally posted by ssvb View Post
                    Would it be possible to just bypass pulseaudio and talk directly to ALSA when playing games?
                    And loose all the benefits of PulseAudio? I don't get why people still hate PA, it's a great bit of software that does really cool stuff - it's perfect for gamers. Sure, it could do with some latency reduction, apparently, but that doesn't mean it's bad as a thing to have. PA can do stuff like assign certain audio streams to certain output devices really easily - for example, send chat to my headphones and game audio to my speakers - that is really useful for gamers.

                    Comment


                    • #40
                      Originally posted by ninez View Post
                      The human ear (on average) can detect just a few ms. 25ms is unacceptable for any real/classically trained piano/keyboard player. You are talking about significantly higher latencies than a real piano has, how you can claim you don't notice it is, laughably nutz.

                      also, it entirely depends on which HDA it is. Some are crappier than others. I have one in my old dell laptop that has an intelHDA that doesn't start dishing out xruns until i get it to 1ms, but it was quite comfortable around 2ms.

                      cheerz
                      You know sound is a considerable slower media than light. Your brain can't even tell apart single pictures if they are shown within 16ms, most people can't even at 40ms. If you have a really trained ear you'll be able to tell apart sounds with 10ms latency, but I doubt [b]you[/] are able to do so. Just remember 25ms is the latency of the sound from a piano standing 10m away from you. Can you really tell the latency between the pianist triggering the string and you hearing it?

                      Bringing down latency to the technical minimum is just a waste of energy for the sake of some retards that use the latency numbers as a kind of benchmark.

                      Comment


                      • #41
                        Originally posted by gQuigs View Post
                        That seems like the only benefit for the *average* user, but pretty much no *average* user is ever going to modify per-application volume in this way. A "hack" to allow the volume control applet to directly modify volumes exposed from applications would let us get this benefit, while keeping the stack just ALSA.
                        We should go forward, not backwards. Yeah, lets ditch pulseaudio for alsa and some ridiculous hacks!

                        Comment


                        • #42
                          Originally posted by Detructor View Post
                          you are talking about OSS. With ALSA multiple programs can access the sound card.
                          No, they cannot. You're confusing the dmix device with the hardware device.

                          Comment


                          • #43
                            Originally posted by Lynxeye View Post
                            You know sound is a considerable slower media than light. Your brain can't even tell apart single pictures if they are shown within 16ms, most people can't even at 40ms. If you have a really trained ear you'll be able to tell apart sounds with 10ms latency, but I doubt [b]you[/] are able to do so. Just remember 25ms is the latency of the sound from a piano standing 10m away from you. Can you really tell the latency between the pianist triggering the string and you hearing it?
                            This is an utterly incorrect analogy, the visual cortex and auditory cortex of the brain work completely differently. As for the brain being able to separate out individual sounds - it's very fast. If someone clicks their fingers next to your ear, you know it's right next to your ear; if someone does it 10m away, you know it's 10m away - how? Because your brain 'measures' the time difference between reflections of the same signal as they take different paths down the ear canal (after bouncing off the folds of the outer ear), that's why you full 'surround' hearing despite only having two ears.

                            If you're recording sound on a PC, and monitoring whilst playing (the usual setup), anything over 10ms becomes noticeable. Gaming can a have a slightly higher latency because your brain will tie together the visual information with auditory, and at 60Hz that's ~17ms before the sound is heard a single frame after it should have been.

                            Comment


                            • #44
                              Originally posted by Hamish Wilson View Post
                              Again, people like to pick on Lennart Poettering but at least he actively tries to DO SOMETHING to fix up the Linux desktop, rather than just yakking over and over.
                              Yay, flamebaiting! Name one thing he has fixed, instead of made worse.

                              Comment


                              • #45
                                Originally posted by unknown2 View Post
                                Take a look on Windows:

                                Windows XP: hardware mixing
                                Windows 7: change to software mixing which cause serious latency problem http://www.youtube.com/watch?v=iujDVsg_2xY
                                Windows 8: http://msdn.microsoft.com/en-us/libr.../br259116.aspx they realize their mistake and go back to hardware mixing again

                                I wonder those PA developers will follow the stupid Microsoft again?
                                To be fair, it made sense to re-design the Directsound stack as of Vista; it WAS getting on in years. And other audio API's (OpenAL, etc) were still H/W accelerated, just not directsound.

                                Problem is, XAudio2 basically beat out OpenAL as the API of choice, so OpenAL is basically dead on Windows at this point.

                                Comment

                                Working...
                                X