You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
OpenAudio_ArduinoLibrary/docs/audio_html/AudioPlaySerialflashRaw.html

62 lines
2.5 KiB

<script type="text/x-red" data-help-name="AudioPlaySerialflashRaw">
<h3>Summary</h3>
<div class=tooltipinfo>
<p>Play a RAW data file, stored on a Serial Flash chip. These chips
are far more efficient than SD cards, allowing many files to be
played simultaneously by copies of this object.
</p>
<p align=center><img src="img/w25q128fv.jpg"><br><small>W25Q128FV Serial Flash</small></p>
</div>
<h3>Audio Connections</h3>
<table class=doc align=center cellpadding=3>
<tr class=top><th>Port</th><th>Purpose</th></tr>
<tr class=odd><td align=center>Out 0</td><td>Sound Output</td></tr>
</table>
<h3>Functions</h3>
<p class=func><span class=keyword>play</span>(filename);</p>
<p class=desc>Begin playing a RAW data file. If a file is already playing,
it is stopped and this file starts playing from the beginning.
</p>
<p class=func><span class=keyword>stop</span>();</p>
<p class=desc>Stop playing. If not playing, this function has no effect.
</p>
<p class=func><span class=keyword>isPlaying</span>();</p>
<p class=desc>Return true (non-zero) if playing, or false (zero)
when not playing.
</p>
<p class=func><span class=keyword>positionMillis</span>();</p>
<p class=desc>While playing, return the current time offset, in
milliseconds. When not playing, the return from this function
is undefined.
</p>
<p class=func><span class=keyword>lengthMillis</span>();</p>
<p class=desc>Return the total length of the current sound clip,
in milliseconds. When not playing, the return from this function
is undefined.
</p>
<h3>Examples</h3>
<!--
<p class=exam>File &gt; Examples &gt; Audio &gt; Recorder
-->
<p class=exam>TODO: play example needed....
</p>
<p class=exam>File &gt; Examples &gt; SerialFlash &gt; CopyFromSD
</p>
<h3>Notes</h3>
<p>The data file must be RAW 16 bit signed integers in LSB-first format.
</p>
<p>The <a href="https://github.com/PaulStoffregen/SerialFlash" target="_blank">SerialFlash library</a>
is used to access the flash chip. You can also use SerialFlash's functions
to access the stored files, or add data to the flash chip.
</p>
<p>File names are case sensitive with SerialFlash. If your sound does
not play, use <b>File &gt; Examples &gt; SerialFlash &gt; ListFiles</b> to
check the exact file names stored in the flash memory chip.
</script>
<script type="text/x-red" data-template-name="AudioPlaySerialflashRaw">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>