Skip to content

Commit ad95db0

Browse files
FLAC support
1 parent d402f38 commit ad95db0

520 files changed

Lines changed: 15661 additions & 2744 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docpages/basic-language-reference/BASIC_SOUND.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ Codecs are provided as kernel modules, just like drivers, and must be loaded bef
1818

1919
* WAV support is built in and always available.
2020
* MP3 support is available via the `mp3.ko` module (`MODLOAD "mp3"`).
21+
* FLAC support is available via the `flac.ko` module (`MODLOAD "flac"`).
2122

22-
If you try to load an MP3 file without first loading the MP3 codec module, you will receive an error as the file type will be unrecognised.
23+
If you try to load any file type except WAV without first loading the corresponding codec module, you will receive an error as the file type will be unrecognised.
2324

2425
### Streams
2526

@@ -33,7 +34,7 @@ A stream is a **playback channel** created with `STREAM CREATE`.
3334

3435
A sound is **decoded audio data** loaded into memory with `SOUND LOAD`.
3536

36-
* Sounds can be loaded from any supported codec (e.g. WAV, MP3).
37+
* Sounds can be loaded from any supported codec (e.g. WAV, MP3, FLAC).
3738
* Sounds are stored in RAM as 44.1 kHz stereo, 16-bit PCM.
3839
* Sound handles are always non-zero integer IDs.
3940
* Sounds must be freed with `SOUND UNLOAD` when no longer needed.
@@ -70,6 +71,16 @@ SOUND PLAY music, song
7071

7172
\image html mp3.png
7273

74+
### Play a FLAC file
75+
76+
```basic
77+
MODLOAD "ac97" ' load audio driver
78+
MODLOAD "flac" ' load FLAC codec module
79+
STREAM CREATE music
80+
SOUND LOAD song, "track.flac"
81+
SOUND PLAY music, song
82+
```
83+
7384
## Audio Keywords/Functions
7485

7586
* \ref STREAM "STREAM"

docs/ABS.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@
9292
<div class="textblock"><div class="fragment"><div class="line">ABS(numeric-expression)</div>
9393
</div><!-- fragment --><p>Returns the <b>absolute value</b> of a numeric expression. Negative values are converted to positive; positive values remain unchanged.</p>
9494
<hr />
95-
<h3><a class="anchor" id="autotoc_md69"></a>
95+
<h3><a class="anchor" id="autotoc_md70"></a>
9696
How to read it</h3>
9797
<ul>
9898
<li>For integers: <code>ABS(-5)</code> becomes <code>5</code>.</li>
9999
<li>For reals: <code>ABS(-3.14)</code> becomes <code>3.14</code>.</li>
100100
<li>Zero always remains <code>0</code>.</li>
101101
</ul>
102102
<hr />
103-
<h3><a class="anchor" id="autotoc_md71"></a>
103+
<h3><a class="anchor" id="autotoc_md72"></a>
104104
Examples</h3>
105105
<div class="fragment"><div class="line">PRINT ABS(-42)</div>
106106
</div><!-- fragment --><p>This example produces <code>42</code>.</p>
@@ -112,7 +112,7 @@ <h3><a class="anchor" id="autotoc_md71"></a>
112112
<div class="line"> PRINT &quot;Distance: &quot;; ABS(x)</div>
113113
<div class="line">NEXT</div>
114114
</div><!-- fragment --><hr />
115-
<h3><a class="anchor" id="autotoc_md73"></a>
115+
<h3><a class="anchor" id="autotoc_md74"></a>
116116
Notes</h3>
117117
<ul>
118118
<li>Works with both <b>integers</b> and <b>reals</b>.</li>
@@ -128,7 +128,7 @@ <h3><a class="anchor" id="autotoc_md73"></a>
128128
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
129129
<ul>
130130
<li class="navelem"><a class="el" href="index.html">index</a></li><li class="navelem"><a class="el" href="basic-ref.html">BASIC Language Reference</a></li><li class="navelem"><a class="el" href="builtin-functions.html">Built-In Functions</a></li><li class="navelem"><a class="el" href="int-funcs.html">Integer Functions</a></li>
131-
<li class="footer">Generated on Thu Sep 18 2025 21:16:10 for Retro Rocket OS by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
131+
<li class="footer">Generated on Thu Sep 18 2025 22:41:10 for Retro Rocket OS by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
132132
</ul>
133133
</div>
134134
</body>

docs/ACS.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
<div class="textblock"><div class="fragment"><div class="line">ACS(real-expression)</div>
9393
</div><!-- fragment --><p>Returns the <b>arc cosine</b> (inverse cosine) of the given expression, in <b>radians</b>. The input must be between <code>-1</code> and <code>1</code>.</p>
9494
<hr />
95-
<h3><a class="anchor" id="autotoc_md457"></a>
95+
<h3><a class="anchor" id="autotoc_md458"></a>
9696
Examples</h3>
9797
<div class="fragment"><div class="line">PRINT ACS(1)</div>
9898
</div><!-- fragment --><p>Produces <code>0</code>.</p>
@@ -105,7 +105,7 @@ <h3><a class="anchor" id="autotoc_md457"></a>
105105
<div class="line">PRINT ACS(COS(angle#))</div>
106106
</div><!-- fragment --><p>Produces the original angle (within floating point accuracy).</p>
107107
<hr />
108-
<h3><a class="anchor" id="autotoc_md459"></a>
108+
<h3><a class="anchor" id="autotoc_md460"></a>
109109
Notes</h3>
110110
<ul>
111111
<li>Argument range: <code>-1 ≤ x ≤ 1</code>. Values outside this range cause an error.</li>
@@ -126,7 +126,7 @@ <h3><a class="anchor" id="autotoc_md459"></a>
126126
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
127127
<ul>
128128
<li class="navelem"><a class="el" href="index.html">index</a></li><li class="navelem"><a class="el" href="basic-ref.html">BASIC Language Reference</a></li><li class="navelem"><a class="el" href="builtin-functions.html">Built-In Functions</a></li><li class="navelem"><a class="el" href="real-funcs.html">Real Functions</a></li>
129-
<li class="footer">Generated on Thu Sep 18 2025 21:16:10 for Retro Rocket OS by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
129+
<li class="footer">Generated on Thu Sep 18 2025 22:41:10 for Retro Rocket OS by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
130130
</ul>
131131
</div>
132132
</body>

docs/ASC.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
<div class="textblock"><div class="fragment"><div class="line">ASC(string-expression)</div>
9393
</div><!-- fragment --><p>Returns the <b>ASCII code</b> of the first character in <code>string-expression</code>.</p>
9494
<hr />
95-
<h3><a class="anchor" id="autotoc_md76"></a>
95+
<h3><a class="anchor" id="autotoc_md77"></a>
9696
Examples</h3>
9797
<div class="fragment"><div class="line">PRINT ASC(&quot;A&quot;)</div>
9898
</div><!-- fragment --><p>This example produces <code>65</code>.</p>
@@ -106,7 +106,7 @@ <h3><a class="anchor" id="autotoc_md76"></a>
106106
<div class="line"> PRINT &quot;You pressed: &quot;; code</div>
107107
<div class="line">ENDIF</div>
108108
</div><!-- fragment --><hr />
109-
<h3><a class="anchor" id="autotoc_md78"></a>
109+
<h3><a class="anchor" id="autotoc_md79"></a>
110110
Notes</h3>
111111
<ul>
112112
<li>Only the <b>first character</b> of the string is considered.</li>
@@ -122,7 +122,7 @@ <h3><a class="anchor" id="autotoc_md78"></a>
122122
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
123123
<ul>
124124
<li class="navelem"><a class="el" href="index.html">index</a></li><li class="navelem"><a class="el" href="basic-ref.html">BASIC Language Reference</a></li><li class="navelem"><a class="el" href="builtin-functions.html">Built-In Functions</a></li><li class="navelem"><a class="el" href="int-funcs.html">Integer Functions</a></li>
125-
<li class="footer">Generated on Thu Sep 18 2025 21:16:10 for Retro Rocket OS by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
125+
<li class="footer">Generated on Thu Sep 18 2025 22:41:10 for Retro Rocket OS by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
126126
</ul>
127127
</div>
128128
</body>

docs/ASN.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
<div class="textblock"><div class="fragment"><div class="line">ASN(real-expression)</div>
9393
</div><!-- fragment --><p>Returns the <b>arc sine</b> (inverse sine) of the given expression, in <b>radians</b>. The input must be between <code>-1</code> and <code>1</code>.</p>
9494
<hr />
95-
<h3><a class="anchor" id="autotoc_md462"></a>
95+
<h3><a class="anchor" id="autotoc_md463"></a>
9696
Examples</h3>
9797
<div class="fragment"><div class="line">PRINT ASN(0)</div>
9898
</div><!-- fragment --><p>Produces <code>0</code>.</p>
@@ -105,7 +105,7 @@ <h3><a class="anchor" id="autotoc_md462"></a>
105105
<div class="line">PRINT ASN(SIN(angle#))</div>
106106
</div><!-- fragment --><p>Produces the original angle (within floating point accuracy).</p>
107107
<hr />
108-
<h3><a class="anchor" id="autotoc_md464"></a>
108+
<h3><a class="anchor" id="autotoc_md465"></a>
109109
Notes</h3>
110110
<ul>
111111
<li>Argument range: <code>-1 ≤ x ≤ 1</code>. Values outside this range cause an error.</li>
@@ -126,7 +126,7 @@ <h3><a class="anchor" id="autotoc_md464"></a>
126126
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
127127
<ul>
128128
<li class="navelem"><a class="el" href="index.html">index</a></li><li class="navelem"><a class="el" href="basic-ref.html">BASIC Language Reference</a></li><li class="navelem"><a class="el" href="builtin-functions.html">Built-In Functions</a></li><li class="navelem"><a class="el" href="real-funcs.html">Real Functions</a></li>
129-
<li class="footer">Generated on Thu Sep 18 2025 21:16:10 for Retro Rocket OS by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
129+
<li class="footer">Generated on Thu Sep 18 2025 22:41:10 for Retro Rocket OS by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
130130
</ul>
131131
</div>
132132
</body>

docs/ATAN.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
</div><!-- fragment --><p>Returns the <b>arc tangent</b> (inverse tangent) of the given expression, in <b>radians</b>.</p>
9494
<p>The result will always lie between <code>-PI#/2</code> and <code>PI#/2</code>.</p>
9595
<hr />
96-
<h3><a class="anchor" id="autotoc_md467"></a>
96+
<h3><a class="anchor" id="autotoc_md468"></a>
9797
Examples</h3>
9898
<div class="fragment"><div class="line">PRINT ATAN(0)</div>
9999
</div><!-- fragment --><p>Produces <code>0</code>.</p>
@@ -106,7 +106,7 @@ <h3><a class="anchor" id="autotoc_md467"></a>
106106
<div class="line">PRINT ATAN(TAN(angle#))</div>
107107
</div><!-- fragment --><p>Produces the original angle (within floating point accuracy).</p>
108108
<hr />
109-
<h3><a class="anchor" id="autotoc_md469"></a>
109+
<h3><a class="anchor" id="autotoc_md470"></a>
110110
Notes</h3>
111111
<ul>
112112
<li>Input range: any real number is valid.</li>
@@ -123,7 +123,7 @@ <h3><a class="anchor" id="autotoc_md469"></a>
123123
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
124124
<ul>
125125
<li class="navelem"><a class="el" href="index.html">index</a></li><li class="navelem"><a class="el" href="basic-ref.html">BASIC Language Reference</a></li><li class="navelem"><a class="el" href="builtin-functions.html">Built-In Functions</a></li><li class="navelem"><a class="el" href="real-funcs.html">Real Functions</a></li>
126-
<li class="footer">Generated on Thu Sep 18 2025 21:16:10 for Retro Rocket OS by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
126+
<li class="footer">Generated on Thu Sep 18 2025 22:41:10 for Retro Rocket OS by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
127127
</ul>
128128
</div>
129129
</body>

docs/ATAN2.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
<div class="textblock"><div class="fragment"><div class="line">ATAN2(real-y, real-x)</div>
9393
</div><!-- fragment --><p>Returns the <b>arc tangent of y ÷ x</b>, using the signs of both arguments to determine the correct <b>quadrant</b> of the angle. The result is given in <b>radians</b>, in the range <code>-PI#</code> to <code>PI#</code>.</p>
9494
<hr />
95-
<h3><a class="anchor" id="autotoc_md472"></a>
95+
<h3><a class="anchor" id="autotoc_md473"></a>
9696
Examples</h3>
9797
<div class="fragment"><div class="line">PRINT ATAN2(1, 1)</div>
9898
</div><!-- fragment --><p>Produces approximately <code>0.785398</code> (π/4).</p>
@@ -108,7 +108,7 @@ <h3><a class="anchor" id="autotoc_md472"></a>
108108
<div class="line">angle# = ATAN2(dy#, dx#)</div>
109109
<div class="line">PRINT &quot;Angle = &quot;; angle#; &quot; radians&quot;</div>
110110
</div><!-- fragment --><hr />
111-
<h3><a class="anchor" id="autotoc_md474"></a>
111+
<h3><a class="anchor" id="autotoc_md475"></a>
112112
Notes</h3>
113113
<ul>
114114
<li>Unlike <a class="el" href="ATAN.html">ATAN</a>, which only returns results in <code>-π/2 … π/2</code>, <code>ATAN2</code> resolves the full circle by considering both <code>x</code> and <code>y</code> signs.</li>
@@ -125,7 +125,7 @@ <h3><a class="anchor" id="autotoc_md474"></a>
125125
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
126126
<ul>
127127
<li class="navelem"><a class="el" href="index.html">index</a></li><li class="navelem"><a class="el" href="basic-ref.html">BASIC Language Reference</a></li><li class="navelem"><a class="el" href="builtin-functions.html">Built-In Functions</a></li><li class="navelem"><a class="el" href="real-funcs.html">Real Functions</a></li>
128-
<li class="footer">Generated on Thu Sep 18 2025 21:16:10 for Retro Rocket OS by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
128+
<li class="footer">Generated on Thu Sep 18 2025 22:41:10 for Retro Rocket OS by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
129129
</ul>
130130
</div>
131131
</body>

docs/AUTOFLIP.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
103103
<ul>
104104
<li class="navelem"><a class="el" href="index.html">index</a></li><li class="navelem"><a class="el" href="basic-ref.html">BASIC Language Reference</a></li><li class="navelem"><a class="el" href="keywords.html">Keywords</a></li>
105-
<li class="footer">Generated on Thu Sep 18 2025 21:16:11 for Retro Rocket OS by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
105+
<li class="footer">Generated on Thu Sep 18 2025 22:41:11 for Retro Rocket OS by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
106106
</ul>
107107
</div>
108108
</body>

docs/BACKGROUND.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ <h5>Notes</h5>
157157
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
158158
<ul>
159159
<li class="navelem"><a class="el" href="index.html">index</a></li><li class="navelem"><a class="el" href="basic-ref.html">BASIC Language Reference</a></li><li class="navelem"><a class="el" href="keywords.html">Keywords</a></li>
160-
<li class="footer">Generated on Thu Sep 18 2025 21:16:11 for Retro Rocket OS by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
160+
<li class="footer">Generated on Thu Sep 18 2025 22:41:11 for Retro Rocket OS by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
161161
</ul>
162162
</div>
163163
</body>

docs/BINREAD.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
<li><code>integer-length</code> — number of bytes to read.</li>
9898
</ul>
9999
<hr />
100-
<h3><a class="anchor" id="autotoc_md720"></a>
100+
<h3><a class="anchor" id="autotoc_md721"></a>
101101
Examples</h3>
102102
<div class="fragment"><div class="line">fh = OPENIN(&quot;asset.bin&quot;)</div>
103103
<div class="line">size = FILESIZE(&quot;asset.bin&quot;)</div>
@@ -109,7 +109,7 @@ <h3><a class="anchor" id="autotoc_md720"></a>
109109
<div class="line">MEMRELEASE buf</div>
110110
<div class="line">CLOSE fh</div>
111111
</div><!-- fragment --><hr />
112-
<h3><a class="anchor" id="autotoc_md722"></a>
112+
<h3><a class="anchor" id="autotoc_md723"></a>
113113
Notes</h3>
114114
<ul>
115115
<li>Use <a class="el" href="FILESIZE.html">FILESIZE</a> to size your buffer appropriately.</li>
@@ -125,7 +125,7 @@ <h3><a class="anchor" id="autotoc_md722"></a>
125125
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
126126
<ul>
127127
<li class="navelem"><a class="el" href="index.html">index</a></li><li class="navelem"><a class="el" href="basic-ref.html">BASIC Language Reference</a></li><li class="navelem"><a class="el" href="keywords.html">Keywords</a></li>
128-
<li class="footer">Generated on Thu Sep 18 2025 21:16:11 for Retro Rocket OS by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
128+
<li class="footer">Generated on Thu Sep 18 2025 22:41:11 for Retro Rocket OS by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
129129
</ul>
130130
</div>
131131
</body>

0 commit comments

Comments
 (0)