KungFuFurby / AddMusicKFF

Fork of AddMusicK, a compiler/inserter of music for Super Mario World
23 stars 16 forks source link

Playing local song with a lower EDL than global song can cause staticky/crackling noises #174

Open KungFuFurby opened 3 years ago

KungFuFurby commented 3 years ago

Reported by SimFan96 on the AddmusicK 1.0.8 page on SMWCentral.

Related to #61. However, #61 was reported as a crashing bug: this one contains both #61 and this particular one in a better descriptive package.

I did want to report a bug. Some of the songs on the site that are usually used as global songs have echo in them.

What happens for example is if you're playing a level that has music that has no echo, or has a lower echo buffer than the global song with said echo. Once the global song starts playing, there is a small pause when the global song plays which is sometimes accompanied with staticky/crackling noises.

Either that or if you are using a custom starman song that has echo in it, once you lose your star power and the regular level's music plays, the music will either majorly glitch or the music engine will crash, therefore causing the game to crash there or by the next time you exit a level. This doesn't happen when the level' echo buffer matches the same value as the one's with the global song.

Just wanted to inform you about this issue!

I already took care of the crashing bug, but #170 may be helpful in at least partially mitigating the other problem. Unfortunately, the cause of that staticky/crackling noise may be caused by reading leftover data from a previous echo buffer iteration, and this is partially a hardware problem. Either that, or I mistook this for #61, and it has already been resolved.

I'll assume that I haven't mistook this for #61. Anyways... I think what I can do is try and blend it in better.

KungFuFurby commented 3 years ago

There is a second cause, but it wouldn't be related to this one. It could be caused by a hardware glitch when the echo buffer's volume output (prior to EVOL adjustments) overflows, as there is improper handling of clamping in most cases.