<!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.8.15"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>Audaspace: fx/ConvolverSound.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="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.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">Audaspace  <span id="projectnumber">1.3.0</span> </div> <div id="projectbrief">A high level audio library.</div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.15 --> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ var searchBox = new SearchBox("searchBox", "search",false,'Search'); /* @license-end */ </script> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('',true,false,'search.php','Search'); $(document).ready(function() { init_search(); }); }); /* @license-end */</script> <div id="main-nav"></div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="dir_49abe4789985cc6a85622e26efb335d2.html">fx</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="headertitle"> <div class="title">ConvolverSound.h</div> </div> </div><!--header--> <div class="contents"> <a href="ConvolverSound_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*******************************************************************************</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">* Copyright 2015-2016 Juan Francisco Crespo Galán</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">*</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">* Licensed under the Apache License, Version 2.0 (the "License");</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">* you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">* You may obtain a copy of the License at</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">*</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">* http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">*</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">* Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">* distributed under the License is distributed on an "AS IS" BASIS,</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment">* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment">* See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">* limitations under the License.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment">******************************************************************************/</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> </div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> </div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include "<a class="code" href="ISound_8h.html">ISound.h</a>"</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include "<a class="code" href="ImpulseResponse_8h.html">ImpulseResponse.h</a>"</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include "<a class="code" href="ThreadPool_8h.html">util/ThreadPool.h</a>"</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include "<a class="code" href="FFTPlan_8h.html">util/FFTPlan.h</a>"</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> </div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include <memory></span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include <vector></span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <a class="code" href="Audaspace_8h.html#acd7584504197a1397aaf57af797e1813">AUD_NAMESPACE_BEGIN</a></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="classConvolverSound.html"> 38</a></span> <span class="keyword">class </span><a class="code" href="Audaspace_8h.html#ad9080e3b9907fa3d0f5df561c65aa098">AUD_API</a> <a class="code" href="classConvolverSound.html">ConvolverSound</a> : <span class="keyword">public</span> <a class="code" href="classISound.html">ISound</a></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> {</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">private</span>:</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  std::shared_ptr<ISound> m_sound;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  std::shared_ptr<ImpulseResponse> m_impulseResponse;</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> </div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  std::shared_ptr<ThreadPool> m_threadPool;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  std::shared_ptr<FFTPlan> m_plan;</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> </div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="comment">// delete copy constructor and operator=</span></div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <a class="code" href="classConvolverSound.html">ConvolverSound</a>(<span class="keyword">const</span> <a class="code" href="classConvolverSound.html">ConvolverSound</a>&) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <a class="code" href="classConvolverSound.html">ConvolverSound</a>& operator=(<span class="keyword">const</span> <a class="code" href="classConvolverSound.html">ConvolverSound</a>&) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> </div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <a class="code" href="classConvolverSound.html">ConvolverSound</a>(std::shared_ptr<ISound> sound, std::shared_ptr<ImpulseResponse> impulseResponse, std::shared_ptr<ThreadPool> threadPool, std::shared_ptr<FFTPlan> plan);</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> </div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <a class="code" href="classConvolverSound.html">ConvolverSound</a>(std::shared_ptr<ISound> sound, std::shared_ptr<ImpulseResponse> impulseResponse, std::shared_ptr<ThreadPool> threadPool);</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> </div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <span class="keyword">virtual</span> std::shared_ptr<IReader> <a class="code" href="classISound.html#a194d09ea3b22f1cb0a49b89cfcf02d63">createReader</a>();</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span> </div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  std::shared_ptr<ImpulseResponse> getImpulseResponse();</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span> </div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="keywordtype">void</span> setImpulseResponse(std::shared_ptr<ImpulseResponse> impulseResponse);</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> <a class="code" href="Audaspace_8h.html#a4cf7088a9bb0256563f28fd13c80b066">AUD_NAMESPACE_END</a></div><div class="ttc" id="Audaspace_8h_html_acd7584504197a1397aaf57af797e1813"><div class="ttname"><a href="Audaspace_8h.html#acd7584504197a1397aaf57af797e1813">AUD_NAMESPACE_BEGIN</a></div><div class="ttdeci">#define AUD_NAMESPACE_BEGIN</div><div class="ttdoc">Opens the audaspace namespace aud.</div><div class="ttdef"><b>Definition:</b> Audaspace.h:116</div></div> <div class="ttc" id="ThreadPool_8h_html"><div class="ttname"><a href="ThreadPool_8h.html">ThreadPool.h</a></div><div class="ttdoc">The ThreadPool class.</div></div> <div class="ttc" id="ISound_8h_html"><div class="ttname"><a href="ISound_8h.html">ISound.h</a></div><div class="ttdoc">The ISound interface.</div></div> <div class="ttc" id="Audaspace_8h_html_ad9080e3b9907fa3d0f5df561c65aa098"><div class="ttname"><a href="Audaspace_8h.html#ad9080e3b9907fa3d0f5df561c65aa098">AUD_API</a></div><div class="ttdeci">#define AUD_API</div><div class="ttdoc">Used for exporting symbols in the shared library.</div><div class="ttdef"><b>Definition:</b> Audaspace.h:93</div></div> <div class="ttc" id="classConvolverSound_html"><div class="ttname"><a href="classConvolverSound.html">ConvolverSound</a></div><div class="ttdoc">This class represents a sound that can be modified depending on a given impulse response.</div><div class="ttdef"><b>Definition:</b> ConvolverSound.h:38</div></div> <div class="ttc" id="classISound_html"><div class="ttname"><a href="classISound.html">ISound</a></div><div class="ttdoc">This class represents a type of sound source and saves the necessary values for it.</div><div class="ttdef"><b>Definition:</b> ISound.h:39</div></div> <div class="ttc" id="ImpulseResponse_8h_html"><div class="ttname"><a href="ImpulseResponse_8h.html">ImpulseResponse.h</a></div><div class="ttdoc">The ImpulseResponse class.</div></div> <div class="ttc" id="Audaspace_8h_html_a4cf7088a9bb0256563f28fd13c80b066"><div class="ttname"><a href="Audaspace_8h.html#a4cf7088a9bb0256563f28fd13c80b066">AUD_NAMESPACE_END</a></div><div class="ttdeci">#define AUD_NAMESPACE_END</div><div class="ttdoc">Closes the audaspace namespace aud.</div><div class="ttdef"><b>Definition:</b> Audaspace.h:119</div></div> <div class="ttc" id="classISound_html_a194d09ea3b22f1cb0a49b89cfcf02d63"><div class="ttname"><a href="classISound.html#a194d09ea3b22f1cb0a49b89cfcf02d63">ISound::createReader</a></div><div class="ttdeci">virtual std::shared_ptr< IReader > createReader()=0</div><div class="ttdoc">Creates a reader for playback of the sound source.</div></div> <div class="ttc" id="FFTPlan_8h_html"><div class="ttname"><a href="FFTPlan_8h.html">FFTPlan.h</a></div><div class="ttdoc">The FFTPlan class.</div></div> </div><!-- fragment --></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.15 </small></address> </body> </html>