Results 1 to 3 of 3

Thread: Audio system causing delays and slowdown- something to look at?

777
  1. [translate]    #1
    Senior Member
    Join Date
    Sep 2010
    Location
    Oldbury UK
    Posts
    235

    Default Audio system causing delays and slowdown- something to look at?

    Hi All,

    I've noticed that simply using audio on our phone slows it down a lot, and it appears to be an audio driver/hardware issue rather than a software issue. Let me explain my findings:

    1) Play, for example, FPSE. The emulator is much slower with sound enabled. You would expect this, however, if you go into the menu and come back out, the emulator runs much faster for a few frames- with no sound. You might say it's just not processing audio, but the emulator itself must be, it's the small delay between sound generation and actually hearing it which is when everything runs faster. Once you actually hear the output, then everything chugs along again. It's as if the audio driver is waiting for the hardware or something, and holding up the whole phone for a few milliseconds here and there.

    If it was the actual emulation that was causing the slowdown, then you'd get a consistently slow emulator, even when sound hasn't started playing yet (because it would still be emulating- it's just being buffered for a small period before you hear it.)

    Get what I mean?

    The same thing goes with other emulators I use. Nes, Snes, C64- they're all noticably impaired when audio is enabled, although only on the more CPU intensive apps does it create a bigger problem.

    Feel free to debunk my findings, but logically it makes sense that theres a delay when processing audio, that is larger than simply just the extra CPU usage of sending audio.

    What can we do about this- I'm a pretty solid developer, though I haven't touched drivers before (bar writing them for old DOS games...) - Any dev here fancy taking a look at the cause? I don't mind diving in and taking a look at the situation- do we have audio driver source? I suspect this would be more useful to us than an RT kernel- which was my previous idea.

    My idea: Part one: perhaps writing a null audio driver , or disabling audio, to test if it really is a driver/hardware issue, if apps speed up with this, then there's a definite delay caused when processing the audio, and that delay is larger than the cost of emulating the sound chips in the emulated machines.
    If the null driver does give a speedup (although no audio) then we have something worth looking at and other steps can be decided!

    What do you think?
    [edit]
    Actually, disabling Soundfix in the kernel gives a pretty nice speedup too, What does Soundfix actually do to fix it, and maybe we can create a "gaming mode"?
    Last edited by cygnus; 04-04-2011 at 01:02 PM.

  2. [translate]    #2
    Junior Member
    Join Date
    Jun 2010
    Location
    Singapore
    Posts
    26

    Default

    yup, even in emulators like gameboid the sound is cracky and it slows the whole game down. really annoying.

  3. [translate]    #3
    Senior Member
    Join Date
    Sep 2010
    Location
    Oldbury UK
    Posts
    235

    Default

    Quote Originally Posted by yeomond View Post
    yup, even in emulators like gameboid the sound is cracky and it slows the whole game down. really annoying.
    Absolutely. I wanted to make sure it was understood that this is related to the audio driver or hardware, and not just inefficient emulators as I first expected.

    With soundfix off, FPSE will run at 30-50fps in GT1 (visually more like 10fps, but it's ok.) whereas if I have soundfix on, I never get above 10fps and it takes a good couple of minutes to reach the main menu. What's bizarre is that FPSE doesn't play audio on some videos, but the state of the audio driver still causes slowdowns at these points. With soundfix on, the "slow boot" PSX mode takes 2-3xlonger, but with the soundfix off, it runs fullspeed.

    Maybe we can tweak the soundfix to resolve this, what do you think?
    We need to look into this, it will make a BIG difference! :-D

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •