xnbcli icon indicating copy to clipboard operation
xnbcli copied to clipboard

Add support for RIFF WAV files (sound effects)

Open king-millez opened this issue 3 years ago • 3 comments

Sound Effect support

Closes #40

Notes

  1. I haven't tested this with Terraria, Stardew Valley, etc - this converts WAV XNB files from the game Hacknet
  2. I'm not mainly a JS developer so something is probably bad in this
  3. The reader in this PR might go against the standard set in the others - can change if that's wanted

What's new

  • Adds the SoundEffect type which can handle XNB files with Microsoft.Xna.Framework.Content.SoundEffectReader and Microsoft.Xna.Framework.Content.SoundEffect in their header.

king-millez avatar Sep 05 '22 12:09 king-millez

Reading in the header information is wrong, this would imply that the chunk size is always the same. I'm not sure if that would work, especially if you wanna add files back into the game.

LeonBlade avatar Sep 05 '22 17:09 LeonBlade

@LeonBlade this will create the header from the XNB data

king-millez avatar Sep 08 '22 13:09 king-millez

I have only looked briefly, but there's still a lot of "magic numbers" here, meaning things like 18 without any clear indication on what that is. I'd have to do research to identify what any of these values is because it's not clearly defined in the code in any way, and I have no way of knowing if they're always expected to be like this, or if it could somehow change, if it's a product of whatever game you're testing against, etc.

LeonBlade avatar Sep 08 '22 17:09 LeonBlade