XWV: Difference between revisions
Jump to navigation
Jump to search
(Complete rewrite using the information from the SDK) |
(this file format proprietary-ness kinda makes it hard to reverse engineer, but atleast so far i found a tool that allow users to convert it back to wav.) |
||
(7 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{stub}} | {{stub}} | ||
'''XWV''' is the sound format used by Valve's | '''XWV''' is the proprietary sound format used by Valve's {{360|4}} games. It is similar to the [[WAV]] format and uses the big-endian byte order. The format is defined in the [[SDK]] in {{path|public\xwvfile|h|icon=custom|customico=Cpp-16px.png}}. | ||
To convert some XMV file to WAV, you can use [https://vgmstream.org/ vgmstream]. | |||
== Header == | == Header == | ||
Line 48: | Line 50: | ||
</source> | </source> | ||
[[Category: | [[Category:Audio formats]] |
Latest revision as of 04:32, 1 April 2024
XWV is the proprietary sound format used by Valve's Xbox 360 games. It is similar to the WAV format and uses the big-endian byte order. The format is defined in the SDK in
public\xwvfile.h
.
To convert some XMV file to WAV, you can use vgmstream.
Header
#define XWV_ID (('X'<<24)|('W'<<16)|('V'<<8)|(' '<<0))
#define XWV_VERSION 4
enum xwvSampleRate_t
{
XWV_RATE_11025 = 0,
XWV_RATE_22050 = 1,
XWV_RATE_44100 = 2,
};
enum xwvFormat_t
{
XWV_FORMAT_PCM = 0,
XWV_FORMAT_XMA = 1,
XWV_FORMAT_ADPCM = 2,
};
// generated in big-endian
struct xwvHeader_t
{
unsigned int id;
unsigned int version;
unsigned int headerSize; // header only
unsigned int staticDataSize; // follows header
unsigned int dataOffset; // start of samples, possibly sector aligned
unsigned int dataSize; // length of samples in bytes
unsigned int numDecodedSamples; // for duration calcs
int loopStart; // -1 = no loop, offset of loop in samples
unsigned short loopBlock; // the xma block where the loop starts
unsigned short numLeadingSamples; // number of leading samples in the loop block to discard
unsigned short numTrailingSamples; // number of trailing samples at the final block to discard
unsigned short vdatSize; // follows seek table
byte format;
byte bitsPerSample;
byte sampleRate;
byte channels;
byte quality;
byte bHasSeekTable; // indicates presence, follows header
byte padding[2]; // created as 0
};