<!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: DeviceManager Class Reference</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><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-static-methods">Static Public Member Functions</a> | <a href="classDeviceManager-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">DeviceManager Class Reference</div> </div> </div><!--header--> <div class="contents"> <p>This class manages all device plugins and maintains a device if asked to do so. <a href="classDeviceManager.html#details">More...</a></p> <p><code>#include <<a class="el" href="DeviceManager_8h_source.html">DeviceManager.h</a>></code></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a> Static Public Member Functions</h2></td></tr> <tr class="memitem:a78298092950a133b95c8f4bac9719515"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classDeviceManager.html#a78298092950a133b95c8f4bac9719515">registerDevice</a> (std::string name, std::shared_ptr< <a class="el" href="classIDeviceFactory.html">IDeviceFactory</a> > factory)</td></tr> <tr class="memdesc:a78298092950a133b95c8f4bac9719515"><td class="mdescLeft"> </td><td class="mdescRight">Registers a device factory. <a href="#a78298092950a133b95c8f4bac9719515">More...</a><br /></td></tr> <tr class="separator:a78298092950a133b95c8f4bac9719515"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ac56d97772da63cab98b4dfeeeb155551"><td class="memItemLeft" align="right" valign="top">static std::shared_ptr< <a class="el" href="classIDeviceFactory.html">IDeviceFactory</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classDeviceManager.html#ac56d97772da63cab98b4dfeeeb155551">getDeviceFactory</a> (std::string name)</td></tr> <tr class="memdesc:ac56d97772da63cab98b4dfeeeb155551"><td class="mdescLeft"> </td><td class="mdescRight">Returns the factory for a specific device. <a href="#ac56d97772da63cab98b4dfeeeb155551">More...</a><br /></td></tr> <tr class="separator:ac56d97772da63cab98b4dfeeeb155551"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:af80eeb6973bc868d973085c1e7c995c5"><td class="memItemLeft" align="right" valign="top">static std::shared_ptr< <a class="el" href="classIDeviceFactory.html">IDeviceFactory</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classDeviceManager.html#af80eeb6973bc868d973085c1e7c995c5">getDefaultDeviceFactory</a> ()</td></tr> <tr class="memdesc:af80eeb6973bc868d973085c1e7c995c5"><td class="mdescLeft"> </td><td class="mdescRight">Returns the default device based on the priorities of the registered factories. <a href="#af80eeb6973bc868d973085c1e7c995c5">More...</a><br /></td></tr> <tr class="separator:af80eeb6973bc868d973085c1e7c995c5"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a26bec1400bd736fb3a2f1812ec1394f1"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classDeviceManager.html#a26bec1400bd736fb3a2f1812ec1394f1">setDevice</a> (std::shared_ptr< <a class="el" href="classIDevice.html">IDevice</a> > device)</td></tr> <tr class="memdesc:a26bec1400bd736fb3a2f1812ec1394f1"><td class="mdescLeft"> </td><td class="mdescRight">Sets a device that should be handled by the manager. <a href="#a26bec1400bd736fb3a2f1812ec1394f1">More...</a><br /></td></tr> <tr class="separator:a26bec1400bd736fb3a2f1812ec1394f1"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:afa09671c229cd49e779eb3e17bc08291"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classDeviceManager.html#afa09671c229cd49e779eb3e17bc08291">openDevice</a> (std::string name)</td></tr> <tr class="memdesc:afa09671c229cd49e779eb3e17bc08291"><td class="mdescLeft"> </td><td class="mdescRight">Opens a device which will then be handled by the manager. <a href="#afa09671c229cd49e779eb3e17bc08291">More...</a><br /></td></tr> <tr class="separator:afa09671c229cd49e779eb3e17bc08291"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ad66232fa71b19068259a51e7e37304ee"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classDeviceManager.html#ad66232fa71b19068259a51e7e37304ee">openDefaultDevice</a> ()</td></tr> <tr class="memdesc:ad66232fa71b19068259a51e7e37304ee"><td class="mdescLeft"> </td><td class="mdescRight">Opens the default device which will then be handled by the manager. <a href="#ad66232fa71b19068259a51e7e37304ee">More...</a><br /></td></tr> <tr class="separator:ad66232fa71b19068259a51e7e37304ee"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a1a1dd56e98dd4dd6366decec7dee3128"><td class="memItemLeft" align="right" valign="top"><a id="a1a1dd56e98dd4dd6366decec7dee3128"></a> static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classDeviceManager.html#a1a1dd56e98dd4dd6366decec7dee3128">releaseDevice</a> ()</td></tr> <tr class="memdesc:a1a1dd56e98dd4dd6366decec7dee3128"><td class="mdescLeft"> </td><td class="mdescRight">Releases the currently handled device. <br /></td></tr> <tr class="separator:a1a1dd56e98dd4dd6366decec7dee3128"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:af9305f6e0cc22197f66f784ef732a033"><td class="memItemLeft" align="right" valign="top">static std::shared_ptr< <a class="el" href="classIDevice.html">IDevice</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classDeviceManager.html#af9305f6e0cc22197f66f784ef732a033">getDevice</a> ()</td></tr> <tr class="memdesc:af9305f6e0cc22197f66f784ef732a033"><td class="mdescLeft"> </td><td class="mdescRight">Returns the currently handled device. <a href="#af9305f6e0cc22197f66f784ef732a033">More...</a><br /></td></tr> <tr class="separator:af9305f6e0cc22197f66f784ef732a033"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a2f43422fbe4305d23d4b83d6220cf597"><td class="memItemLeft" align="right" valign="top">static std::shared_ptr< <a class="el" href="classI3DDevice.html">I3DDevice</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classDeviceManager.html#a2f43422fbe4305d23d4b83d6220cf597">get3DDevice</a> ()</td></tr> <tr class="memdesc:a2f43422fbe4305d23d4b83d6220cf597"><td class="mdescLeft"> </td><td class="mdescRight">Returns the currently handled 3D device. <a href="#a2f43422fbe4305d23d4b83d6220cf597">More...</a><br /></td></tr> <tr class="separator:a2f43422fbe4305d23d4b83d6220cf597"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a730eabb095d110032c4aa5b38526efc6"><td class="memItemLeft" align="right" valign="top">static std::vector< std::string > </td><td class="memItemRight" valign="bottom"><a class="el" href="classDeviceManager.html#a730eabb095d110032c4aa5b38526efc6">getAvailableDeviceNames</a> ()</td></tr> <tr class="memdesc:a730eabb095d110032c4aa5b38526efc6"><td class="mdescLeft"> </td><td class="mdescRight">Returns a list of available devices. <a href="#a730eabb095d110032c4aa5b38526efc6">More...</a><br /></td></tr> <tr class="separator:a730eabb095d110032c4aa5b38526efc6"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>This class manages all device plugins and maintains a device if asked to do so. </p> <p>This enables applications to access their output device without having to carry it through the whole application. </p> </div><h2 class="groupheader">Member Function Documentation</h2> <a id="a2f43422fbe4305d23d4b83d6220cf597"></a> <h2 class="memtitle"><span class="permalink"><a href="#a2f43422fbe4305d23d4b83d6220cf597">◆ </a></span>get3DDevice()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static std::shared_ptr<<a class="el" href="classI3DDevice.html">I3DDevice</a>> DeviceManager::get3DDevice </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Returns the currently handled 3D device. </p> <dl class="section return"><dt>Returns</dt><dd>The handled device or nullptr if no device has been registered or the registered device is not an <a class="el" href="classI3DDevice.html" title="The I3DDevice interface represents an output device for 3D sound.">I3DDevice</a>. </dd></dl> </div> </div> <a id="a730eabb095d110032c4aa5b38526efc6"></a> <h2 class="memtitle"><span class="permalink"><a href="#a730eabb095d110032c4aa5b38526efc6">◆ </a></span>getAvailableDeviceNames()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static std::vector<std::string> DeviceManager::getAvailableDeviceNames </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Returns a list of available devices. </p> <dl class="section return"><dt>Returns</dt><dd>A list of strings with the names of available devices. </dd></dl> </div> </div> <a id="af80eeb6973bc868d973085c1e7c995c5"></a> <h2 class="memtitle"><span class="permalink"><a href="#af80eeb6973bc868d973085c1e7c995c5">◆ </a></span>getDefaultDeviceFactory()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static std::shared_ptr<<a class="el" href="classIDeviceFactory.html">IDeviceFactory</a>> DeviceManager::getDefaultDeviceFactory </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Returns the default device based on the priorities of the registered factories. </p> <dl class="section return"><dt>Returns</dt><dd>The default device or nullptr if no factory has been registered. </dd></dl> </div> </div> <a id="af9305f6e0cc22197f66f784ef732a033"></a> <h2 class="memtitle"><span class="permalink"><a href="#af9305f6e0cc22197f66f784ef732a033">◆ </a></span>getDevice()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static std::shared_ptr<<a class="el" href="classIDevice.html">IDevice</a>> DeviceManager::getDevice </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Returns the currently handled device. </p> <dl class="section return"><dt>Returns</dt><dd>The handled device or nullptr if no device has been registered. </dd></dl> </div> </div> <a id="ac56d97772da63cab98b4dfeeeb155551"></a> <h2 class="memtitle"><span class="permalink"><a href="#ac56d97772da63cab98b4dfeeeb155551">◆ </a></span>getDeviceFactory()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static std::shared_ptr<<a class="el" href="classIDeviceFactory.html">IDeviceFactory</a>> DeviceManager::getDeviceFactory </td> <td>(</td> <td class="paramtype">std::string </td> <td class="paramname"><em>name</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Returns the factory for a specific device. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">name</td><td>The representative name of the device. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The factory if it was found, or nullptr otherwise. </dd></dl> </div> </div> <a id="ad66232fa71b19068259a51e7e37304ee"></a> <h2 class="memtitle"><span class="permalink"><a href="#ad66232fa71b19068259a51e7e37304ee">◆ </a></span>openDefaultDevice()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static void DeviceManager::openDefaultDevice </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Opens the default device which will then be handled by the manager. </p> <p>The device to open is selected based on the priority of the registered factories. If a device is currently being handled it will be released. </p> </div> </div> <a id="afa09671c229cd49e779eb3e17bc08291"></a> <h2 class="memtitle"><span class="permalink"><a href="#afa09671c229cd49e779eb3e17bc08291">◆ </a></span>openDevice()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static void DeviceManager::openDevice </td> <td>(</td> <td class="paramtype">std::string </td> <td class="paramname"><em>name</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Opens a device which will then be handled by the manager. </p> <p>If a device is currently being handled it will be released. </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">name</td><td>The representative name of the device. </td></tr> </table> </dd> </dl> </div> </div> <a id="a78298092950a133b95c8f4bac9719515"></a> <h2 class="memtitle"><span class="permalink"><a href="#a78298092950a133b95c8f4bac9719515">◆ </a></span>registerDevice()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static void DeviceManager::registerDevice </td> <td>(</td> <td class="paramtype">std::string </td> <td class="paramname"><em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">std::shared_ptr< <a class="el" href="classIDeviceFactory.html">IDeviceFactory</a> > </td> <td class="paramname"><em>factory</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Registers a device factory. </p> <p>This method is mostly used by plugin developers to add their device implementation for general use by the library end users. </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">name</td><td>A representative name for the device. </td></tr> <tr><td class="paramname">factory</td><td>The factory that creates the device. </td></tr> </table> </dd> </dl> </div> </div> <a id="a26bec1400bd736fb3a2f1812ec1394f1"></a> <h2 class="memtitle"><span class="permalink"><a href="#a26bec1400bd736fb3a2f1812ec1394f1">◆ </a></span>setDevice()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static void DeviceManager::setDevice </td> <td>(</td> <td class="paramtype">std::shared_ptr< <a class="el" href="classIDevice.html">IDevice</a> > </td> <td class="paramname"><em>device</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Sets a device that should be handled by the manager. </p> <p>If a device is currently being handled it will be released. </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">device</td><td>The device the manager should take care of. </td></tr> </table> </dd> </dl> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>devices/<a class="el" href="DeviceManager_8h_source.html">DeviceManager.h</a></li> </ul> </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>