Electronic Arts MicroTalk: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 49: Line 49:
WAV and MP3 are common audio formats, and XA refers to the [[Maxis XA]] ADPCM codec (with extension ".xa" in The Sims 1); and most importantly, the UTK files in the DBPF archives have a Type ID that match 0x1b6b9806.
WAV and MP3 are common audio formats, and XA refers to the [[Maxis XA]] ADPCM codec (with extension ".xa" in The Sims 1); and most importantly, the UTK files in the DBPF archives have a Type ID that match 0x1b6b9806.


[[Category:Vocoders]]
[[Category:Audio Codecs]]
[[Category:Audio Codecs]]
[[Category:ADPCM Audio Codecs]]
[[Category:Formats missing in FFmpeg]]
[[Category:Game Formats]]
[[Category:Game Formats]]

Revision as of 23:55, 14 January 2012

Maxis UTalk is a speech-oriented audio codec used in The Sims Online, which operates at 32kbit/s.

UTK File header

struct UTKHeader
{
    char  sID[4];
    DWORD dwOutSize;
    DWORD dwWfxSize;
    /* WAVEFORMATEX */
    WORD  wFormatTag;
    WORD  nChannels;
    DWORD nSamplesPerSec;
    DWORD nAvgBytesPerSec;
    WORD  nBlockAlign;
    WORD  wBitsPerSample;
    DWORD cbSize;
};
  • sID - A 4-byte string identifier equal to "UTM0"
  • dwOutSize - The decompressed size of the audio stream
  • dwWfxSize - The size in bytes of the WAVEFORMATEX structure to follow; must be 20
  • wFormatTag - The decoded audio format; set to WAVE_FORMAT_PCM (0x0001)
  • nChannels - Number of channels in the decoded audio data
  • nSamplesPerSec - Sampling rate used in the decoded audio data
  • nAvgBytesPerSec - Bytes per second consumed by the decoded audio data; equal to nChannels*nSamplesPerSec*wBitsPerSample/8 or nSamplesPerSec*nBlockAlign
  • nBlockAlign - The number of bytes consumed by an audio frame (one sample for each channel) in the decoded audio data; equal to nChannels*wBitsPerSample/8
  • wBitsPerSample - The bits per sample for one audio channel in the decoded audio data; 8-, 16-, or 24-bit, etc.
  • cbSize - The size in bytes of extra format information appended to the end of the WAVEFORMATEX structure; must be 0. Note that in the original WAVEFORMATEX, this parameter is a WORD, not a DWORD.

Note that the part of the header from wFormatTag below is a Microsoft WAVEFORMATEX structure.

Naming notes

The UTK files in The Sims Online were stored in DBPF archives without filenames. However, we can deduce the codec's name and file extension from this text contained in sys/tsoaudio.ini:

;kGZCLSID_cWaveXA = 0x1d07eb4b
;kGZCLSID_cGZSndSegmentDataSourceUTalk = 0x1b6b9806
;kGZCLSID_cGZWave = 0xbb7051f5
;kGZCLSID_cHitMp3DecoderDataSource = 0x3cec2b47
1=0x1d07eb4b,XA
2=0x1b6b9806,UTK
3=0xbb7051f5,WAV
4=0x3cec2b47,MP3

WAV and MP3 are common audio formats, and XA refers to the Maxis XA ADPCM codec (with extension ".xa" in The Sims 1); and most importantly, the UTK files in the DBPF archives have a Type ID that match 0x1b6b9806.