Small patch to make the magic meter in ZWW sound better, more like with the LLE plugin. This sound should be more accurate to the sound on LLE, but still not perfect. I can't figure out what else may be wrong, it's still not the same proper tone as with LLE so something else is wrong in the rectwave code that affects the pitch.
Problem was that the sample was playing too fast, this slows down the sample to be more like the LLE implementation of the code. The sample is still the wrong pitch, but I don't know where else to look.
I need either Jack Frost's or Lord Marks help with some things, I'm trying to eliminate the PB.StopOnSilence hack that is meant to keep ZWW from hanging. It says that it needs a buffer for when the voices or music fade, I've had success to an extent implementing a buffer but it still hangs, usually if you let the game idle on the file select screen or intro for a few seconds or more.
You go Xtreme, you patch is all up till it's working right.

I didn't test it, but it's good that you're trying different things.
Included pre-compiled plugin.
This only affects the effect for the magic meter filling up in ZWW afaik, I don't think other sounds use this format. Please report if there are other games that had messed sound effects and they are improved somewhat by this patch.
Interresting patch. Wanna try the following (see UCode_Zelda_Voice.cpp, line 65)?
Code:
s64 ratio = (s64)((_ratio * _ratioFactor) * 16) >> 16;
Correct me if I'm wrong, jack. But shifting the result by 16 will result in... er.... zero. I think it means no sound at all. And X2D will be disappointed and will jump from a high bridge right after[/sarcasm]
The meter definitely sounds much better with your patch. I'll see if any other games benefit from this but it's not going to be easy to find.
Tested, all it does is kill Zelda Ucode music and audio (except the ZWW magic meter) such as ZWW, SMG, SMG2 etc.. which doesn't even play.
Unrelated to the current patch, but that intro/prologue music patch of Torin's has a minor hitch. I read that a buffer needed to be implemented to eliminate the PB.StopOnSilence hack, the PB.StopOnSilence hack is needed else ZWW will hang sometimes. The buffer that was implemented in Torin's patch isn't correct, ZWW will still hang sometimes throughout the game and that isn't an issue with the PB.StopOnSilence hack.
I tried taking a crack at it, and it doesn't hang when I load a specific savegame as long as I don't let the game idle on the file select screen for more than a second or two. It would also be nice to get rid of that minor crackling and skipping that is left over after applying the patch. I'm going to take a look at the code that was commented regarding the intro/prologue still exhibiting minor crackling and skipping and see if there is some way to fix it.
Since shifting by 16 kills audio, is there another way to do this?
It seems it won't work without the return (u32), (u64), (s16), (s32), (s64) or whatever. It seems to be returning the sample and without returning the sample it will go silent.
X2D, I can try to help you with this. But not now, I'm afraid. Remember at that time on google code when you said it was 1am and too late and you were tired?
Well, it happens that I'm 34 hours without sleeping right now. 34 hours straight! O.o I'm going to sleep now. In about 13 or 14 hours I wake up and see what I can do for you, ok?^^
But as I kindly said with my mindless joke in a post above, shiffting the result by 16 will result in many zeros and produces a null sound.
Can I give you a friedly sugestion? Grab an e-book about the basics of C++ and study it. You can do that. And will produce great results I believe. But If you don't do that, I'm afraid you'll never succeed in your journey trying to modify dolphin's code to achieve such results like "perfect sound in SMG" or "creating buffers that are actually buffers". Be in mind one thing: I want to help you, for real. Even when I'm joking like that or when I warn you about the amount of spam you produce. Just look at how much posts you have and compare to the devs, like ector or skidau. Can you see the picture? They spend more time coding and studying instead posting 10 msgs per sec.
You don't know me. But trust me when I say your work will be more effective if you follow that advice. People here are really betting you can. And so do I. And don't be afraid. They can wait your return after, I say, one week without showing up here. You are like a friend of mine. Lots of potencial. I'm just trying to point you in a better direction.
Anyway, I criticized you about writing too much and now look what I've done. LOL I think I need to sleep now.
Good luck. But never ever do shift that 16 like that again, okay? Best regards. Seeya

Oh, by the way, Jack was playing a prank on you, just in case you didn't notice.

Fwiw, an (e-)book about c would be even better, since Dolphin uses about no real "advanced" C++ coding... just basic stuff which is self-explanatory or isn't crucial to understanding stuff.
(300th post, yeah!

)
Well yeah I've been meaning to, I just need patience which I have very little of when it comes to some things due to anxiety and ADHD.
