BGM gets corrupted, is there a reason?

Hello everyone.

I am using the RPG Maker Sound Color files available for free from Aaron Krogh. They are fantastic and I really want to keep using them.

The files are fine (except for a couple that never play for me), when I want to listen to them outside the engine, they are sounding great.

When I add them to my game, they also work fine until randomly they don't anymore. When they start playing in a cutscene they make a weird start/stop noise, like it's buffering or something.

So I have to go to Resource Manager (F10), delete the bgm, import it again from the folder and then it is working for some time.
After a while, it gets corrupted again. I noticed this only with these files. So, is there a way to prevent this from happening?

Thanks in advance!
If the files really get corrupted, you have a much bigger problem. You might have a virus, or your hard disk is getting old. A virus is curable, but dying of age is something no-one can escape.

I'd run some scans if I were you. And if everything is clean, make up backups (and save them on any medium you like, other than your current computer) for all your important stuff before it's too late.

I don't see how a file can work fine, and than just start acting up, just by it being played by your game. That doesn't happen, because your game doesn't overwrite those files. So if it is not a virus, and not your hard disk, than... idk...

---

However... What if the files are not corrupted at all? You say it sounds like buffering... How large are your files? Maybe it IS buffering.

If your files are very large, you can pre-load them. Simply play the file at the start of the scene, at volume 0. It can be overwritten by another command straight away, if you want other music to play untill this music is called, as long as you call for it a few seconds or more before you need it.

Do this for all the files you want to use in that scene, just on the top of the event is fine.

Now all the files are loaded before they are played, eliminating all the loading lag.
Is it just in RPG maker that causing the files to go corrupt?

Have you tried playing them in a normal music player and see how they work then?
If the files really get corrupted, you have a much bigger problem. You might have a virus, or your hard disk is getting old. A virus is curable, but dying of age is something no-one can escape.

I'd run some scans if I were you. And if everything is clean, make up backups (and save them on any medium you like, other than your current computer) for all your important stuff before it's too late.

I don't see how a file can work fine, and than just start acting up, just by it being played by your game. That doesn't happen, because your game doesn't overwrite those files. So if it is not a virus, and not your hard disk, than... idk...

---

However... What if the files are not corrupted at all? You say it sounds like buffering... How large are your files? Maybe it IS buffering.

If your files are very large, you can pre-load them. Simply play the file at the start of the scene, at volume 0. It can be overwritten by another command straight away, if you want other music to play untill this music is called, as long as you call for it a few seconds or more before you need it.

Do this for all the files you want to use in that scene, just on the top of the event is fine.

Now all the files are loaded before they are played, eliminating all the loading lag.
I will definitely make some back up files.
It only happens to (currently) 3 of these files, but maybe it is a virus I'll have the files checked!
As for the size, I need to see. Since the purpose of these tracks was for RPG Maker, I thought the size would be fine by default.

@Martin_Arcainess when I play them outside RPG Maker, they sound fine.
I will definitely make some back up files.
It only happens to (currently) 3 of these files, but maybe it is a virus I'll have the files checked!
As for the size, I need to see. Since the purpose of these tracks was for RPG Maker, I thought the size would be fine by default
Well, that depends on the computer you use. If you work on a pentium 4, you will experience more issues than on a i7. Your graphics card is important too.

I can tell from experience that RPG maker VX Ace can dealbwith older computers really well, but on older computers, things like file size and such become more important.

Don't scan your disk on viruses alone. If the files are corrupt, it's way more likely your hard disk is dying. The never your disk is, the more likely it is.

-----

Another possibility...

Do you use A cloud storage service? Like dropbox, onedrive or google drive? Or maybe a private server? And do you load, test and edit directly on the server?

If the answer is yes, we found your problem. Work on a local copy of your game. Cloud servers are perfect for back up, not so much for work space.

If you happen to have an app installed, and you want to keep working in the onedrive or Dropbox folder, turn off auto-sync.
Well, that depends on the computer you use. If you work on a pentium 4, you will experience more issues than on a i7. Your graphics card is important too.

I can tell from experience that RPG maker VX Ace can dealbwith older computers really well, but on older computers, things like file size and such become more important.

Don't scan your disk on viruses alone. If the files are corrupt, it's way more likely your hard disk is dying. The never your disk is, the more likely it is.

-----

Another possibility...

Do you use A cloud storage service? Like dropbox, onedrive or google drive? Or maybe a private server? And do you load, test and edit directly on the server?

If the answer is yes, we found your problem. Work on a local copy of your game. Cloud servers are perfect for back up, not so much for work space.

If you happen to have an app installed, and you want to keep working in the onedrive or Dropbox folder, turn off auto-sync.
Oh wow this must be it then because I have everything on cloud and work directly from there.
I hope it is because the thought of my laptop dying is terrifying...

I'll get everything locally and check it out!
Really? That was such a shot in the dark. I didn't really think

The fact that it has to read the music from a server while playing, is enough to cause lag at least. This is probably the problem. So, to be clear, I still think your files are NOT corrupt.

I didn't mean to give you a scare. Earlier I said that if the files were corrupt, it might be HDD failure, but I thought the problem was probably not corrupt file, but file size, or something.

Turns out it is probably the cloud service. Once copied over to your harddisk, everything probably runs just fine and no files are corrupt.

However, if it turns out your files are corrupt and it happened on the server, it can be a few things:
- Terrible connection while uploading
- Terrible cloud service

Again, cloud service is perfect for backups, not for workspace.

Let me know if this fixes it.

(Edit: When I say "old", I mean 7 or 8 years, or even older. And mostly about desktops. This isn't really a thing in modern laptops with an SSD.)
Really? That was such a shot in the dark. I didn't really think

The fact that it has to read the music from a server while playing, is enough to cause lag at least. This is probably the problem. So, to be clear, I still think your files are NOT corrupt.

I didn't mean to give you a scare. Earlier I said that if the files were corrupt, it might be HDD failure, but I thought the problem was probably not corrupt file, but file size, or something.

Turns out it is probably the cloud service. Once copied over to your harddisk, everything probably runs just fine and no files are corrupt.

However, if it turns out your files are corrupt and it happened on the server, it can be a few things:
- Terrible connection while uploading
- Terrible cloud service

Again, cloud service is perfect for backups, not for workspace.

Let me know if this fixes it.

(Edit: When I say "old", I mean 7 or 8 years, or even older. And mostly about desktops. This isn't really a thing in modern laptops with an SSD.)
Lucky shot though 😀

I am downloading everything locally right now but it's so much it will take some time. As soon as I have a conclusion I'll let you know thank you.

I also doubt it's a virus ro something like that because I am running scans (with CC Cleaner and my antivirus) and never found anything... I do get the message some parts are a bit older but I ignore this maybe I shouldn't 😅
So much for 1 project?

Yeah, I get the part where you ignore that, I do that too.

That is why I like PC. When something breaks, I replace that part and I'm good to go, for like 30 or 100 bucks, depending on the problem.

Bet, luckily, your hardware doesn't seem to be the problem here. So there is no reason to worry about it now.
So much for 1 project?

Yeah, I get the part where you ignore that, I do that too.

That is why I like PC. When something breaks, I replace that part and I'm good to go, for like 30 or 100 bucks, depending on the problem.

Bet, luckily, your hardware doesn't seem to be the problem here. So there is no reason to worry about it now.
It was saying 7403 elements need to be downloaded and rest time 1 day XD but then all of a sudden it was done, I had to leave though so I couldn't reply earlier, sorry.

So the problem was still happening but then I remembered you saying file size could also be a reason and I checked and saw the files are all mp3 files. I converted them to ogg and (as of now) they are working fine. In case they will be problematic again, I'll reply to this thread. I believe though the conversion to ogg is the solution to this.

Regardless, thank you very much!
Oh yes, the format should be .ogg indeed. I'm surprised they played at all in VX Ace, in MP3 format.

I didn't know you could even play MP3 in VX Ace, otherwise I would have suggested that.

It was saying 7403 elements need to be downloaded (...)
For 1 project? That is what I would say, one huge ass project. 😛
Oh yes, the format should be .ogg indeed. I'm surprised they played at all in VX Ace, in MP3 format.

I didn't know you could even play MP3 in VX Ace, otherwise I would have suggested that.


For 1 project? That is what I would say, one huge ass project. 😛
Yeah, maybe I should scale it down but I am having so much fun XD
The more scripts I come across, the more ideas I have and thankfully they work fine no bugs or crashes (yet XD)
Well, until now 😛

Original thread: https://forums.rpgmakerweb.com/threads/bgm-gets-corrupted-is-there-a-reason.174144/