|Type||Sound Wave Archive|
An .swar is the archive that holds sound samples, likely for playback with .sseq files, in a DS ROM.
File Specifications Edit
Visual Basic Signature:
<StructLayout(LayoutKind.Sequential, Charset:=CharSet.Ansi, Pack:=1)> Public Structure sSWAV Public header As sHeader Public data As sData Public Structure sHeader <MarshalAs(UnmanagedType.ByValTStr, sizeconst:=4)> Public type As Char() ' "SWAV" Public magic As UInteger ' &H0100feff Public nFileSize As UInteger ' Size of this SWAV file Public nSize As UShort ' Size of this structure. Always = 16 Public nBlock As UShort ' Number of Blocks. Mostly = 1 End Structure Public Structure sData <MarshalAs(UnmanagedType.ByValTStr, sizeconst:=4)> Public type As Char() ' "DATA" Public nSize As UInteger' Size of this structure Public info As SWAVInfo' info about the sample Public data As Byte()' array of binary data ' info about the sample Public Structure SWAVInfo Public nWaveType As Byte' 0 = PCM8, 1 = PCM16, 2 = (IMA-)ADPCM Public bLoop As Byte' Loop flag = TRUE|FALSE Public nSampleRate As UShort' Sampling Rate Public nTime As UShort' (ARM7_CLOCK / nSampleRate) [ARM7_CLOCK: 33.513982MHz / 2 = 1.6756991 E +7] Public nLoopOffset As UShort' Loop Offset (expressed in words (32-bits)) Public nNonLoopLen As UInteger' Non Loop Length (expressed in words (32-bits)) End Structure End Structure End Structure
For specifications on the sseq format, look at any of these pages:
Programs to Edit .sdat Files Edit
NDS Sound Extractor (Read only, only operates on a packed .nds ROM, not an individual .swar)