Recognizes if input is ogg or not.
[xiph.git] / positron / doc / sai.html
blob3c1c0b3e672beaca1db32e550b71541a29489366
1 <html>
2 <head>
3 <link rel="stylesheet" type="text/css" href="style.css" />
4 <title>Positron Developer's Guide: SAI File Format</title>
5 </head>
6 <body>
7 <h1>Positron Developer's Guide: SAI File Format</h1>
9 <p>
10 This document explains the format of the SAI files. SAI files are
11 used in the database as a table of contents. Every non-deleted record
12 in the database will have a record in the SAI file. SAI records are
13 all the same size, so it is very easy to modify the contents of this
14 file in place, including removing and reordering entries.
15 </p>
17 <p>
18 A record in a SAI file consists of a pointer to a MDB record, and to
19 its associated PAI module (if applicable). The pointer to the PAI
20 module does not point to the start of the module, however, but to the
21 location of the <em id="caveat">first entry within the module</em>. See the
22 <a href="pai.html">PAI file format</a> for more information.
23 </p>
25 <table class="fielddef">
26 <tr><th>Word Offset</th><th>Size (words)</th><th>Description</th></tr>
27 <tr><td>0</td><td>2</td><td>Signature, "0x05181971"</td></tr>
28 <tr><td>2</td><td>2</td><td>Reserved (zero by default)</td></tr>
29 <tr><td>4</td><td>1</td><td>Number of entries (N)</td></tr>
30 <tr><td>5</td><td>3</td><td>Reserved (zero by default) </td></tr>
31 <tr><td>8</td><td>4</td><td>0x00000000, 0x00000000 (looks like an empty record)</td></tr>
32 <tr><td>12</td><td>2</td><td>MDB pointer for record 1</td></tr>
33 <tr><td>14</td><td>2</td><td>PAI pointer for record 1</td></tr>
34 <tr><td>...</td><td>...</td><td>...</td></tr>
35 <tr><td>12+4*(i-1)</td><td>2</td><td>MDB pointer for record i</td></tr>
36 <tr><td>14+4*(i-1)</td><td>2</td><td>PAI pointer for record i</td></tr>
37 <tr><td>...</td><td>...</td><td>...</td></tr>
38 <tr><td>12+4*(N-1)</td><td>2</td><td>MDB pointer for record N</td></tr>
39 <tr><td>14+4*(N-1)</td><td>2</td><td>PAI pointer for record N</td></tr>
40 <tr><td>12+4*N</td><td>4</td><td>0x00000000, 0x00000000 (looks like an empty record)</td></tr>
41 </table>
43 </body>
44 </html>