Dolphin, the GameCube and Wii emulator - Forums

Full Version: Audio Playback gets Reset instead of "Endless"? 30->60fps
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have an issue i am trying to solve, not sure what topic i should have written but well.

So, the issue is like this.

Normally the Game should play a audioclip and then repeat the end in a loop forever more or less.
Like when you are moving a mouse in game or something and it makes a constant noise.

In 30fps this works fine, it starts and then goes on forever till i stop doing whatever action produce it.

But at 60fps it resets and repeats all the time constantly.

As this only happens for those sounds there must be Something that differs those sound from say, Music or other Sound Effects.

I have tried debugging it for ages in search for whatever is the cause, my only guess is that it has to be some sort of buffer,
and it gets filled to fast at 60fps and instead of repeating the last part it repeats the first part or something.

Does anyone have any idea what i should be looking for or what can produce these results?
Any hint is appreciatedSmile

Thanks!
What game is this in?
Luigi's Mansion, The Suck/Blow Effect.

Interesting enough is that moving the Camera in GameBoy Horror produce the same issue at 60fps,
but that's intended for some reason.

Forcing it to runt at 30fps makes it a constant sound instead of "DJuudjuudjuudjuu" or somethin;P
Here is a sample:

https://youtu.be/PhLvkf_ugyc

EDIT:

Interesting notice,

If i underclock the CPU, the sound loops fine Until it is able to keep 60fps.
Meaning 59 and below is Fine.

I didn't expect this, i thought that Anything above 30fps would cause the issue at some scale.
This is inconsistent, it makes no sense why nothing makes the issue until you hit precisely the double speed (or well the normal speed in this scenario though).
It can't be a fixed buffer that is the issue, nor can it be a timer or the issue of the function being called too often.
Or... Perhaps there is a window it has to hit to loop as long as there is no calls or something that happens After 50% of the time,
that would explain the looping, as the loop cuts of the first part of the audio, so i guess it only plays the last 50%?

Hmm, well this doesn't help me at all haha XD


EDIT2:

Okay done a ton of debugging, i could backtrack to the function which always run when a new audio starts, (or a place within a function to be correct).
And i saw that in 60fps, constantly within a certain timeframe it would "start a new audio" hence why the audio supposed to loop resets.
Now i just thought it occured in Very few selected audio, and this May be the case in the sense that it's onyl noticed in those.

However, i noticed that when doing nothing and just having the background noise, this function would Not be called in 30fps (as long as i didn't do anything).
But in 60fps it would constantly be called within a timeframe once again (Probably the Background wind, but Very hard to even notice as it's basically just a constant noise).

Whatever the case is, Something forces it to reset at 60fps, at least now i know that it's probably not the actual Sound itself, cause i thought it was 2 functions that used those kind of looping sounds that were the issue.
So it must be something deeper down the core i guess. (Or it's just the Wind, Vacum and GameBoy Horror that use this specific loop sound functionality, which i have no idea how it even differs from normal sound)

If anyone has Any idea or know how Gamecube works on this stuff etc please do tell, i know next to nothing so i have no clue at all what to even look forSmile
Okay did another test which i didn't work as expected.

Logically one would think, that if the issue appears at 60fps only, and not anything below,
that means it Should have to do with it being Double the speed of 30 or something.

So i then assumed, that the issue would only get worse once you get to either 90 or 120fps.

So i tried this with Ishiiruka (to force the video rate, as i don't know how to bypass the vsync in the game).
And it seems that at 60fps and beyond it just gets worse and worse Very quickly, the loop just gets shorter and shorter.

I am completely lost, but then again i have never worked on such things so perhaps it's some common way to handle end loops of Audio or something.

I will further investigate as i got nothing better to do lol xd
Just FYI, Luigi's Mansion was made with a 30 FPS lock, so the audio issue you're getting isn't a problem with Dolphin, it's just the game engine bugging out since it's being forced to run on a higher FPS. In other words, you'll probably need to patch something in the game to avoid this (e.g. a Gecko Code or similar)...
Yeah well i am coding, and i am trying to try to figure out a way to fix it.
Did i write at the wrong part of the forum for this;S?

Thought Code Patches meant just thatSad

EDIT:

Oh and the GameBoy horror part is actually 60fps per default.
So either the audio reset is an intended feature, or a bug.
(11-03-2016, 01:48 PM)Zerowalker Wrote: [ -> ]Yeah well i am coding, and i am trying to try to figure out a way to fix it.
Did i write at the wrong part of the forum for this;S?

Thought Code Patches meant just thatSad

EDIT:

Oh and the GameBoy horror part is actually 60fps per default.
So either the audio reset is an intended feature, or a bug.

Yeah Code Patches is where the other 60 FPS and widecreen hack threads are (other than the one we've been using, which is linked to its article on the front page). No idea why that person gave their response like that lol
(11-04-2016, 05:33 AM)Meowmaritus Wrote: [ -> ]Yeah Code Patches is where the other 60 FPS and widecreen hack threads are (other than the one we've been using, which is linked to its article on the front page). No idea why that person gave their response like that lol

It's because it's not uncommon to see people come here and ask for help with using existing codes, having no intention to work on codes on their own. I don't think there's anything that formally says that this forum only is for developing code patches. In fact, the intended purpose of the forum was to submit patches for Dolphin's source code, not games. Nobody uses it that way anymore, though. (Probably because we have pull requests now?)
Wait, having no intention to work on codes on their own?

I have been working the last weeks on this stuff,
and the audio issue basically the last few days just trying to track what the cause is.

But as i can't seem to be able to figure it out, and i have very little knowledge in this area,
i don't frighten to ask for help, and i don't ask in the sense of "Someone do the work for me".
But more like, does anyone have Any idea What could be going on, any kind of speculation, or perhaps knowledge how Games handle this things technically etc is of very useful assistance to meSmile
Pages: 1 2