dcealopez / EternalAudioExtractor

Tool for extracting named DOOM Eternal audio files, ready to use for mods.
9 stars 2 forks source link

incompatible format for sound meta data binary file after mod release #2

Open id-johnmichaelquinlan opened 1 month ago

id-johnmichaelquinlan commented 1 month ago

the version in the mod sound meta data is different you need to add this:

                    // Skip all the way to the event section
                    // Skip version
                    int version = binaryReader.ReadInt32();
                    const int wwiseMetaDataVersionRetail = 23;

                    bool retailMetaData = version == wwiseMetaDataVersionRetail;

and

                    for (int i = 0; i < eventCount; i++)
                    {
                        binaryReader.ReadUInt32();
                        uint eventNameLength = binaryReader.ReadUInt32();
                        byte[] nameBytes = new byte[eventNameLength];
                        binaryReader.Read(nameBytes, 0, (int)eventNameLength);
                        string eventName = Encoding.UTF8.GetString(nameBytes);
                        binaryReader.ReadSingle();
                        binaryReader.ReadUInt16();
                        if ( retailMetaData == false )
                        {
                            binaryReader.ReadChar();
                        }
                        binaryReader.ReadUInt32();
                        binaryReader.ReadUInt32();
                        uint affectedSoundCount = binaryReader.ReadUInt32();
id-johnmichaelquinlan commented 1 month ago

additionally there is something odd going on with the track names causing a crash I haven't figured out yet.

id-johnmichaelquinlan commented 1 month ago

I can pull your repository and make a pull request for the changes once I'm done