OK, I'm not sure what you mean. Is it that the distance from the last "WBOR" text string in the ID Table to the first "WBOR" in the Sample Table is 0x24 bytes (decimal 36) instead of 0x38 bytes (decimal 56) like between "WBOR" strings inside the ID Table? That's because the ID Table entries don't start at the "WBOR" string, but 20 bytes earlier... while Sample Table entries start with the "WBOR" string.Rebel wrote:Ok, well even though the latest version is alpha (meaning I've only tested it), I've decided to put the link up for v_12.
Mentioning this first (since it's important): Do Not attempt to update either a retail or earlier fan_based tpa file with this program (use tpaAdd is this is your intent). The reader exports new .tpa files (name it whatever you like), and these are the .tpa files you must use if you plan on using this program to add a .cau file (these are basically wbor data blocks which are either exported out of other tpas or created by converting a pcm or ima adpcm wav into a .cau file).
Reason (for anyone curious): The last table entry of retails is slightly smaller (24, as opposed to 36 bytes), and I've made no allowances for this (and don't plan to).
Well, we certainly need to fix those. Hopefully the existing ones aren't too many.The blank.tpa files we've been using for years have an erroneous entry count and some extraneous data written past the last table entry and I've made no allowances for this either (and don't plan to).
I wonder why...
Warning given. ..
Onto the .caus. Dealing with wav data as .cau files is preferable for several reasons. The wav data can be either .pcm or compressed (ima adpcm), you can import the wav data as a cau file from other tpas along with the caption data, and it also gives us the ability to add our own caption data to a converted wav (wav into .cau) which can be imported into the new tpa files.
I have to stress that this has been barely tested, by me only. Near as I can tell though, everything seems to be aok with the imported sounds, along with tres displaying the caption data. I'll give the additional instructions below (although they are also included within the read_me file), after mentioning that Machf's & Big Red's input has been quite helpful with this little project and I have Machf to thank for the CRC32 code (I found it nerve-wracking, personally).
I'll try it. But tomorrow, I guess, as it's already late.ADDITIONAL CONTROLS:
Export as .cau: This is a radio button. If checked, wav data exports as a .cau file (single or mass export).
CONVERT BUTTON: This control converts a wav file (pcm or dvi/ima adpcm) into a .cau file for later import. If adding caption data to a wav, you must enter the caption line(s) into the fields before clicking this control.
EXP_TPA BUTTON: This control creates a user_named tpa file which this program requires.
ADD_CAU: This control imports a .cau file into a .tpa file. To use, select .tpa (not a retail, and not a fan_based (blank) tpa file), enter a 'SOUND ID*' or string name for your entry, then click the 'ADD CAU BUTTON'. Updating may take several seconds or a few dozen, depending on the size of the data being written and the current size of the target .tpa. Allow the program to finish before doing anything further (check caption data readbox for program's current status). A log file is also generated after an import (and appended to if earlier imports occurred) to eliminate the potential of forgetting what name one might have assigned to a particular sound.
Accessing these .tpas: These are basically assumed to be used by atx (Maps/LVL/Example Tpas) and need to be placed
into the aforementioned, bracketed location. Be certain that you either create, or edit the existing .ini level file to be able to access sounds from the .tpa (else, atx won't know where to look for them). Of course, if you're working on a stand alone package, they can also be used as the main .tpa within the data folder.
Extent of testing: Created several .tpas and added up to 24 entries, including larger music waves. All clips played within trespasser, all caption data (including custom caption data) displayed -
That's about it. If one or two people could check it out, that'd be great.
From what I can tell right now, it still won't allow you to specify the Attenuation Factor or the Master Volume for a sample, the same way as TPAadd... you just need to be able to store those as 4-byte floats.
And it would be great if just line breaks were used to separate caption lines when typing them in a single text area instead of separate textboxes.