Thats right and yes in theory it should work based on just review of the USoundFactory source. The only problematic looking parts of the source is the checks for TEXT(“WAV”) possibly, somehow overminding the reimport process but it doesn’t look immediately prone to issue as long as it still uses your factory for reimport. It would be pretty easy to take the same steps your doing right now and just make a modified version of the Super that checks for OGG or whatever else.
Basically, think of the header for the wav file as a struct of size 44. in the table on that site the offset (first left number) would be the offset of the member in the struct.
I took a look around for a C implementation of the header and found this NameBright - Coming Soon . though i’d caution you that theres likely way more information on that site than you need to accomplish this.
using unreal typedefs the header would look something like this…
struct FWaveHeader {
// Riff Wave Header
uint8 chunkId[4];
uint32 chunkSize;
uint8 format[4];
// Format Subchunk
uint8 subChunk1Id[4];
uint32 subChunk1Size;
uint16 audioFormat;
uint16 numChannels;
uint32 sampleRate;
uint32 byteRate;
uint16 blockAlign;
uint16 bitsPerSample;
//uint16 extraParamSize;
// Data Subchunk
uint8 subChunk2Id[4];
uint32 subChunk2Size;
};