OBD:SNDD: Difference between revisions

From OniGalore
Jump to navigation Jump to search
No edit summary
m (design)
Line 1: Line 1:
[[Main Page]] >> [[OBD:Oni Binary Data|Oni Binary Data]] >> [[OBD:File types|File Types]] >> SNDD File
{{OBD_File_Header | type=SNDD | prev=QTNA | next=StNA | name=Sound Data | family=Generic | align=center}}
 
 
<CENTER>[[OBD:QTNA|<==]] <FONT SIZE=5>SNDD File</FONT> [[OBD:StNA|==>]]<BR>
<FONT SIZE=2>Sound Data</FONT></CENTER>




Line 9: Line 5:




http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/sndd_all.gif
[[image:sndd_all.gif]]




{| width="100%" cellspacing="1" cellpadding="2" bgcolor="#000000" border=1
{{Table}}
|- bgcolor="#FFDDBB" align="CENTER"
{{OBDth}}
| width="15%" | '''Hex'''
{{OBDtr| 0x00 | res_id  |FF0000| 01 D7 08 00 | 2263     | 02263-comguy_dth2.aif.SNDD }}
| width="15%" | '''Translation'''
{{OBDtr| 0x04 | lev_id  |FFFF00| 01 00 00 06 | 3         | level 3 }}
| width="70%" | '''Meaning'''
{{OBDtr| 0x08 | block[54]|FFC8C8| &nbsp;      | &nbsp;    | [[OBD:SNDD/wav|wav header]] }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0x3E | int16    |FFFFC8| 37 00       | 55       | duration in 1/60 seconds }}
| bgcolor="#FF0000" |
{{OBDtr| 0x40 | int32    |C8FFC8| 56 28 00 00 | 10326     | size of the part in the raw file in bytes }}
01 D7 08 00
{{OBDtr| 0x44 | offset  |C8FFFF| 20 10 59 00 |00 59 10 20| at this position starts the part in the raw file }}
| 2263
{{OBDtr| 0x40 | char[24] |FFC8FF| AD DE       | dead     | unused }}
| align="LEFT" | 02263-comguy_dth2.aif.SNDD
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFFF00" | 01 00 00 06
| 3
| align="LEFT" | level 3
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFC8C8" |
|
| align="LEFT" |
[[OBD:SNDD/wav|wav header]]
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFFFC8" | 37 00
| 55
| align="LEFT" | duration in 1/60 seconds
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C8FFC8" | 56 28 00 00
| 10326
| align="LEFT" | 10326 bytes; size of the part in the raw file
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C8FFFF" | 20 10 59 00
|
59 10 20
| align="LEFT" | at this position starts the part in the raw file
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFC8FF" | AD DE
| dead
| align="LEFT" | not used
|}
|}


Line 54: Line 23:




http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/sndd_wav.gif
[[image:sndd_wav.gif]]




{| width="100%" cellspacing="1" cellpadding="2" bgcolor="#000000" border=1
{{Table}}
|- bgcolor="#FFDDBB" align="CENTER"
{{OBDth}}
| width="15%" | '''Hex'''
{{OBDtr| 0x00 | char[4]  |FF0000| 52 49 46 46 | RIFF     | identification that this file uses the IBM/Microsoft RIFF standard }}
| width="15%" | '''Translation'''
{{OBDtr| 0x04 | int32    |FFFF00| 9C 28 00 00 | 10396     | size of the wav file from the the green coloured field to the end in bytes (<nowiki>=</nowiki> size of the part in the raw file + 70 bytes) }}
| width="70%" | '''Meaning'''
{{OBDtr| 0x44 | char[4]  |00FF00| 57 41 56 45 | WAVE     | identification that this file is a WAVE file }}
|- bgcolor="#000000" align="CENTER" valign="TOP"
{{OBDtr| 0x40 | char[4]  |00FFFF| 66 6D 74 20 | fmt       | identification that the wav format header follows }}
| colspan="3" | <font size="2" color="#FFFFFF">Below follows the complete ADPCM wav format header.</font>
{{OBDtr| 0x08 | block[54]|FFC8C8| &nbsp;      | &nbsp;    | [[OBD:SNDD/wav|wav header]]; note that it starts with a 32 and not with an 8 }}
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
{{OBDtr| 0x3E | int16    |FFFFC8| 64 61 74 61 | data     | identification that the wav data follows }}
| bgcolor="#FF0000" | 52 49 46 46
{{OBDtr| 0x40 | int32    |C8FFC8| 56 28 00 00 | 10326     | size of the following wav data in bytes (<nowiki>=</nowiki> size of the part in the raw file) }}
| RIFF
| align="LEFT" | identification, that this file uses the IBM/Microsoft RIFF standard
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFFF00" | 9C 28 00 00
| 10396
| align="LEFT" | 10396 bytes; size of the wav file from the the green coloured field to the end (= size of the part in the raw file + 70 byte)
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#00FF00" | 57 41 56 45
| WAVE
| align="LEFT" | identification, that this file is a WAVE file
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#00FFFF" |
66 6D 74 20
| fmt
| align="LEFT" | identification, that the wav format header follows
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFC8C8" |
|
| align="LEFT" |
[[OBD:SNDD/wav|wav header]]<nowiki>; note that it starts with a 32 and not with an 8</nowiki>
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#FFFFC8" | 64 61 74 61
| data
| align="LEFT" | identification, that the wav data follows
|- bgcolor="#FFEEDD" align="CENTER" valign="TOP"
| bgcolor="#C8FFC8" | 56 28 00 00
| 10326
| align="LEFT" | 10326 bytes; size of the following wav data (= size of the part in the raw file)
|}
|}


Line 100: Line 41:




<HR>
{{OBD_File_Footer | type=SNDD | prev=QTNA | next=StNA | name=Sound Data | family=Generic}}
<CENTER>[[OBD:QTNA|<==]] <B>SNDD File</B> [[OBD:StNA|==>]]</CENTER>
<HR>
 
 
[[Main Page]] >> [[OBD:Oni Binary Data|Oni Binary Data]] >> [[OBD:File types|File Types]] >> SNDD File

Revision as of 15:25, 12 September 2007

ONI BINARY DATA
QTNA << Other file types >> StNA
SNDD : Sound Data
switch to XML:SNDD page
Overview @ Oni Stuff
OBD.png


Below is the dat file part of the SNDD file.


Sndd all.gif


Offset Type Raw Hex Value Description
0x00 res_id 01 D7 08 00 2263 02263-comguy_dth2.aif.SNDD
0x04 lev_id 01 00 00 06 3 level 3
0x08 block[54]     wav header
0x3E int16 37 00 55 duration in 1/60 seconds
0x40 int32 56 28 00 00 10326 size of the part in the raw file in bytes
0x44 offset 20 10 59 00 00 59 10 20 at this position starts the part in the raw file
0x40 char[24] AD DE dead unused


So, how to create playable wav files? Look at the pic below. It shows the beginning of the comguy_dth2.wav sound.


Sndd wav.gif


Offset Type Raw Hex Value Description
0x00 char[4] 52 49 46 46 RIFF identification that this file uses the IBM/Microsoft RIFF standard
0x04 int32 9C 28 00 00 10396 size of the wav file from the the green coloured field to the end in bytes (= size of the part in the raw file + 70 bytes)
0x44 char[4] 57 41 56 45 WAVE identification that this file is a WAVE file
0x40 char[4] 66 6D 74 20 fmt identification that the wav format header follows
0x08 block[54]     wav header; note that it starts with a 32 and not with an 8
0x3E int16 64 61 74 61 data identification that the wav data follows
0x40 int32 56 28 00 00 10326 size of the following wav data in bytes (= size of the part in the raw file)


Just write "RIFF", add the size of the part in the raw file + 70 byte, write "WAVE", write "fmt ", add the wav header + change it's first byte from 8 to 32, write "data", add the size of the part in the raw file, add the raw file data and save it as a wav file.


ONI BINARY DATA
QTNA << Other file types >> StNA
SNDD : Sound Data
Generic file