2d-platformer/vendor/SFML-3.0.0/doc/html/namespacesf_1_1PlaybackDevi...

266 lines
14 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SFML - Simple and Fast Multimedia Library</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link rel="stylesheet" type="text/css" href="search/search.css" />
<link rel="stylesheet" type="text/css" href="searchOverrides.css" />
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_search(); });
/* @license-end */
</script>
</head>
<body>
<div id="banner-container">
<div id="banner">
<span id="sfml">SFML 3.0.0</span>
</div>
</div>
<div id="content">
<div>
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="topics.html"><span>Topics</span></a></li>
<li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
<input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="namespaces.html"><span>Namespace&#160;List</span></a></li>
<li><a href="namespacemembers.html"><span>Namespace&#160;Members</span></a></li>
</ul>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- 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">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacesf.html">sf</a></li><li class="navelem"><a class="el" href="namespacesf_1_1PlaybackDevice.html">PlaybackDevice</a></li> </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle"><div class="title">sf::PlaybackDevice Namespace Reference</div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:afb84033768d8be76f1820886f5aa1003" id="r_afb84033768d8be76f1820886f5aa1003"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#afb84033768d8be76f1820886f5aa1003">getAvailableDevices</a> ()</td></tr>
<tr class="memdesc:afb84033768d8be76f1820886f5aa1003"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a list of the names of all available audio playback devices. <br /></td></tr>
<tr class="separator:afb84033768d8be76f1820886f5aa1003"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a42f072d55a913389bea68ac233287984" id="r_a42f072d55a913389bea68ac233287984"><td class="memItemLeft" align="right" valign="top">std::optional&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a42f072d55a913389bea68ac233287984">getDefaultDevice</a> ()</td></tr>
<tr class="memdesc:a42f072d55a913389bea68ac233287984"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the name of the default audio playback device. <br /></td></tr>
<tr class="separator:a42f072d55a913389bea68ac233287984"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aadbbdd328d6d7735d033a45d34fc1800" id="r_aadbbdd328d6d7735d033a45d34fc1800"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aadbbdd328d6d7735d033a45d34fc1800">setDevice</a> (const std::string &amp;name)</td></tr>
<tr class="memdesc:aadbbdd328d6d7735d033a45d34fc1800"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the audio playback device. <br /></td></tr>
<tr class="separator:aadbbdd328d6d7735d033a45d34fc1800"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe8bcab21351a0b5145a03937fee1a4f" id="r_abe8bcab21351a0b5145a03937fee1a4f"><td class="memItemLeft" align="right" valign="top">std::optional&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#abe8bcab21351a0b5145a03937fee1a4f">getDevice</a> ()</td></tr>
<tr class="memdesc:abe8bcab21351a0b5145a03937fee1a4f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the name of the current audio playback device. <br /></td></tr>
<tr class="separator:abe8bcab21351a0b5145a03937fee1a4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="afb84033768d8be76f1820886f5aa1003" name="afb84033768d8be76f1820886f5aa1003"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb84033768d8be76f1820886f5aa1003">&#9670;&#160;</a></span>getAvailableDevices()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::vector&lt; std::string &gt; sf::PlaybackDevice::getAvailableDevices </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">nodiscard</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a list of the names of all available audio playback devices. </p>
<p>This function returns a vector of strings containing the names of all available audio playback devices.</p>
<p>If the operating system reports multiple devices with the same name, a number will be appended to the name of all subsequent devices to distinguish them from each other. This guarantees that every entry returned by this function will represent a unique device.</p>
<p>For example, if the operating system reports multiple devices with the name "Sound Card", the entries returned would be:</p><ul>
<li><a class="el" href="classsf_1_1Sound.html" title="Regular sound that can be played in the audio environment.">Sound</a> Card</li>
<li><a class="el" href="classsf_1_1Sound.html" title="Regular sound that can be played in the audio environment.">Sound</a> Card 2</li>
<li><a class="el" href="classsf_1_1Sound.html" title="Regular sound that can be played in the audio environment.">Sound</a> Card 3</li>
<li>...</li>
</ul>
<p>The default device, if one is marked as such, will be placed at the beginning of the vector.</p>
<p>If no devices are available, this function will return an empty vector.</p>
<dl class="section return"><dt>Returns</dt><dd>A vector of strings containing the device names or an empty vector if no devices are available </dd></dl>
</div>
</div>
<a id="a42f072d55a913389bea68ac233287984" name="a42f072d55a913389bea68ac233287984"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a42f072d55a913389bea68ac233287984">&#9670;&#160;</a></span>getDefaultDevice()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::optional&lt; std::string &gt; sf::PlaybackDevice::getDefaultDevice </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">nodiscard</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the name of the default audio playback device. </p>
<p>This function returns the name of the default audio playback device. If none is available, an empty string is returned.</p>
<dl class="section return"><dt>Returns</dt><dd>The name of the default audio playback device </dd></dl>
</div>
</div>
<a id="abe8bcab21351a0b5145a03937fee1a4f" name="abe8bcab21351a0b5145a03937fee1a4f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abe8bcab21351a0b5145a03937fee1a4f">&#9670;&#160;</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">std::optional&lt; std::string &gt; sf::PlaybackDevice::getDevice </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">nodiscard</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the name of the current audio playback device. </p>
<dl class="section return"><dt>Returns</dt><dd>The name of the current audio playback device or <code>std::nullopt</code> if there is none </dd></dl>
</div>
</div>
<a id="aadbbdd328d6d7735d033a45d34fc1800" name="aadbbdd328d6d7735d033a45d34fc1800"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aadbbdd328d6d7735d033a45d34fc1800">&#9670;&#160;</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">bool sf::PlaybackDevice::setDevice </td>
<td>(</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>name</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">nodiscard</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the audio playback device. </p>
<p>This function sets the audio playback device to the device with the given <code>name</code>. It can be called on the fly (i.e: while sounds are playing).</p>
<p>If there are sounds playing when the audio playback device is switched, the sounds will continue playing uninterrupted on the new audio playback device.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>The name of the audio playback device</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code>, if it was able to set the requested device</dd></dl>
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#afb84033768d8be76f1820886f5aa1003" title="Get a list of the names of all available audio playback devices.">getAvailableDevices</a></code>, <code><a class="el" href="#a42f072d55a913389bea68ac233287984" title="Get the name of the default audio playback device.">getDefaultDevice</a></code> </dd></dl>
</div>
</div>
</div><!-- contents -->
</div>
<div id="footer-container">
<div id="footer">
SFML is licensed under the terms and conditions of the <a href="https://www.sfml-dev.org/license.php">zlib/png license</a>.<br />
Copyright &copy; Laurent Gomila &nbsp;::&nbsp;
Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> &nbsp;::&nbsp;
</div>
</div>
</body>
</html>