亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? record_8c.html

?? MP3播放器源代碼, VS1003B
?? HTML
?? 第 1 頁 / 共 3 頁
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>VLSI Solution Oy Evaluation MP3 Player Source Code Documentation</title><link href="doxygen.css" rel="stylesheet" type="text/css"><img src="vlsi_small.gif" hspace="20" bordercolor="#ffffff"  alt="VLSI Solution Oy"><b>VLSI Solution Oy Evaluation MP3 Player Source Code Documentation</b><p></p></head><body><!-- Generated by Doxygen 1.3.7 --><div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div><h1>record.c File Reference</h1>ADPCM Recording.  <a href="#_details">More...</a><p><code>#include "<a class="el" href="record_8h-source.html">record.h</a>"</code><br><code>#include "<a class="el" href="filesys_8h-source.html">filesys.h</a>"</code><br><code>#include "<a class="el" href="storage_8h-source.html">storage.h</a>"</code><br><code>#include "<a class="el" href="vs10xx_8h-source.html">vs10xx.h</a>"</code><br><code>#include "console.h"</code><br><code>#include "<a class="el" href="ui_8h-source.html">ui.h</a>"</code><br><code>#include "<a class="el" href="display_8h-source.html">display.h</a>"</code><br><p>Include dependency graph for record.c:<p><center><img src="record_8c__incl.png" border="0" usemap="#record.c_map" alt="Include dependency graph"></center><map name="record.c_map"><area href="record_8h.html" shape="rect" coords="6,93,60,117" alt=""><area href="filesys_8h.html" shape="rect" coords="84,93,140,117" alt=""><area href="buffer_8h.html" shape="rect" coords="88,18,136,42" alt=""><area href="board_8h.html" shape="rect" coords="164,18,214,42" alt=""><area href="vs10xx_8h.html" shape="rect" coords="164,93,222,117" alt=""><area href="storage_8h.html" shape="rect" coords="246,93,308,117" alt=""><area href="ui_8h.html" shape="rect" coords="420,93,457,117" alt=""><area href="display_8h.html" shape="rect" coords="481,93,540,117" alt=""></map><p><a href="record_8c-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>unsigned char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="record_8c.html#a3">Record</a> ()</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Record ADPCM.  <a href="#a3"></a><br><br></td></tr><tr><td colspan=2><br><h2>Variables</h2></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>xdata unsigned char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="record_8c.html#a0">SPMax</a></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>code const unsigned char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="record_8c.html#a1">RIFFHeader0</a> []</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">first part of RIFF Header, insert 444 zeroes after this  <a href="#a1"></a><br><br></td></tr><tr><td class="memItemLeft" nowrap align=right valign=top>code const unsigned char&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="record_8c.html#a2">RIFFHeader504</a> []</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">second part of RIFF Header, bytes 504...511  <a href="#a2"></a><br><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>ADPCM Recording. <p><p>Definition in file <a class="el" href="record_8c-source.html">record.c</a>.<hr><h2>Function Documentation</h2><a class="anchor" name="a3" doxytag="record.c::Record" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> unsigned char Record           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Record ADPCM. <p>Recording is probably the least straightforward task with vs10xx, though it's not difficult! The main tasks are:<ul><li>prepare storage space to save recording</li><li>write a strictly special kind of RIFF header to start of file <dl compact><dt><b>Warning:</b></dt><dd>the RIFF header must be of the kind stated in datasheet!</dd></dl></li><li>set sampling speed (Clk/256 divider at SPI_AICTRL0)<ul><li>divider 4 is minimum, giving:<ul><li>24kHz @ 24.576MHz</li><li>42kHz with VS1003, 12.288Mhz xtal, clock multiplier 3.5</li></ul></li><li>divider 12 gives 8kHz @ 24.576Mhz</li><li>remember to put the correct sample rate in the RIFF header too!</li></ul></li><li>set recording level (gain at SPI_AICTRL1)<ul><li>this is digital gain, depends on mic signal level<ul><li>mic/line input impedance is 100 kilo-ohms</li><li>for VS1002, 100...150mVpp signal level gives best resolution</li><li>for VS1003, 50...100mVpp is best for mic, 2Vpp for line in</li></ul></li><li>0x1000 is a good first guess for the gain value</li><li>value 0 sets autogain</li></ul></li><li>SPI_VOLUME register controls the loopback volume to earphones</li><li>reset vs10xx with ADPCM recording mode bit SM_ADPCM (SPI_MODE.12) set<ul><li>for vs1003, to select line in instead of mic, set SPI_MODE.14</li></ul></li><li>monitor ADPCM_DATA_AVAILABLE level in SPI_HDAT1</li><li>when data is available, read it into a disksector buffer<ul><li>data is provided in 256-byte (128-word) blocks<ul><li>overfilling buffer resets and aligns automatically to block boundary</li><li>the fourth byte in a block is always 0x00.</li><li>check big-endianness / little-endianness for your processor</li></ul></li></ul></li><li>Be relaxed with your timing when reading the SCI registers, give VS10xx a few microseconds time to update the register value after each read. You might need to slower your SPI clock slightly since VS10xx can accept SCI data at slightly faster rate than it is able to provide it.</li><li>save disksector buffers to disk</li><li>at end of recording, set SM_OUT_OF_WAV / do a reset of vs10xx</li><li>insert correct length information in the RIFF HEADER</li><li>finalize diskfile (write FAT records and dir entry)</li></ul><p><dl compact><dt><b>Remarks:</b></dt><dd>in this test version, recording more is entered by pressing the LEFT button while booting and then releasing it after "Filesys OK" message<p>this version can only record continuous fragments, If a fragment boundary is reached, recording will stop. The main player loop is constructed so that in this situation record() is called again to continue recording to a new file.<p>Most MMC handling issues (bugs) seem to be corrected now but the filesystem code might still overwrite files or corrupt FAT tables in some type of MMC card. You are warned, this is beta quality software :)</dd></dl><p><dl compact><dt><b><a class="el" href="todo.html#_todo000003">Todo:</a></b></dt><dd>VS1002 recording: only new sample rate values need to be calculated. </dd></dl><p>This recording function can only save data into a continuous area on disk. The Fragment Table fragment[] is used in a special way for recording (to save microcontroller RAM space). fragment[0].start is the first disk sector of the file fragment[0].length will contain the number of disk sectors for the file.<p><dl compact><dt><b><a class="el" href="bug.html#_bug000001">Bug:</a></b></dt><dd>In case of fragmented filesystem, this version will not function properly. </dd></dl><p>The RIFF header is constructed in a special way (to make life a bit easier). The most proper way to do it would be to take the header "as is" from the datasheet. But to make life a bit easier, the header here is extended to be 512 bytes (a disk sector) long by adding zeroes to the 'fact' chunk. 'junk' chunks should not be used.<p>The preliminary header is written to disk prior to recording (to give some chances of recovering track in case of battery failure etc). It has a ridiculously long track length. After recording, the header must be rewritten with correct track length.<p><dl compact><dt><b><a class="el" href="todo.html#_todo000004">Todo:</a></b></dt><dd>second FAT table update</dd></dl><p>Definition at line <a class="el" href="record_8c-source.html#l00101">101</a> of file <a class="el" href="record_8c-source.html">record.c</a>.<p>References <a class="el" href="player_8c-source.html#l00332">AvailableProcessorTime()</a>, <a class="el" href="unionTemp.html#o7">Temp::b</a>, <a class="el" href="buffer_8h-source.html#l00107">DiskBlock::Raw::buf</a>, <a class="el" href="board_8h-source.html#l00253">Temp::c</a>, <a class="el" href="buffer_8c-source.html#l00013">dataBufPtr</a>, <a class="el" href="board_8c-source.html#l00036">Delay()</a>, <a class="el" href="buffer_8c-source.html#l00010">diskSect</a>, <a class="el" href="display_8c-source.html#l00015">displayValue</a>, <a class="el" href="display_8h-source.html#l00008">DS_STATIC</a>, <a class="el" href="filesys_8c-source.html#l00032">fatSectorsPerCluster</a>, <a class="el" href="filesys_8c.html#a6">fragment</a>, <a class="el" href="filesys_8c-source.html#l00062">freeSector</a>, <a class="el" href="board_8h-source.html#l00081">GREEN_LED</a>, <a class="el" href="board_8h-source.html#l00254">Temp::i</a>, <a class="el" href="display_8c-source.html#l00023">InitDisplay()</a>, <a class="el" href="board_8h-source.html#l00095">KEY_BUTTON</a>, <a class="el" href="buffer_8h-source.html#l00129">Address::l</a>, <a class="el" href="board_8h-source.html#l00255">Temp::l</a>, <a class="el" href="board_8h-source.html#l00087">LED_OFF</a>, <a class="el" href="board_8h-source.html#l00084">LED_ON</a>, <a class="el" href="filesys_8h-source.html#l00027">fragmentEntry::length</a>, <a class="el" href="board_8h-source.html#l00052">Mp3DeselectControl</a>, <a class="el" href="vs10xx_8c-source.html#l00017">Mp3ReadRegister()</a>, <a class="el" href="vs10xx_8c-source.html#l00069">Mp3Reset()</a>, <a class="el" href="vs10xx_8h-source.html#l00068">Mp3WriteRegister</a>, <a class="el" href="player_8c-source.html#l00226">playingState</a>, <a class="el" href="ui_8h.html#a25a14">PS_NEXT_SONG</a>, <a class="el" href="ui_8h.html#a25a23">PS_RECORDING</a>, <a class="el" href="unionDiskBlock.html#o1">DiskBlock::raw</a>, <a class="el" href="storage_8c-source.html#l00110">ReadDiskSector()</a>, <a class="el" href="record_8c-source.html#l00015">RIFFHeader0</a>, <a class="el" href="record_8c-source.html#l00038">RIFFHeader504</a>, <a class="el" href="filesys_8c-source.html#l00248">ScanForFreeSector()</a>, <a class="el" href="buffer_8c-source.html#l00015">sectorAddress</a>, <a class="el" href="vs10xx_8h-source.html#l00031">SPI_AICTRL0</a>, <a class="el" href="vs10xx_8h-source.html#l00032">SPI_AICTRL1</a>, <a class="el" href="vs10xx_8h-source.html#l00022">SPI_CLOCKF</a>, <a class="el" href="vs10xx_8h-source.html#l00023">SPI_DECODE_TIME</a>, <a class="el" href="vs10xx_8h-source.html#l00027">SPI_HDAT0</a>, <a class="el" href="vs10xx_8h-source.html#l00028">SPI_HDAT1</a>, <a class="el" href="vs10xx_8h-source.html#l00019">SPI_MODE</a>, <a class="el" href="filesys_8h-source.html#l00026">fragmentEntry::start</a>, <a class="el" href="board_8c.html#a0">temp</a>, <a class="el" href="ui_8h.html#a24a2">UI_TITLE</a>, <a class="el" href="player_8c-source.html#l00236">uiMode</a>, <a class="el" href="filesys_8c-source.html#l00129">WriteClusterChain()</a>, and <a class="el" href="storage_8c-source.html#l00183">WriteDiskSector()</a>.<p>Referenced by <a class="el" href="player_8c-source.html#l00765">main()</a>.<p><pre class="fragment"><div>00101                       {00102 00103   xdata <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> blockNumber;00104   xdata <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> sectorCount;00105   xdata <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> lastSector;00106   bit stopRecording = 0;00107   bit continueRecording = 0;00108 00109   <span class="keywordtype">char</span> oldlevel=0;00110   blockNumber = 0;00111   sectorCount = 1;00112 00113   <a class="code" href="player_8c.html#a3">playingState</a> = <a class="code" href="ui_8h.html#a25a23">PS_RECORDING</a>; <span class="comment">//Inform the world that rec mode is on.</span>00114 00115   <span class="comment">// Kick vs10xx into action!</span>00116 00117   <span class="comment">/* Set clock register, doubler etc. */</span>00118 <span class="preprocessor">#ifdef VS1003</span>00119 <span class="preprocessor"></span>  <span class="comment">// Set base xtal 14.7456MHZ (0x0696) | multiplier:fixed 2.5 (0x600)</span>00120   <a class="code" href="vs10xx_8h.html#a32">Mp3WriteRegister</a>(SPI_CLOCKF,0x66,0x96); 00121 <span class="preprocessor">#else</span>00122 <span class="preprocessor"></span>  <a class="code" href="vs10xx_8h.html#a32">Mp3WriteRegister</a>(SPI_CLOCKF,156,204); <span class="comment">//for 14.576MHz XTAL</span>00123 <span class="preprocessor">#endif</span>00124 <span class="preprocessor"></span>  00125   <span class="comment">//Set sample rate 16khz for VS1003 (6.4kHz for VS1002 :( )</span>00126   <a class="code" href="vs10xx_8h.html#a32">Mp3WriteRegister</a>(SPI_AICTRL0,0x00,0x09); <span class="comment">//Set sample rate divider=9</span>00127   <a class="code" href="vs10xx_8h.html#a32">Mp3WriteRegister</a>(SPI_AICTRL1,0x10,0x00); <span class="comment">//AutoGain OFF, reclevel 0x1000</span>00128   <a class="code" href="vs10xx_8h.html#a32">Mp3WriteRegister</a>(SPI_MODE,0x18,0x04);    <span class="comment">//RECORD,NEWMODE,RESET</span>00129   <a class="code" href="board_8h.html#a51">Delay</a>(10);00130 00131   <span class="comment">/* Set clock register, doubler etc. */</span>00132 <span class="preprocessor">#ifdef VS1003</span>00133 <span class="preprocessor"></span>  <span class="comment">// Set base xtal 14.7456MHZ (0x0696) | multiplier:fixed 2.5 (0x600)</span>00134   <a class="code" href="vs10xx_8h.html#a32">Mp3WriteRegister</a>(SPI_CLOCKF,0x66,0x96); 00135 <span class="preprocessor">#else</span>00136 <span class="preprocessor"></span>  <a class="code" href="vs10xx_8h.html#a32">Mp3WriteRegister</a>(SPI_CLOCKF,156,204); <span class="comment">//for 14.576MHz XTAL</span>00137 <span class="preprocessor">#endif</span>00138 <span class="preprocessor"></span> 

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产乱码久久久久久老虎| 色综合久久久久久久| 亚洲精品一区二区精华| 国产在线不卡一卡二卡三卡四卡| 精品成人一区二区三区| 丁香啪啪综合成人亚洲小说| 1区2区3区欧美| 欧美在线free| 麻豆成人久久精品二区三区红| 2021中文字幕一区亚洲| av午夜一区麻豆| 亚洲国产精品久久一线不卡| 欧美一区二区三区四区五区| 国产精品综合一区二区| 一区二区三区.www| 欧美成人一区二区| 99国产麻豆精品| 日本不卡中文字幕| 久久精品亚洲精品国产欧美 | 中文字幕乱码日本亚洲一区二区| 成人少妇影院yyyy| 性欧美疯狂xxxxbbbb| 久久久亚洲欧洲日产国码αv| 91在线观看一区二区| 日韩在线一区二区| 国产精品午夜免费| 欧美日韩国产一级片| 国产成人aaa| 午夜久久电影网| 欧美国产禁国产网站cc| 欧美日韩一区二区欧美激情| 国产精品91一区二区| 亚洲线精品一区二区三区| 精品久久一二三区| 欧美在线免费观看亚洲| 国产高清成人在线| 青娱乐精品视频| 亚洲天堂久久久久久久| 欧美变态凌虐bdsm| 欧美色偷偷大香| 成人国产在线观看| 六月婷婷色综合| 亚洲二区在线视频| 中文字幕第一区综合| 日韩欧美第一区| 欧美三区免费完整视频在线观看| 国产寡妇亲子伦一区二区| 日本美女一区二区三区| 一个色在线综合| 中文字幕一区二区三中文字幕| 日韩三级电影网址| 欧美顶级少妇做爰| 欧美伊人久久久久久久久影院 | 亚洲国产精品久久久久婷婷884| 精品久久99ma| 6080国产精品一区二区| 色8久久人人97超碰香蕉987| av动漫一区二区| 丰满少妇在线播放bd日韩电影| 美女任你摸久久| 日韩黄色在线观看| 亚洲一级在线观看| 亚洲欧美视频在线观看视频| 国产精品久久久久久亚洲伦 | 国产精品对白交换视频| 久久综合999| 欧美大胆人体bbbb| 欧美一区二区三区在线电影| 欧美电影在线免费观看| 欧美日韩一卡二卡三卡| 欧美日韩国产精品成人| 欧美性欧美巨大黑白大战| 欧洲视频一区二区| 日本韩国欧美一区二区三区| 9l国产精品久久久久麻豆| 福利一区在线观看| 国产精品77777竹菊影视小说| 国产一区二区三区黄视频 | 日韩精品一区第一页| 偷拍与自拍一区| 偷窥国产亚洲免费视频| 日韩精彩视频在线观看| 美女高潮久久久| 国产麻豆视频一区| 不卡av免费在线观看| 91麻豆国产福利精品| 91黄色免费看| 7777精品伊人久久久大香线蕉的 | 精品在线免费观看| 国产精品一区二区你懂的| 国产精品一区二区三区网站| 成人高清视频免费观看| 一本到高清视频免费精品| 欧美吻胸吃奶大尺度电影| 欧美日韩的一区二区| 这里只有精品99re| 久久网站最新地址| 亚洲欧美综合色| 亚洲国产视频一区二区| 免费看黄色91| 成人精品视频网站| 欧美午夜在线观看| 日韩视频免费观看高清完整版在线观看| 精品播放一区二区| 成人欧美一区二区三区| 日本伊人午夜精品| 成人晚上爱看视频| 欧美美女黄视频| 国产欧美精品一区二区色综合| 亚洲乱码日产精品bd| 美国毛片一区二区| 成人污污视频在线观看| 91麻豆精品国产自产在线| 国产日韩欧美电影| 亚洲成a人片在线不卡一二三区 | 亚洲裸体xxx| 日韩不卡免费视频| 成人avav在线| 制服丝袜激情欧洲亚洲| 国产精品美女久久久久久久久| 午夜精品福利一区二区三区av| 国产一区二区三区美女| 欧美色电影在线| 国产清纯在线一区二区www| 亚洲综合精品久久| 国产精品影音先锋| 欧美精品一二三| 亚洲私人黄色宅男| 极品少妇xxxx偷拍精品少妇| 一本大道久久a久久精二百| 欧美不卡一区二区| 午夜不卡av免费| 成人免费视频一区| 精品欧美一区二区三区精品久久 | 麻豆国产精品官网| 在线观看日产精品| 久久精品一区二区三区不卡| 强制捆绑调教一区二区| 色综合久久久久| 国产欧美日韩久久| 看国产成人h片视频| 欧美视频第二页| 亚洲欧美一区二区不卡| 国产一区二区福利视频| 日韩一区二区高清| 亚洲综合成人网| 91在线观看下载| 欧美国产成人精品| 久草精品在线观看| 在线播放国产精品二区一二区四区| 中文字幕综合网| 99久久精品一区二区| 国产日韩欧美a| 国产精品中文字幕一区二区三区| 制服丝袜亚洲播放| 日日夜夜一区二区| 欧美日韩不卡在线| 亚洲午夜免费视频| 在线观看91精品国产入口| 亚洲日本免费电影| 99久久精品国产毛片| 亚洲视频一二三区| 色妹子一区二区| 亚洲欧洲中文日韩久久av乱码| av在线不卡观看免费观看| 国产精品婷婷午夜在线观看| 国产激情视频一区二区三区欧美| 精品国产91亚洲一区二区三区婷婷| 免费看欧美女人艹b| 日韩欧美123| 国产精品中文欧美| 日本一区二区综合亚洲| 岛国一区二区三区| 亚洲天堂免费在线观看视频| 91久久一区二区| 亚洲一区二区五区| 777精品伊人久久久久大香线蕉| 日本亚洲免费观看| 2021中文字幕一区亚洲| 成人黄色av网站在线| 洋洋av久久久久久久一区| 欧美三级电影精品| 麻豆成人在线观看| 国产亚洲精品aa| 色综合中文字幕国产| 亚洲激情在线播放| 9191成人精品久久| 国产自产2019最新不卡| 国产精品第五页| 欧美少妇bbb| 国产在线精品一区二区| 中文字幕一区二区三区四区| 在线观看日韩毛片| 麻豆成人久久精品二区三区红 | 国产一区二区三区在线观看精品| 欧美国产丝袜视频| 欧美无人高清视频在线观看| 国内精品不卡在线| 亚洲精品福利视频网站| 日韩免费观看高清完整版在线观看|