Question about nox audio format

Everything about NoX as a game.

Question about nox audio format

Postby panic » Wed Feb 17, 2021 3:49 am

Where can I check the byte ratio of the audio used in the nox?

Code: Select all
using WavFormatHeader = struct
{
   uint32_t header;
   uint32_t waveSize;
   uint32_t waveSymb;
   uint32_t fmtSymb;
   uint32_t fmtChunkSize;
   uint16_t audioFormat;
   uint16_t channels;
   uint32_t sampleRate;
   uint32_t byteRate;     //this! where?
   uint16_t sampleAlign; //also
   uint16_t sampleDepth; //also
   uint32_t dataSymb;
   uint32_t dataSize;
};


I am making an audio extractor. but when I did extract the wav format, it was the wrong format.

so i checked the audio.idx file. i finally got some hints. (sample rate, length of stream,..)
but what is mean '0x0c' or '0x0d'?
i need to get the remaining data!


thank you, have a nice day. =)
panic
Veteran
Posts: 330
Joined: Thu Nov 12, 2015 3:47 pm

Re: Question about nox audio format

Postby angrykirc » Sun Feb 21, 2021 7:41 pm

See the file to get an understanding of .idx contents.
Also to get raw PCM data you would need to decompress a chunk of data where the Index entry points (offset in .bag), some audio files are stored in mono and some are in stereo format (1 or 2 channels of audio)
Nox uses a modified IMA ADPCM algorithm, it differs in how stereo samples are interleaving. I has lost the working code for decompression but you can reconstruct in yourself after some experimenting.
Have a nice day.
Attachments
AudioBagIndex.txt
(2.71 KiB) Downloaded 3 times
Retired Nox hacker enthusiast. One of those who made latest Map Editor.
User avatar
angrykirc
Initiate
Initiate
Posts: 20
Joined: Thu Jul 10, 2014 3:34 pm


Return to NoX discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron