Emulator Issues #9615
closedMetroid Prime: Audio skipping issues
0%
Description
Game Name?
Metroid Prime
Game ID? (right click the game in the game list, properties, info tab)
GM8E01
MD5 Hash? (right click the game in the game list, properties, info tab, MD5 Hash: Compute)
fdfc41b8414dd7d24834c800f567c0f8
What's the problem? Describe what went wrong.
Metroid Prime seems to have audio skipping issues at all times, despite the game running at 60fps.
I haven't run into this issue with other games I've run in Dolphin (Melee, Project M, etc).
Issue seems to occur regardless of audio setting (HLE, LLE recompiler/interpreter).
(Using Pulse audio backend, OpenAL doesn't seem to work for me and haven't investigated getting OpenAL to work)
What steps will reproduce the problem?
- Start Metroid Prime
- Get annoyed while waiting for title screen to show so music can start playing
- Enjoy skipping audio! (The skipping will continue even if you go beyond the title screen/main menu and start playing the game normally)
Which versions of Dolphin did you test on? Does using an older version of Dolphin solve your issue? If yes, which versions of Dolphin used to work?
Tested on Dolphin 4.0-Git and Dolphin 4.0-7840
(In the case of 4.0-Git, Dolphin doesn't seem to report the exact revision, so I'm not sure of the exact revision, apologies)
The audio skipping seems greater/more exaggerated in 4.0-7840 than in 4.0-Git
What are your PC specifications? (CPU, GPU, Operating System, more)
CPU: Intel(R) Core(TM) i5 CPU 750 @ 2.67GHz
GPU: GTX 960
OS: Ubuntu 14.04
8GB RAM
Is there any other relevant information? (e.g. logs, screenshots,
configuration files)
I'm an engineer, I shouldn't have any issues providing more information upon request.
Updated by JMC4789 over 8 years ago
We don't officially support Ubuntu 14.04. I'm still guessing that the game isn't quite going full speed or something. Metroid Prime 1 is super demanding. As someone who had an i5-760 years ago, I know it was at the very edge of what could run Metroid Prime then. While CPU performance has gone up, shader generation lag hasn't gotten any better and GPU thread (which runs on the CPU) performance is definitely lower than it used to be in 4.0, perhaps explaining why it's worse. Also, audio latency is lower meaning that the stuttering is lower.
The fact you can't test other audio-backends is also bad; if you could have tested Alsa or OpenAL or something, then we could have at least seen if it was something else.
Updated by disk over 8 years ago
Hadn't quite tested all the audio backends.
Just tested ALSA and AOSound, issue still occurs.
I could spend some time messing around to get OpenAL working if you'd like, but I think testing ALSA/AOSound at least lets you know it's not something specific to the PulseAudio backend causing this.
I was also inclined to think this is simply an issue with not having powerful enough hardware at first, and that may very well be the case. However, observing my CPU usage %s, I find that all four of my CPU cores remain well under 100% while Metroid Prime is running (they all sit at around 30%, occasionally reaching 40~50% but rarely exceeding 50%.
Especially given the symptoms (varying amounts of audio skipping depending on audio backend/version of Dolphin used), it definitely seems like something isn't running at full speed, but based on CPU observation it seems like it's something other than the CPU. I also observed my GPU some, it wasn't even running at max clock speed (and forcing max clock speed didn't particularly affect the audio skipping issue).
So I'm somewhat less certain this is a typical 'hardware isn't powerful enough to run Dolphin at full speed' issue. Feel free to correct me if you're aware of something I'm not.
Updated by disk over 8 years ago
As an extra note: Dolphin uses about 70-80% CPU while Metroid Prime is running, however this is the total % spread used across however many CPU cores it uses. No individual CPU core is running at anything close to 70-80% while the game is running.
Updated by JMC4789 over 8 years ago
There's a lot of things that can go wrong in Metroid Prime, especially with how it loads things. In the main menu it should run full speed though. I'm testing it on latest master and it's just fine in there for me. The only reason I'm testing the main menu is because that's the best place to test without running into shader generation issues.
But yeah, it's perfectly fine here. Have you modified audiovariance? Can you try latest dev?
Updated by disk over 8 years ago
Not sure what you mean by audiovariance (if you're wondering if I'm running all my audio through a system-wide software equalizer or something, I'm not doing anything of that sort). Audio Settings are as follows:
DSP Emulator Engine -> HLE (LLE interpreter/recompiler both work but still have audio skipping.)
Dolby Pro Logic II decoder -> disabled (enabling this results in no audio)
Audio Backend -> Pulse (ALSA, AOSound, Pulse all work but have audio skipping issue with Metroid Prime, OpenAL results in no audio)
Volume -> 100%
I can try latest dev if you'd like. Just clone master branch from git repo, build that and run it?
Updated by disk over 8 years ago
OK, tested using latest dev build. Issue still occurs. CPU usage on each core remains below 50%, dolphin still uses around 70-80%. GPU's clock speed isn't maxed out, and forcing it to max out has no affect on the audio skipping. Tried different audio backends and DSP emulator engines, still the same.
FYI, had to do a little hack to get Dolphin to build. I'm not too familiar with CMake, but it wasn't passing the flag '-std=c++14' to GCC, which is required to compile Dolphin with GCC because Dolphin is using new features added in the C++14 standard. Beyond getting CMake to pass that flag I didn't have any issues building.
I understand it's difficult to fix issues unless the developer can reproduce them on his own machine, so I guess I won't feel too bad if you end up writing this off as someone with a machine that isn't powerful enough or a bug you couldn't figure out how to reproduce. But observing my computer's CPU/GPU usage definitely makes me think it could very well be something other than my machine lacking the speed to emulate the game. (I turned on Dolphin's FPS display just to confirm, it's running at a steady 60fps in fullscreen mode.)
Updated by JMC4789 over 8 years ago
Can you record the audio, both using Dolphin's audio dump and an external program.
Updated by disk over 8 years ago
Max upload size here is 5MB so I've uploaded it onto an external site.
Here you go!
Let me know if you need it uploaded somewhere else (such as this site, I could try to shorten the amount of audio played/recorded to reduce the file size if necessary).
Updated by disk over 8 years ago
Whoops, my bad.
Here's the link with decryption link embedded in the link:
https://mega.nz/#!rI80EITA!5hPQYxYuwaohBXER0j6uOeZgrwiEOiQ3O4bGOulmKfg
Updated by JMC4789 over 8 years ago
Are you using a hacked netplay build? It sounds like you have the 120 FPS Audio Interface hack on.
Updated by disk over 8 years ago
I do have 4.0-7840 installed on my machine (which is a build designed for netplay on Anther's Ladder), and I didn't install the latest dev build system-wide (AKA I didn't 'sudo make install'), I simply built it and ran it in the directory it was built in.
Updated by JMC4789 over 8 years ago
It sounds like the audio buffer is constantly running out, like the game is stuck at one framerate but running at another. It's really strange.
Updated by disk over 8 years ago
Well, I've got Dolphin building at this point...
If you or any other Dolphin dev'rs want to come up with some code to dump more information on the state of Dolphin when this is happening to try and debug the problem, I'll gladly run anything you throw at me.
Updated by JMC4789 over 8 years ago
I'm not 100% sure what's going wrong though. It definitely seems like something that's not present for anyone else though. That's why I'm trying to think of what could cause this. Is the framelimiter improperly set? Is there something in cheats enabled? Is the CPU Clock rate set to something weird?
Updated by disk over 8 years ago
Speed Limit is set to 100% (Normal Speed).
Nothing is checked/enabled under AR Codes or Gecko Codes. (Nothing is listed under Gecko Codes, either)
Under Advanced -> CPU Options, the option to 'Enable CPU Clock Override' is unchecked/disabled. (even if it were checked/enabled, the value it is set to is 100% (486 mhz).
Updated by JMC4789 over 8 years ago
I can't think of why it would be doing this... unless it was something really weird. Are you loading the disc over network or something?
Updated by disk over 8 years ago
Nope. Actually I was wondering if my hard disk wasn't fast enough for the game, so I tried copying it over to my SSD and running it. No change/improvement.
Updated by disk over 8 years ago
Got an update of sorts on this.
So as I've been working on other things, I've checked Dolphin every now and then.
The first thing I found that was surprising is that the audio skipping problem was actually occurring with other games.
Metroid Prime was a game that I had only recently backed up for use with Dolphin, so I mistook Metroid Prime to be the only game with this issue when I booted it up in Dolphin for the first time and ran into the audio skipping problem.
Second, the issue is no longer occuring for me. Have no idea why (I have my computer set to not suspend, hibernate, lock/go to login screen, or even turn off the monitor screen, I have not powered off my computer since I encountered the problem, and I have all the same programs open as I had when the problem occurred.)
Not very helpful, but at the very least it should be good to know that the issue wasn't actually limited to Metroid Prime.
Updated by doodoodeedoop over 8 years ago
Metroid Prime suffers the most from the shader cache issue of all the Gamecube games.
It probably stopped happening because you played the game enough for everything to get cached.
You're not experiencing audio skipping. You're experiencing stuttering from shader cache generation (which effectively makes everything stutter not just the audio).
Updated by disk over 8 years ago
That would make sense if the problem were resolved by sitting around in the game for awhile, but it didn't, it continued to occur as long as I sat on any given part of Metroid Prime and Super Smash Bros. Melee (menus, in-game play, etc...) (and persisted at all times for these games), the problem was only resolved for some unknown reason when I came back to try playing it and other games on a later occasion. Does the lack of a shader cache explain why the Metroid Prime title screen music would continue to skip non-stop for around 5~10 minutes or so? I don't think so.
I just had a thought- could this kind of audio skipping problem happen non-stop like it did for me if I had unusually limited GPU memory resources, causing the shader cache to never get filled? (Forgive me if this is a silly thought, I'm not particularly familiar with the concept of caching shaders but I'm assuming here you'd cache them in GPU memory.)
I have ample GPU memory available at the moment, and Dolphin doesn't seem to have any issues with audio in Metroid Prime or other games right now, but I wonder if there was something eating up all my GPU memory at the time the problem occurred that would cause Dolphin's shader cache to not fill. Unfortunately I forgot to check my GPU memory consumption at the time the issue was occuring.
As far as CPU memory goes, I have 8GB of RAM and a 16GB disk cache that is written not to my regular hard disk, but to my SSD. So it seems somewhat unlikely that lack of CPU memory was the cause of the problem.
The GTX 960 I have has 4GB of memory, but for example, right now with Dolphin running I'm using 25% of that memory. It seems pretty unlikely imo, but at the very least I can't deny the possibility that all my GPU memory was being eaten up at the time the problem was occurring because I forgot to check it at the time the problem was occurring.
At any rate, with the problem no longer occurring even for myself, it seems like it's not going to be easy to figure out what was going on with this...
Updated by disk over 8 years ago
Hello all, it's been awhile.
I determined the exact cause of the audio skipping issue.
I have multiple audio outputs, an analog output that goes to a 3.5mm audio jack and a digital output that goes out with the HDMI video output on my video card.
If I only output sound to one of these cards, Dolphin does not have any issues. If I try to output to both cards simultaneously, however, the audio skipping issue occurs until I revert back to only outputting to only one of the audio output devices.
Any thoughts on this?
Updated by disk over 8 years ago
To be clear, the audio skipping only happens with Dolphin, and not with other applications when playing audio back on multiple audio outputs.
Updated by JMC4789 over 8 years ago
Just a question: Does this happen in Dolphin 4.0? If it doesn't, I know what's happening, but it's not a bug with Dolphin but rather something weird with windows.
Updated by disk over 8 years ago
I do think this issue occurs in Dolphin 4.0 (I tested using Dolphin 4.0-7840, if you want me to grab 4.0 itself and test again I'll gladly do so.)
Updated by JosJuice over 8 years ago
4.0-7840 is very different from 4.0. You need to test in 4.0 itself (or possibly 4.0.1/4.0.2).
Updated by disk over 8 years ago
OK, I guess I'll grab 4.0.2 and test that then? (Probably would prefer not to test all three unless I need to.)
Updated by disk over 8 years ago
OK, tested on Dolphin 4.0.2. The issue does not occur with 4.0.2.
Updated by JMC4789 over 8 years ago
Okay, this is probably related to LibUSB support added into Dolphin for Native GameCube Adapters; I have no idea why this is happening for you in this way, but I don't think there's anything we can do about it.
Updated by PEmu about 8 years ago
Is this issue still present in the latest development builds?
Updated by JMC4789 almost 8 years ago
- Status changed from New to Invalid
Skidau fixed an issue with OpenAL recently that hopefully will take care of these... still, been no response for 4 months regardless.