forked from pschatzmann/arduino-stk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFileWvOut_8h_source.html
117 lines (117 loc) · 14.6 KB
/
FileWvOut_8h_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Arduino STK: FileWvOut.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Arduino STK
 <span id="projectnumber">4.6.2</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">FileWvOut.h</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#ifndef STK_FILEWVOUT_H</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="preprocessor">#define STK_FILEWVOUT_H</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>  </div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="preprocessor">#include "WvOut.h"</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="preprocessor">#include "FileWrite.h"</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>  </div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="keyword">namespace </span><a class="code" href="namespacestk.html">stk</a> {</div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>  </div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">/***************************************************/</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment">/***************************************************/</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  </div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="classstk_1_1FileWvOut.html"> 32</a></span> <span class="keyword">class </span><a class="code" href="classstk_1_1FileWvOut.html">FileWvOut</a> : <span class="keyword">public</span> <a class="code" href="classstk_1_1WvOut.html">WvOut</a></div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> {</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <span class="keyword">public</span>:</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  </div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  </div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classstk_1_1FileWvOut.html#a6f0168fca20a3c9d6d5f2baedf03ec1b"> 41</a></span>  <a class="code" href="classstk_1_1FileWvOut.html#a6f0168fca20a3c9d6d5f2baedf03ec1b">FileWvOut</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bufferFrames = 1024 );</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  </div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  </div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classstk_1_1FileWvOut.html#a1caea24a6c06ddd5f7f7876531bbd434"> 47</a></span>  <a class="code" href="classstk_1_1FileWvOut.html#a1caea24a6c06ddd5f7f7876531bbd434">FileWvOut</a>( std::string fileName,</div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels = 1,</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  FileWrite::FILE_TYPE type = <a class="code" href="classstk_1_1FileWrite.html#a800875bbcac8f137ed94f5606d55f8c6">FileWrite::FILE_WAV</a>,</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  Stk::StkFormat format = <a class="code" href="classstk_1_1Stk.html#a5a807971b7fc3c8985d97823be079a7b">STK_SINT16</a>,</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bufferFrames = 1024 );</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  </div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classstk_1_1FileWvOut.html#add13d21d51f639961977b63cb481c36e"> 54</a></span>  <span class="keyword">virtual</span> <a class="code" href="classstk_1_1FileWvOut.html#add13d21d51f639961977b63cb481c36e">~FileWvOut</a>();</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  </div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  </div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classstk_1_1FileWvOut.html#a31dde577d41a65018c3e03001de8d645"> 62</a></span>  <span class="keywordtype">void</span> <a class="code" href="classstk_1_1FileWvOut.html#a31dde577d41a65018c3e03001de8d645">openFile</a>( std::string fileName,</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nChannels,</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  FileWrite::FILE_TYPE type,</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  Stk::StkFormat format );</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  </div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  </div>
<div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="classstk_1_1FileWvOut.html#a54cbced5ce278b0d16fa800e8445103c"> 72</a></span>  <span class="keywordtype">void</span> <a class="code" href="classstk_1_1FileWvOut.html#a54cbced5ce278b0d16fa800e8445103c">closeFile</a>( <span class="keywordtype">void</span> );</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  </div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  </div>
<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="classstk_1_1FileWvOut.html#a9d3505aea3cd3c4d6822f05a2679dc41"> 78</a></span>  <span class="keywordtype">void</span> <a class="code" href="classstk_1_1FileWvOut.html#a9d3505aea3cd3c4d6822f05a2679dc41">tick</a>( <span class="keyword">const</span> StkFloat sample );</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  </div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  </div>
<div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="classstk_1_1FileWvOut.html#a417f5d967ae4dd425163d36c8563c0dc"> 87</a></span>  <span class="keywordtype">void</span> <a class="code" href="classstk_1_1FileWvOut.html#a417f5d967ae4dd425163d36c8563c0dc">tick</a>( <span class="keyword">const</span> <a class="code" href="classstk_1_1StkFrames.html">StkFrames</a>& frames );</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  </div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="keyword">protected</span>:</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  </div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keywordtype">void</span> incrementFrame( <span class="keywordtype">void</span> );</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  </div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <a class="code" href="classstk_1_1FileWrite.html">FileWrite</a> file_;</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bufferFrames_;</div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bufferIndex_;</div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> iData_;</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  </div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> };</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  </div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> } <span class="comment">// stk namespace</span></div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  </div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="preprocessor">#endif</span></div>
<div class="ttc" id="aclassstk_1_1FileWrite_html"><div class="ttname"><a href="classstk_1_1FileWrite.html">stk::FileWrite</a></div><div class="ttdoc">STK audio file output class.</div><div class="ttdef"><b>Definition:</b> FileWrite.h:32</div></div>
<div class="ttc" id="aclassstk_1_1FileWrite_html_a800875bbcac8f137ed94f5606d55f8c6"><div class="ttname"><a href="classstk_1_1FileWrite.html#a800875bbcac8f137ed94f5606d55f8c6">stk::FileWrite::FILE_WAV</a></div><div class="ttdeci">static const FILE_TYPE FILE_WAV</div><div class="ttdef"><b>Definition:</b> FileWrite.h:38</div></div>
<div class="ttc" id="aclassstk_1_1FileWvOut_html"><div class="ttname"><a href="classstk_1_1FileWvOut.html">stk::FileWvOut</a></div><div class="ttdoc">STK audio file output class.</div><div class="ttdef"><b>Definition:</b> FileWvOut.h:33</div></div>
<div class="ttc" id="aclassstk_1_1FileWvOut_html_a1caea24a6c06ddd5f7f7876531bbd434"><div class="ttname"><a href="classstk_1_1FileWvOut.html#a1caea24a6c06ddd5f7f7876531bbd434">stk::FileWvOut::FileWvOut</a></div><div class="ttdeci">FileWvOut(std::string fileName, unsigned int nChannels=1, FileWrite::FILE_TYPE type=FileWrite::FILE_WAV, Stk::StkFormat format=STK_SINT16, unsigned int bufferFrames=1024)</div><div class="ttdoc">Overloaded constructor used to specify a file name, type, and data format with this object.</div></div>
<div class="ttc" id="aclassstk_1_1FileWvOut_html_a31dde577d41a65018c3e03001de8d645"><div class="ttname"><a href="classstk_1_1FileWvOut.html#a31dde577d41a65018c3e03001de8d645">stk::FileWvOut::openFile</a></div><div class="ttdeci">void openFile(std::string fileName, unsigned int nChannels, FileWrite::FILE_TYPE type, Stk::StkFormat format)</div><div class="ttdoc">Open a new file with the specified parameters.</div></div>
<div class="ttc" id="aclassstk_1_1FileWvOut_html_a417f5d967ae4dd425163d36c8563c0dc"><div class="ttname"><a href="classstk_1_1FileWvOut.html#a417f5d967ae4dd425163d36c8563c0dc">stk::FileWvOut::tick</a></div><div class="ttdeci">void tick(const StkFrames &frames)</div><div class="ttdoc">Output the StkFrames data.</div></div>
<div class="ttc" id="aclassstk_1_1FileWvOut_html_a54cbced5ce278b0d16fa800e8445103c"><div class="ttname"><a href="classstk_1_1FileWvOut.html#a54cbced5ce278b0d16fa800e8445103c">stk::FileWvOut::closeFile</a></div><div class="ttdeci">void closeFile(void)</div><div class="ttdoc">Close a file if one is open.</div></div>
<div class="ttc" id="aclassstk_1_1FileWvOut_html_a6f0168fca20a3c9d6d5f2baedf03ec1b"><div class="ttname"><a href="classstk_1_1FileWvOut.html#a6f0168fca20a3c9d6d5f2baedf03ec1b">stk::FileWvOut::FileWvOut</a></div><div class="ttdeci">FileWvOut(unsigned int bufferFrames=1024)</div><div class="ttdoc">Default constructor with optional output buffer size argument.</div></div>
<div class="ttc" id="aclassstk_1_1FileWvOut_html_a9d3505aea3cd3c4d6822f05a2679dc41"><div class="ttname"><a href="classstk_1_1FileWvOut.html#a9d3505aea3cd3c4d6822f05a2679dc41">stk::FileWvOut::tick</a></div><div class="ttdeci">void tick(const StkFloat sample)</div><div class="ttdoc">Output a single sample to all channels in a sample frame.</div></div>
<div class="ttc" id="aclassstk_1_1FileWvOut_html_add13d21d51f639961977b63cb481c36e"><div class="ttname"><a href="classstk_1_1FileWvOut.html#add13d21d51f639961977b63cb481c36e">stk::FileWvOut::~FileWvOut</a></div><div class="ttdeci">virtual ~FileWvOut()</div><div class="ttdoc">Class destructor.</div></div>
<div class="ttc" id="aclassstk_1_1StkFrames_html"><div class="ttname"><a href="classstk_1_1StkFrames.html">stk::StkFrames</a></div><div class="ttdoc">An STK class to handle vectorized audio data.</div><div class="ttdef"><b>Definition:</b> Stk.h:287</div></div>
<div class="ttc" id="aclassstk_1_1Stk_html_a5a807971b7fc3c8985d97823be079a7b"><div class="ttname"><a href="classstk_1_1Stk.html#a5a807971b7fc3c8985d97823be079a7b">stk::Stk::STK_SINT16</a></div><div class="ttdeci">static const StkFormat STK_SINT16</div><div class="ttdef"><b>Definition:</b> Stk.h:149</div></div>
<div class="ttc" id="aclassstk_1_1WvOut_html"><div class="ttname"><a href="classstk_1_1WvOut.html">stk::WvOut</a></div><div class="ttdoc">STK audio output abstract base class.</div><div class="ttdef"><b>Definition:</b> WvOut.h:23</div></div>
<div class="ttc" id="anamespacestk_html"><div class="ttname"><a href="namespacestk.html">stk</a></div><div class="ttdoc">The STK namespace.</div><div class="ttdef"><b>Definition:</b> ADSR.h:8</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated 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
</small></address>
</body>
</html>