1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xmlns="http://www.w3.org/1999/xhtml"> 3<head> 4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> 5<meta http-equiv="X-UA-Compatible" content="IE=9"/> 6<meta name="generator" content="Doxygen 1.8.15"/> 7<meta name="viewport" content="width=device-width, initial-scale=1"/> 8<title>Oboe: oboe::AudioStream Class Reference</title> 9<link href="tabs.css" rel="stylesheet" type="text/css"/> 10<script type="text/javascript" src="jquery.js"></script> 11<script type="text/javascript" src="dynsections.js"></script> 12<link href="search/search.css" rel="stylesheet" type="text/css"/> 13<script type="text/javascript" src="search/searchdata.js"></script> 14<script type="text/javascript" src="search/search.js"></script> 15<link href="doxygen.css" rel="stylesheet" type="text/css" /> 16</head> 17<body> 18<div id="top"><!-- do not remove this div, it is closed by doxygen! --> 19<div id="titlearea"> 20<table cellspacing="0" cellpadding="0"> 21 <tbody> 22 <tr style="height: 56px;"> 23 <td id="projectalign" style="padding-left: 0.5em;"> 24 <div id="projectname">Oboe 25  <span id="projectnumber">1.5</span> 26 </div> 27 <div id="projectbrief">A library for creating real-time audio apps on Android</div> 28 </td> 29 </tr> 30 </tbody> 31</table> 32</div> 33<!-- end header part --> 34<!-- Generated by Doxygen 1.8.15 --> 35<script type="text/javascript"> 36/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ 37var searchBox = new SearchBox("searchBox", "search",false,'Search'); 38/* @license-end */ 39</script> 40<script type="text/javascript" src="menudata.js"></script> 41<script type="text/javascript" src="menu.js"></script> 42<script type="text/javascript"> 43/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ 44$(function() { 45 initMenu('',true,false,'search.php','Search'); 46 $(document).ready(function() { init_search(); }); 47}); 48/* @license-end */</script> 49<div id="main-nav"></div> 50<!-- window showing the filter options --> 51<div id="MSearchSelectWindow" 52 onmouseover="return searchBox.OnSearchSelectShow()" 53 onmouseout="return searchBox.OnSearchSelectHide()" 54 onkeydown="return searchBox.OnSearchSelectKey(event)"> 55</div> 56 57<!-- iframe showing the search results (closed by default) --> 58<div id="MSearchResultsWindow"> 59<iframe src="javascript:void(0)" frameborder="0" 60 name="MSearchResults" id="MSearchResults"> 61</iframe> 62</div> 63 64<div id="nav-path" class="navpath"> 65 <ul> 66<li class="navelem"><a class="el" href="namespaceoboe.html">oboe</a></li><li class="navelem"><a class="el" href="classoboe_1_1_audio_stream.html">AudioStream</a></li> </ul> 67</div> 68</div><!-- top --> 69<div class="header"> 70 <div class="summary"> 71<a href="#pub-methods">Public Member Functions</a> | 72<a href="#pro-methods">Protected Member Functions</a> | 73<a href="#pro-attribs">Protected Attributes</a> | 74<a href="#friends">Friends</a> | 75<a href="classoboe_1_1_audio_stream-members.html">List of all members</a> </div> 76 <div class="headertitle"> 77<div class="title">oboe::AudioStream Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div> 78</div><!--header--> 79<div class="contents"> 80 81<p><code>#include <<a class="el" href="_audio_stream_8h_source.html">AudioStream.h</a>></code></p> 82<div class="dynheader"> 83Inheritance diagram for oboe::AudioStream:</div> 84<div class="dyncontent"> 85 <div class="center"> 86 <img src="classoboe_1_1_audio_stream.png" usemap="#oboe::AudioStream_map" alt=""/> 87 <map id="oboe::AudioStream_map" name="oboe::AudioStream_map"> 88<area href="classoboe_1_1_audio_stream_base.html" alt="oboe::AudioStreamBase" shape="rect" coords="0,0,146,24"/> 89 </map> 90</div></div> 91<table class="memberdecls"> 92<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> 93Public Member Functions</h2></td></tr> 94<tr class="memitem:a8ebb587a07bf62c864fd62c63b241fd4"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a8ebb587a07bf62c864fd62c63b241fd4">AudioStream</a> (const <a class="el" href="classoboe_1_1_audio_stream_builder.html">AudioStreamBuilder</a> &builder)</td></tr> 95<tr class="separator:a8ebb587a07bf62c864fd62c63b241fd4"><td class="memSeparator" colspan="2"> </td></tr> 96<tr class="memitem:a686c6ce8a29051c858fd1de386805dc6"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a686c6ce8a29051c858fd1de386805dc6">open</a> ()</td></tr> 97<tr class="separator:a686c6ce8a29051c858fd1de386805dc6"><td class="memSeparator" colspan="2"> </td></tr> 98<tr class="memitem:a9c8ea30e30e513766d5e996c370eb8d8"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a9c8ea30e30e513766d5e996c370eb8d8">close</a> ()</td></tr> 99<tr class="separator:a9c8ea30e30e513766d5e996c370eb8d8"><td class="memSeparator" colspan="2"> </td></tr> 100<tr class="memitem:af04f03eb6b64b564f1c4401688987d21"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#af04f03eb6b64b564f1c4401688987d21">start</a> (int64_t timeoutNanoseconds=<a class="el" href="namespaceoboe.html#aab8f5f081a8b2147e16ec920347c1b5c">kDefaultTimeoutNanos</a>)</td></tr> 101<tr class="separator:af04f03eb6b64b564f1c4401688987d21"><td class="memSeparator" colspan="2"> </td></tr> 102<tr class="memitem:a04f29836748a8e5842aef2be200022ad"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a04f29836748a8e5842aef2be200022ad">pause</a> (int64_t timeoutNanoseconds=<a class="el" href="namespaceoboe.html#aab8f5f081a8b2147e16ec920347c1b5c">kDefaultTimeoutNanos</a>)</td></tr> 103<tr class="separator:a04f29836748a8e5842aef2be200022ad"><td class="memSeparator" colspan="2"> </td></tr> 104<tr class="memitem:a32c25c0333eab3d65ce02275ad4acb3d"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a32c25c0333eab3d65ce02275ad4acb3d">flush</a> (int64_t timeoutNanoseconds=<a class="el" href="namespaceoboe.html#aab8f5f081a8b2147e16ec920347c1b5c">kDefaultTimeoutNanos</a>)</td></tr> 105<tr class="separator:a32c25c0333eab3d65ce02275ad4acb3d"><td class="memSeparator" colspan="2"> </td></tr> 106<tr class="memitem:aec093859d42f0470c884edd1e976d9f3"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#aec093859d42f0470c884edd1e976d9f3">stop</a> (int64_t timeoutNanoseconds=<a class="el" href="namespaceoboe.html#aab8f5f081a8b2147e16ec920347c1b5c">kDefaultTimeoutNanos</a>)</td></tr> 107<tr class="separator:aec093859d42f0470c884edd1e976d9f3"><td class="memSeparator" colspan="2"> </td></tr> 108<tr class="memitem:a3c484e314dee8dfed1d419f487b5d601"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a3c484e314dee8dfed1d419f487b5d601">requestStart</a> ()=0</td></tr> 109<tr class="separator:a3c484e314dee8dfed1d419f487b5d601"><td class="memSeparator" colspan="2"> </td></tr> 110<tr class="memitem:a7f18bb3cc5490fd7fbc1f6da63c730f6"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a7f18bb3cc5490fd7fbc1f6da63c730f6">requestPause</a> ()=0</td></tr> 111<tr class="separator:a7f18bb3cc5490fd7fbc1f6da63c730f6"><td class="memSeparator" colspan="2"> </td></tr> 112<tr class="memitem:a6bd5d633ff999e4da1faf3cd949aa602"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a6bd5d633ff999e4da1faf3cd949aa602">requestFlush</a> ()=0</td></tr> 113<tr class="separator:a6bd5d633ff999e4da1faf3cd949aa602"><td class="memSeparator" colspan="2"> </td></tr> 114<tr class="memitem:a820e634f741e6b5efdcef8104cecb919"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a820e634f741e6b5efdcef8104cecb919">requestStop</a> ()=0</td></tr> 115<tr class="separator:a820e634f741e6b5efdcef8104cecb919"><td class="memSeparator" colspan="2"> </td></tr> 116<tr class="memitem:a9d37cc6513823c685ae892626ff83ea8"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceoboe.html#a89fa2ce046723764618c29db737917f6">StreamState</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a9d37cc6513823c685ae892626ff83ea8">getState</a> () const =0</td></tr> 117<tr class="separator:a9d37cc6513823c685ae892626ff83ea8"><td class="memSeparator" colspan="2"> </td></tr> 118<tr class="memitem:a0c865a5501f369d959c39d8ab8b46a07"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a0c865a5501f369d959c39d8ab8b46a07">waitForStateChange</a> (<a class="el" href="namespaceoboe.html#a89fa2ce046723764618c29db737917f6">StreamState</a> inputState, <a class="el" href="namespaceoboe.html#a89fa2ce046723764618c29db737917f6">StreamState</a> *nextState, int64_t timeoutNanoseconds)=0</td></tr> 119<tr class="separator:a0c865a5501f369d959c39d8ab8b46a07"><td class="memSeparator" colspan="2"> </td></tr> 120<tr class="memitem:a06e3f9e133b3a75515e7793939d1cd03"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classoboe_1_1_result_with_value.html">ResultWithValue</a>< int32_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a06e3f9e133b3a75515e7793939d1cd03">setBufferSizeInFrames</a> (int32_t)</td></tr> 121<tr class="separator:a06e3f9e133b3a75515e7793939d1cd03"><td class="memSeparator" colspan="2"> </td></tr> 122<tr class="memitem:ad1a1d3bbf3b348ed92b7ed18ce9cc261"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classoboe_1_1_result_with_value.html">ResultWithValue</a>< int32_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#ad1a1d3bbf3b348ed92b7ed18ce9cc261">getXRunCount</a> () const</td></tr> 123<tr class="separator:ad1a1d3bbf3b348ed92b7ed18ce9cc261"><td class="memSeparator" colspan="2"> </td></tr> 124<tr class="memitem:a43d8a098440cde28f4ee8bedd6d107c4"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a43d8a098440cde28f4ee8bedd6d107c4">isXRunCountSupported</a> () const =0</td></tr> 125<tr class="separator:a43d8a098440cde28f4ee8bedd6d107c4"><td class="memSeparator" colspan="2"> </td></tr> 126<tr class="memitem:ac160acb656515814fa6fdd157c131a0a"><td class="memItemLeft" align="right" valign="top">virtual int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#ac160acb656515814fa6fdd157c131a0a">getFramesPerBurst</a> ()=0</td></tr> 127<tr class="separator:ac160acb656515814fa6fdd157c131a0a"><td class="memSeparator" colspan="2"> </td></tr> 128<tr class="memitem:a5c01907a59d5f89a5e4b819fe66b08bc"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a5c01907a59d5f89a5e4b819fe66b08bc">getBytesPerFrame</a> () const</td></tr> 129<tr class="separator:a5c01907a59d5f89a5e4b819fe66b08bc"><td class="memSeparator" colspan="2"> </td></tr> 130<tr class="memitem:a44dda61e6e948e49b68f87172f084d62"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a44dda61e6e948e49b68f87172f084d62">getBytesPerSample</a> () const</td></tr> 131<tr class="separator:a44dda61e6e948e49b68f87172f084d62"><td class="memSeparator" colspan="2"> </td></tr> 132<tr class="memitem:ab43dd4074e1de57bac1c3fd111430341"><td class="memItemLeft" align="right" valign="top">virtual int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#ab43dd4074e1de57bac1c3fd111430341">getFramesWritten</a> ()</td></tr> 133<tr class="separator:ab43dd4074e1de57bac1c3fd111430341"><td class="memSeparator" colspan="2"> </td></tr> 134<tr class="memitem:aeebfc59abd978cd6dff07c16cfe266df"><td class="memItemLeft" align="right" valign="top">virtual int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#aeebfc59abd978cd6dff07c16cfe266df">getFramesRead</a> ()</td></tr> 135<tr class="separator:aeebfc59abd978cd6dff07c16cfe266df"><td class="memSeparator" colspan="2"> </td></tr> 136<tr class="memitem:ae023cb001f3261d064f423101798d6be"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classoboe_1_1_result_with_value.html">ResultWithValue</a>< double > </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#ae023cb001f3261d064f423101798d6be">calculateLatencyMillis</a> ()</td></tr> 137<tr class="separator:ae023cb001f3261d064f423101798d6be"><td class="memSeparator" colspan="2"> </td></tr> 138<tr class="memitem:acb8edbc17ff79993a8ed996d216fe6f3"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#acb8edbc17ff79993a8ed996d216fe6f3">getTimestamp</a> (clockid_t, int64_t *, int64_t *)</td></tr> 139<tr class="separator:acb8edbc17ff79993a8ed996d216fe6f3"><td class="memSeparator" colspan="2"> </td></tr> 140<tr class="memitem:a49254e6b1b19cb6d0ca6c63058029771"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classoboe_1_1_result_with_value.html">ResultWithValue</a>< <a class="el" href="structoboe_1_1_frame_timestamp.html">FrameTimestamp</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a49254e6b1b19cb6d0ca6c63058029771">getTimestamp</a> (clockid_t)</td></tr> 141<tr class="separator:a49254e6b1b19cb6d0ca6c63058029771"><td class="memSeparator" colspan="2"> </td></tr> 142<tr class="memitem:a3612c05ed6b01a213dde67d913c07e11"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classoboe_1_1_result_with_value.html">ResultWithValue</a>< int32_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a3612c05ed6b01a213dde67d913c07e11">write</a> (const void *, int32_t, int64_t)</td></tr> 143<tr class="separator:a3612c05ed6b01a213dde67d913c07e11"><td class="memSeparator" colspan="2"> </td></tr> 144<tr class="memitem:a8089f0a0cb68d4039cf33e6584129978"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classoboe_1_1_result_with_value.html">ResultWithValue</a>< int32_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a8089f0a0cb68d4039cf33e6584129978">read</a> (void *, int32_t, int64_t)</td></tr> 145<tr class="separator:a8089f0a0cb68d4039cf33e6584129978"><td class="memSeparator" colspan="2"> </td></tr> 146<tr class="memitem:a2b7a3cee7444114843dbdd1fc705f6bb"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceoboe.html#a92972414867c81d5974cb2ed7abefbf6">AudioApi</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a2b7a3cee7444114843dbdd1fc705f6bb">getAudioApi</a> () const =0</td></tr> 147<tr class="separator:a2b7a3cee7444114843dbdd1fc705f6bb"><td class="memSeparator" colspan="2"> </td></tr> 148<tr class="memitem:a15cdaaaa4c1e8da322d6da33334c8147"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a15cdaaaa4c1e8da322d6da33334c8147">usesAAudio</a> () const</td></tr> 149<tr class="separator:a15cdaaaa4c1e8da322d6da33334c8147"><td class="memSeparator" colspan="2"> </td></tr> 150<tr class="memitem:a5458d7130415eb4defe3dbc11d479e2f"><td class="memItemLeft" align="right" valign="top">virtual void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a5458d7130415eb4defe3dbc11d479e2f">getUnderlyingStream</a> () const</td></tr> 151<tr class="separator:a5458d7130415eb4defe3dbc11d479e2f"><td class="memSeparator" colspan="2"> </td></tr> 152<tr class="memitem:aa5f4801cca6877eeaa4735b93933269d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#aa5f4801cca6877eeaa4735b93933269d">launchStopThread</a> ()</td></tr> 153<tr class="separator:aa5f4801cca6877eeaa4735b93933269d"><td class="memSeparator" colspan="2"> </td></tr> 154<tr class="memitem:a64ad978c5f70ced17ef5a96605496515"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a64ad978c5f70ced17ef5a96605496515">updateFramesWritten</a> ()=0</td></tr> 155<tr class="separator:a64ad978c5f70ced17ef5a96605496515"><td class="memSeparator" colspan="2"> </td></tr> 156<tr class="memitem:a462358ddab709c79d1a7968d6d55b727"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a462358ddab709c79d1a7968d6d55b727">updateFramesRead</a> ()=0</td></tr> 157<tr class="separator:a462358ddab709c79d1a7968d6d55b727"><td class="memSeparator" colspan="2"> </td></tr> 158<tr class="memitem:ab1748ad90d9ff9210f0fee19cea71224"><td class="memItemLeft" align="right" valign="top"><a id="ab1748ad90d9ff9210f0fee19cea71224"></a> 159<a class="el" href="classoboe_1_1_audio_stream_data_callback.html">AudioStreamDataCallback</a> * </td><td class="memItemRight" valign="bottom"><b>swapDataCallback</b> (<a class="el" href="classoboe_1_1_audio_stream_data_callback.html">AudioStreamDataCallback</a> *dataCallback)</td></tr> 160<tr class="separator:ab1748ad90d9ff9210f0fee19cea71224"><td class="memSeparator" colspan="2"> </td></tr> 161<tr class="memitem:aa75bb1b45bee873715a674df5dac0ef9"><td class="memItemLeft" align="right" valign="top"><a id="aa75bb1b45bee873715a674df5dac0ef9"></a> 162<a class="el" href="classoboe_1_1_audio_stream_error_callback.html">AudioStreamErrorCallback</a> * </td><td class="memItemRight" valign="bottom"><b>swapErrorCallback</b> (<a class="el" href="classoboe_1_1_audio_stream_error_callback.html">AudioStreamErrorCallback</a> *errorCallback)</td></tr> 163<tr class="separator:aa75bb1b45bee873715a674df5dac0ef9"><td class="memSeparator" colspan="2"> </td></tr> 164<tr class="memitem:afa35ee4b8629fbffe26b9be7c7ed55d2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classoboe_1_1_result_with_value.html">ResultWithValue</a>< int32_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#afa35ee4b8629fbffe26b9be7c7ed55d2">getAvailableFrames</a> ()</td></tr> 165<tr class="separator:afa35ee4b8629fbffe26b9be7c7ed55d2"><td class="memSeparator" colspan="2"> </td></tr> 166<tr class="memitem:afddb0962863ccf9ec6672a042fe15941"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classoboe_1_1_result_with_value.html">ResultWithValue</a>< int32_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#afddb0962863ccf9ec6672a042fe15941">waitForAvailableFrames</a> (int32_t numFrames, int64_t timeoutNanoseconds)</td></tr> 167<tr class="separator:afddb0962863ccf9ec6672a042fe15941"><td class="memSeparator" colspan="2"> </td></tr> 168<tr class="memitem:a8fe8afdf164a1fe835c514f709743d75"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">oboe::Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a8fe8afdf164a1fe835c514f709743d75">getLastErrorCallbackResult</a> () const</td></tr> 169<tr class="separator:a8fe8afdf164a1fe835c514f709743d75"><td class="memSeparator" colspan="2"> </td></tr> 170<tr class="inherit_header pub_methods_classoboe_1_1_audio_stream_base"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classoboe_1_1_audio_stream_base')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classoboe_1_1_audio_stream_base.html">oboe::AudioStreamBase</a></td></tr> 171<tr class="memitem:aa6b103e1b0f808bbc4949d56f0829f98 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#aa6b103e1b0f808bbc4949d56f0829f98">AudioStreamBase</a> (const <a class="el" href="classoboe_1_1_audio_stream_base.html">AudioStreamBase</a> &)=default</td></tr> 172<tr class="separator:aa6b103e1b0f808bbc4949d56f0829f98 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 173<tr class="memitem:aa9c987a59555d7a60b9f7a63f4afc7fc inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classoboe_1_1_audio_stream_base.html">AudioStreamBase</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#aa9c987a59555d7a60b9f7a63f4afc7fc">operator=</a> (const <a class="el" href="classoboe_1_1_audio_stream_base.html">AudioStreamBase</a> &)=default</td></tr> 174<tr class="separator:aa9c987a59555d7a60b9f7a63f4afc7fc inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 175<tr class="memitem:a87e6bf37d6a2a5e983b8ca8d29aea575 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a87e6bf37d6a2a5e983b8ca8d29aea575">getChannelCount</a> () const</td></tr> 176<tr class="separator:a87e6bf37d6a2a5e983b8ca8d29aea575 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 177<tr class="memitem:a6f86f2233a04c5a0b056f0c1c261f1b1 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceoboe.html#af2147500089212955498a08ef2edb5ae">Direction</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a6f86f2233a04c5a0b056f0c1c261f1b1">getDirection</a> () const</td></tr> 178<tr class="separator:a6f86f2233a04c5a0b056f0c1c261f1b1 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 179<tr class="memitem:ae9d32f3e09174bad69e74f147ee33087 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#ae9d32f3e09174bad69e74f147ee33087">getSampleRate</a> () const</td></tr> 180<tr class="separator:ae9d32f3e09174bad69e74f147ee33087 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 181<tr class="memitem:a8878a90949badbb5486cc2e022a57086 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a8878a90949badbb5486cc2e022a57086">getFramesPerCallback</a> () const</td></tr> 182<tr class="separator:a8878a90949badbb5486cc2e022a57086 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 183<tr class="memitem:abc3ee2815568b425d15a40e132aa8e38 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#abc3ee2815568b425d15a40e132aa8e38">getFramesPerDataCallback</a> () const</td></tr> 184<tr class="separator:abc3ee2815568b425d15a40e132aa8e38 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 185<tr class="memitem:ab1e640461d7bf9d596decb913da7ac86 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceoboe.html#a92afc593e856571aacbfd02e57075df6">AudioFormat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#ab1e640461d7bf9d596decb913da7ac86">getFormat</a> () const</td></tr> 186<tr class="separator:ab1e640461d7bf9d596decb913da7ac86 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 187<tr class="memitem:af5217ab05bfde0d7637024b599302d0b inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top">virtual int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#af5217ab05bfde0d7637024b599302d0b">getBufferSizeInFrames</a> ()</td></tr> 188<tr class="separator:af5217ab05bfde0d7637024b599302d0b inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 189<tr class="memitem:ab1531253e64aaebe9e9eddbafb9098fc inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top">virtual int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#ab1531253e64aaebe9e9eddbafb9098fc">getBufferCapacityInFrames</a> () const</td></tr> 190<tr class="separator:ab1531253e64aaebe9e9eddbafb9098fc inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 191<tr class="memitem:a1fb033fc963f971bd1aa8f6707e49b41 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceoboe.html#a8330247b25429953a08354f41834d520">SharingMode</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a1fb033fc963f971bd1aa8f6707e49b41">getSharingMode</a> () const</td></tr> 192<tr class="separator:a1fb033fc963f971bd1aa8f6707e49b41 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 193<tr class="memitem:a2ddb935de0e24dd7ae8e2cfbecac9fdc inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceoboe.html#a1068781f3920654b1bfd7ed136468184">PerformanceMode</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a2ddb935de0e24dd7ae8e2cfbecac9fdc">getPerformanceMode</a> () const</td></tr> 194<tr class="separator:a2ddb935de0e24dd7ae8e2cfbecac9fdc inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 195<tr class="memitem:a093057d625bc896864b959974c265f21 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a093057d625bc896864b959974c265f21">getDeviceId</a> () const</td></tr> 196<tr class="separator:a093057d625bc896864b959974c265f21 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 197<tr class="memitem:a9fb2f34ae62dbda2c10e8513b754fa0c inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classoboe_1_1_audio_stream_data_callback.html">AudioStreamDataCallback</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a9fb2f34ae62dbda2c10e8513b754fa0c">getDataCallback</a> () const</td></tr> 198<tr class="separator:a9fb2f34ae62dbda2c10e8513b754fa0c inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 199<tr class="memitem:a1328fb9288166ff325995ce1ea1867f0 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classoboe_1_1_audio_stream_error_callback.html">AudioStreamErrorCallback</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a1328fb9288166ff325995ce1ea1867f0">getErrorCallback</a> () const</td></tr> 200<tr class="separator:a1328fb9288166ff325995ce1ea1867f0 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 201<tr class="memitem:a9a54d38b985a2eb12c6972104dc0ce73 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a9a54d38b985a2eb12c6972104dc0ce73">isDataCallbackSpecified</a> () const</td></tr> 202<tr class="separator:a9a54d38b985a2eb12c6972104dc0ce73 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 203<tr class="memitem:aef579f6d1f779c89d051f0963f2976b3 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#aef579f6d1f779c89d051f0963f2976b3">isErrorCallbackSpecified</a> () const</td></tr> 204<tr class="separator:aef579f6d1f779c89d051f0963f2976b3 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 205<tr class="memitem:a0bcfb2f8bd11c92b541fd910da9af397 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceoboe.html#a104ee8396c173fefac429759ea3c21a0">Usage</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a0bcfb2f8bd11c92b541fd910da9af397">getUsage</a> () const</td></tr> 206<tr class="separator:a0bcfb2f8bd11c92b541fd910da9af397 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 207<tr class="memitem:ab12e2d068fa87e0553b01a400d96eb82 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceoboe.html#a2a3cec6f021c1a324df60273710c604b">ContentType</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#ab12e2d068fa87e0553b01a400d96eb82">getContentType</a> () const</td></tr> 208<tr class="separator:ab12e2d068fa87e0553b01a400d96eb82 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 209<tr class="memitem:a5c773b93b8aa38191c7199cab023428a inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceoboe.html#a4477ed232b02e2694d9309baf55a8f06">InputPreset</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a5c773b93b8aa38191c7199cab023428a">getInputPreset</a> () const</td></tr> 210<tr class="separator:a5c773b93b8aa38191c7199cab023428a inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 211<tr class="memitem:aa3c502ce09bbad7690a2dd6acaf8892e inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceoboe.html#a5752250c10e96179e3618d7f72937eaf">SessionId</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#aa3c502ce09bbad7690a2dd6acaf8892e">getSessionId</a> () const</td></tr> 212<tr class="separator:aa3c502ce09bbad7690a2dd6acaf8892e inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 213<tr class="memitem:aa4ec3aa76e69350fbce6f00786211495 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#aa4ec3aa76e69350fbce6f00786211495">isChannelConversionAllowed</a> () const</td></tr> 214<tr class="separator:aa4ec3aa76e69350fbce6f00786211495 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 215<tr class="memitem:ace3625a7332bf02a86818fdf63fcccb4 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#ace3625a7332bf02a86818fdf63fcccb4">isFormatConversionAllowed</a> () const</td></tr> 216<tr class="separator:ace3625a7332bf02a86818fdf63fcccb4 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 217<tr class="memitem:a1de8d6982d411a0cf50a32efba0ca3f2 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceoboe.html#a82f3720eba7654aceb7282be36f9ff1d">SampleRateConversionQuality</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a1de8d6982d411a0cf50a32efba0ca3f2">getSampleRateConversionQuality</a> () const</td></tr> 218<tr class="separator:a1de8d6982d411a0cf50a32efba0ca3f2 inherit pub_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 219</table><table class="memberdecls"> 220<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a> 221Protected Member Functions</h2></td></tr> 222<tr class="memitem:aa48da7bf28026b7cccee73e6b054af28"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#aa48da7bf28026b7cccee73e6b054af28">wasErrorCallbackCalled</a> ()</td></tr> 223<tr class="separator:aa48da7bf28026b7cccee73e6b054af28"><td class="memSeparator" colspan="2"> </td></tr> 224<tr class="memitem:a8adbacd6a55a94a532916ab037fba1d6"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a8adbacd6a55a94a532916ab037fba1d6">waitForStateTransition</a> (<a class="el" href="namespaceoboe.html#a89fa2ce046723764618c29db737917f6">StreamState</a> startingState, <a class="el" href="namespaceoboe.html#a89fa2ce046723764618c29db737917f6">StreamState</a> endingState, int64_t timeoutNanoseconds)</td></tr> 225<tr class="separator:a8adbacd6a55a94a532916ab037fba1d6"><td class="memSeparator" colspan="2"> </td></tr> 226<tr class="memitem:a0ea79e60f5a3d29fc5a1a116aba11dfe"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceoboe.html#af85fc9910a287df6c5df0ed396bb75cd">DataCallbackResult</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a0ea79e60f5a3d29fc5a1a116aba11dfe">onDefaultCallback</a> (void *, int)</td></tr> 227<tr class="separator:a0ea79e60f5a3d29fc5a1a116aba11dfe"><td class="memSeparator" colspan="2"> </td></tr> 228<tr class="memitem:ab7a8cfe5d6039386bc5850fd5ee9bd62"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceoboe.html#af85fc9910a287df6c5df0ed396bb75cd">DataCallbackResult</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#ab7a8cfe5d6039386bc5850fd5ee9bd62">fireDataCallback</a> (void *audioData, int numFrames)</td></tr> 229<tr class="separator:ab7a8cfe5d6039386bc5850fd5ee9bd62"><td class="memSeparator" colspan="2"> </td></tr> 230<tr class="memitem:add85011ba825f74931deeb92c5edf831"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#add85011ba825f74931deeb92c5edf831">isDataCallbackEnabled</a> ()</td></tr> 231<tr class="separator:add85011ba825f74931deeb92c5edf831"><td class="memSeparator" colspan="2"> </td></tr> 232<tr class="memitem:a0faa6d3a6fd4f367e6f80d5a29e6dcba"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a0faa6d3a6fd4f367e6f80d5a29e6dcba">setDataCallbackEnabled</a> (bool enabled)</td></tr> 233<tr class="separator:a0faa6d3a6fd4f367e6f80d5a29e6dcba"><td class="memSeparator" colspan="2"> </td></tr> 234<tr class="memitem:a68b28845855f7391c24ed0c7cee26ffe"><td class="memItemLeft" align="right" valign="top"><a id="a68b28845855f7391c24ed0c7cee26ffe"></a> 235void </td><td class="memItemRight" valign="bottom"><b>setWeakThis</b> (std::shared_ptr< <a class="el" href="classoboe_1_1_audio_stream.html">oboe::AudioStream</a> > &sharedStream)</td></tr> 236<tr class="separator:a68b28845855f7391c24ed0c7cee26ffe"><td class="memSeparator" colspan="2"> </td></tr> 237<tr class="memitem:a4882ba4180fa2a984fb9a2002651d50b"><td class="memItemLeft" align="right" valign="top"><a id="a4882ba4180fa2a984fb9a2002651d50b"></a> 238std::shared_ptr< <a class="el" href="classoboe_1_1_audio_stream.html">oboe::AudioStream</a> > </td><td class="memItemRight" valign="bottom"><b>lockWeakThis</b> ()</td></tr> 239<tr class="separator:a4882ba4180fa2a984fb9a2002651d50b"><td class="memSeparator" colspan="2"> </td></tr> 240<tr class="inherit_header pro_methods_classoboe_1_1_audio_stream_base"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classoboe_1_1_audio_stream_base')"><img src="closed.png" alt="-"/> Protected Member Functions inherited from <a class="el" href="classoboe_1_1_audio_stream_base.html">oboe::AudioStreamBase</a></td></tr> 241<tr class="memitem:a5d5e07e98921d0193a5c0ccbe06f68c2 inherit pro_methods_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a5d5e07e98921d0193a5c0ccbe06f68c2">isValidConfig</a> ()</td></tr> 242<tr class="separator:a5d5e07e98921d0193a5c0ccbe06f68c2 inherit pro_methods_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 243</table><table class="memberdecls"> 244<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a> 245Protected Attributes</h2></td></tr> 246<tr class="memitem:addb945e8ab2bc395cc99c8ae6504c2cd"><td class="memItemLeft" align="right" valign="top"><a id="addb945e8ab2bc395cc99c8ae6504c2cd"></a> 247std::weak_ptr< <a class="el" href="classoboe_1_1_audio_stream.html">AudioStream</a> > </td><td class="memItemRight" valign="bottom"><b>mWeakThis</b></td></tr> 248<tr class="separator:addb945e8ab2bc395cc99c8ae6504c2cd"><td class="memSeparator" colspan="2"> </td></tr> 249<tr class="memitem:a88a63317b7c58815bac074976b00aa23"><td class="memItemLeft" align="right" valign="top">std::atomic< int64_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a88a63317b7c58815bac074976b00aa23">mFramesWritten</a> {}</td></tr> 250<tr class="separator:a88a63317b7c58815bac074976b00aa23"><td class="memSeparator" colspan="2"> </td></tr> 251<tr class="memitem:a07e82f9b9e2e4800f23ae9a7193c3b58"><td class="memItemLeft" align="right" valign="top">std::atomic< int64_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream.html#a07e82f9b9e2e4800f23ae9a7193c3b58">mFramesRead</a> {}</td></tr> 252<tr class="separator:a07e82f9b9e2e4800f23ae9a7193c3b58"><td class="memSeparator" colspan="2"> </td></tr> 253<tr class="memitem:ad23416968eb9479c300e4a94841bdde4"><td class="memItemLeft" align="right" valign="top"><a id="ad23416968eb9479c300e4a94841bdde4"></a> 254std::mutex </td><td class="memItemRight" valign="bottom"><b>mLock</b></td></tr> 255<tr class="separator:ad23416968eb9479c300e4a94841bdde4"><td class="memSeparator" colspan="2"> </td></tr> 256<tr class="memitem:af4e4e04b87a53e6b286a6059be32b053"><td class="memItemLeft" align="right" valign="top"><a id="af4e4e04b87a53e6b286a6059be32b053"></a> 257<a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">oboe::Result</a> </td><td class="memItemRight" valign="bottom"><b>mErrorCallbackResult</b> = oboe::Result::OK</td></tr> 258<tr class="separator:af4e4e04b87a53e6b286a6059be32b053"><td class="memSeparator" colspan="2"> </td></tr> 259<tr class="inherit_header pro_attribs_classoboe_1_1_audio_stream_base"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classoboe_1_1_audio_stream_base')"><img src="closed.png" alt="-"/> Protected Attributes inherited from <a class="el" href="classoboe_1_1_audio_stream_base.html">oboe::AudioStreamBase</a></td></tr> 260<tr class="memitem:a6d8493f66a945cb426506c70f0358e5f inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classoboe_1_1_audio_stream_data_callback.html">AudioStreamDataCallback</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a6d8493f66a945cb426506c70f0358e5f">mDataCallback</a> = nullptr</td></tr> 261<tr class="separator:a6d8493f66a945cb426506c70f0358e5f inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 262<tr class="memitem:adc0c8cc54adb6d3350c62b8a74b9c57b inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classoboe_1_1_audio_stream_error_callback.html">AudioStreamErrorCallback</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#adc0c8cc54adb6d3350c62b8a74b9c57b">mErrorCallback</a> = nullptr</td></tr> 263<tr class="separator:adc0c8cc54adb6d3350c62b8a74b9c57b inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 264<tr class="memitem:a3962eb94420ad0ecea70029236001899 inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a3962eb94420ad0ecea70029236001899">mFramesPerCallback</a> = <a class="el" href="namespaceoboe.html#ab0772052200184e514082eaa89be7905">kUnspecified</a></td></tr> 265<tr class="separator:a3962eb94420ad0ecea70029236001899 inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 266<tr class="memitem:a5ff460bac9d14dfeac4eeddfcbb6e206 inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a5ff460bac9d14dfeac4eeddfcbb6e206">mChannelCount</a> = <a class="el" href="namespaceoboe.html#ab0772052200184e514082eaa89be7905">kUnspecified</a></td></tr> 267<tr class="separator:a5ff460bac9d14dfeac4eeddfcbb6e206 inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 268<tr class="memitem:a998885bb6c4f37e145f4626ad4177dea inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a998885bb6c4f37e145f4626ad4177dea">mSampleRate</a> = <a class="el" href="namespaceoboe.html#ab0772052200184e514082eaa89be7905">kUnspecified</a></td></tr> 269<tr class="separator:a998885bb6c4f37e145f4626ad4177dea inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 270<tr class="memitem:a23dafa12fb1a6242b088ebd5a52798c8 inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a23dafa12fb1a6242b088ebd5a52798c8">mDeviceId</a> = <a class="el" href="namespaceoboe.html#ab0772052200184e514082eaa89be7905">kUnspecified</a></td></tr> 271<tr class="separator:a23dafa12fb1a6242b088ebd5a52798c8 inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 272<tr class="memitem:ac81d4719b350f8138aad1af38f0873b6 inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#ac81d4719b350f8138aad1af38f0873b6">mBufferCapacityInFrames</a> = <a class="el" href="namespaceoboe.html#ab0772052200184e514082eaa89be7905">kUnspecified</a></td></tr> 273<tr class="separator:ac81d4719b350f8138aad1af38f0873b6 inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 274<tr class="memitem:a3b65595d26d1eae1b8ce9925a5b98f6a inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a3b65595d26d1eae1b8ce9925a5b98f6a">mBufferSizeInFrames</a> = <a class="el" href="namespaceoboe.html#ab0772052200184e514082eaa89be7905">kUnspecified</a></td></tr> 275<tr class="separator:a3b65595d26d1eae1b8ce9925a5b98f6a inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 276<tr class="memitem:a54061319ed348329a29d883a5de2482e inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a54061319ed348329a29d883a5de2482e">mFramesPerBurst</a> = <a class="el" href="namespaceoboe.html#ab0772052200184e514082eaa89be7905">kUnspecified</a></td></tr> 277<tr class="separator:a54061319ed348329a29d883a5de2482e inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 278<tr class="memitem:ae9187492b679c97a0963e264954be473 inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceoboe.html#a8330247b25429953a08354f41834d520">SharingMode</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#ae9187492b679c97a0963e264954be473">mSharingMode</a> = <a class="el" href="namespaceoboe.html#a8330247b25429953a08354f41834d520aa6156ea9d66fef24e87e841fbabf7cca">SharingMode::Shared</a></td></tr> 279<tr class="separator:ae9187492b679c97a0963e264954be473 inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 280<tr class="memitem:a7869f04836c2c2bdc10c7309ad4b8e09 inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceoboe.html#a92afc593e856571aacbfd02e57075df6">AudioFormat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a7869f04836c2c2bdc10c7309ad4b8e09">mFormat</a> = AudioFormat::Unspecified</td></tr> 281<tr class="separator:a7869f04836c2c2bdc10c7309ad4b8e09 inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 282<tr class="memitem:a26e9294721561d3b16bcaeec5faf4880 inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceoboe.html#af2147500089212955498a08ef2edb5ae">Direction</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a26e9294721561d3b16bcaeec5faf4880">mDirection</a> = <a class="el" href="namespaceoboe.html#af2147500089212955498a08ef2edb5aea29c2c02a361c9d7028472e5d92cd4a54">Direction::Output</a></td></tr> 283<tr class="separator:a26e9294721561d3b16bcaeec5faf4880 inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 284<tr class="memitem:ab99671c2d0552557e75dc7b4afe91765 inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceoboe.html#a1068781f3920654b1bfd7ed136468184">PerformanceMode</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#ab99671c2d0552557e75dc7b4afe91765">mPerformanceMode</a> = PerformanceMode::None</td></tr> 285<tr class="separator:ab99671c2d0552557e75dc7b4afe91765 inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 286<tr class="memitem:a5b518e82f39c9fcbd7050fd66adb253c inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceoboe.html#a104ee8396c173fefac429759ea3c21a0">Usage</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a5b518e82f39c9fcbd7050fd66adb253c">mUsage</a> = <a class="el" href="namespaceoboe.html#a104ee8396c173fefac429759ea3c21a0a3b563524fdb17b4a86590470d40bef74">Usage::Media</a></td></tr> 287<tr class="separator:a5b518e82f39c9fcbd7050fd66adb253c inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 288<tr class="memitem:a5f8f0e5add381b841856de80ea4cdb2b inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceoboe.html#a2a3cec6f021c1a324df60273710c604b">ContentType</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a5f8f0e5add381b841856de80ea4cdb2b">mContentType</a> = ContentType::Music</td></tr> 289<tr class="separator:a5f8f0e5add381b841856de80ea4cdb2b inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 290<tr class="memitem:a1e5d4f5b30c4cc36f81ffd858cc00589 inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceoboe.html#a4477ed232b02e2694d9309baf55a8f06">InputPreset</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#a1e5d4f5b30c4cc36f81ffd858cc00589">mInputPreset</a> = InputPreset::VoiceRecognition</td></tr> 291<tr class="separator:a1e5d4f5b30c4cc36f81ffd858cc00589 inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 292<tr class="memitem:abe1c1e9cada1ced9b5c1504ac9b07737 inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceoboe.html#a5752250c10e96179e3618d7f72937eaf">SessionId</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classoboe_1_1_audio_stream_base.html#abe1c1e9cada1ced9b5c1504ac9b07737">mSessionId</a> = SessionId::None</td></tr> 293<tr class="separator:abe1c1e9cada1ced9b5c1504ac9b07737 inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 294<tr class="memitem:ae47a39b573250751f933dd159d09bf0f inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a id="ae47a39b573250751f933dd159d09bf0f"></a> 295bool </td><td class="memItemRight" valign="bottom"><b>mChannelConversionAllowed</b> = false</td></tr> 296<tr class="separator:ae47a39b573250751f933dd159d09bf0f inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 297<tr class="memitem:a9394a88eb5f8b74fa72eabf28f403f87 inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a id="a9394a88eb5f8b74fa72eabf28f403f87"></a> 298bool </td><td class="memItemRight" valign="bottom"><b>mFormatConversionAllowed</b> = false</td></tr> 299<tr class="separator:a9394a88eb5f8b74fa72eabf28f403f87 inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 300<tr class="memitem:a2dd35a6f009f36172838260144218f6d inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memItemLeft" align="right" valign="top"><a id="a2dd35a6f009f36172838260144218f6d"></a> 301<a class="el" href="namespaceoboe.html#a82f3720eba7654aceb7282be36f9ff1d">SampleRateConversionQuality</a> </td><td class="memItemRight" valign="bottom"><b>mSampleRateConversionQuality</b> = SampleRateConversionQuality::None</td></tr> 302<tr class="separator:a2dd35a6f009f36172838260144218f6d inherit pro_attribs_classoboe_1_1_audio_stream_base"><td class="memSeparator" colspan="2"> </td></tr> 303</table><table class="memberdecls"> 304<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a> 305Friends</h2></td></tr> 306<tr class="memitem:a8468a51a2352c31aef00fade27a43e9e"><td class="memItemLeft" align="right" valign="top"><a id="a8468a51a2352c31aef00fade27a43e9e"></a> 307class </td><td class="memItemRight" valign="bottom"><b>AudioStreamBuilder</b></td></tr> 308<tr class="separator:a8468a51a2352c31aef00fade27a43e9e"><td class="memSeparator" colspan="2"> </td></tr> 309</table> 310<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> 311<div class="textblock"><p>Base class for Oboe C++ audio stream. </p> 312</div><h2 class="groupheader">Constructor & Destructor Documentation</h2> 313<a id="a8ebb587a07bf62c864fd62c63b241fd4"></a> 314<h2 class="memtitle"><span class="permalink"><a href="#a8ebb587a07bf62c864fd62c63b241fd4">◆ </a></span>AudioStream()</h2> 315 316<div class="memitem"> 317<div class="memproto"> 318<table class="mlabels"> 319 <tr> 320 <td class="mlabels-left"> 321 <table class="memname"> 322 <tr> 323 <td class="memname">oboe::AudioStream::AudioStream </td> 324 <td>(</td> 325 <td class="paramtype">const <a class="el" href="classoboe_1_1_audio_stream_builder.html">AudioStreamBuilder</a> & </td> 326 <td class="paramname"><em>builder</em></td><td>)</td> 327 <td></td> 328 </tr> 329 </table> 330 </td> 331 <td class="mlabels-right"> 332<span class="mlabels"><span class="mlabel">explicit</span></span> </td> 333 </tr> 334</table> 335</div><div class="memdoc"> 336<p>Construct an <code><a class="el" href="classoboe_1_1_audio_stream.html">AudioStream</a></code> using the given <code><a class="el" href="classoboe_1_1_audio_stream_builder.html">AudioStreamBuilder</a></code></p> 337<dl class="params"><dt>Parameters</dt><dd> 338 <table class="params"> 339 <tr><td class="paramname">builder</td><td>containing all the stream's attributes </td></tr> 340 </table> 341 </dd> 342</dl> 343 344</div> 345</div> 346<h2 class="groupheader">Member Function Documentation</h2> 347<a id="ae023cb001f3261d064f423101798d6be"></a> 348<h2 class="memtitle"><span class="permalink"><a href="#ae023cb001f3261d064f423101798d6be">◆ </a></span>calculateLatencyMillis()</h2> 349 350<div class="memitem"> 351<div class="memproto"> 352<table class="mlabels"> 353 <tr> 354 <td class="mlabels-left"> 355 <table class="memname"> 356 <tr> 357 <td class="memname">virtual <a class="el" href="classoboe_1_1_result_with_value.html">ResultWithValue</a><double> oboe::AudioStream::calculateLatencyMillis </td> 358 <td>(</td> 359 <td class="paramname"></td><td>)</td> 360 <td></td> 361 </tr> 362 </table> 363 </td> 364 <td class="mlabels-right"> 365<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td> 366 </tr> 367</table> 368</div><div class="memdoc"> 369<p>Calculate the latency of a stream based on <a class="el" href="classoboe_1_1_audio_stream.html#acb8edbc17ff79993a8ed996d216fe6f3">getTimestamp()</a>.</p> 370<p>Output latency is the time it takes for a given frame to travel from the app to some type of digital-to-analog converter. If the DAC is external, for example in a USB interface or a TV connected by HDMI, then there may be additional latency that the Android device is unaware of.</p> 371<p>Input latency is the time it takes to a given frame to travel from an analog-to-digital converter (ADC) to the app.</p> 372<p>Note that the latency of an OUTPUT stream will increase abruptly when you write data to it and then decrease slowly over time as the data is consumed.</p> 373<p>The latency of an INPUT stream will decrease abruptly when you read data from it and then increase slowly over time as more data arrives.</p> 374<p>The latency of an OUTPUT stream is generally higher than the INPUT latency because an app generally tries to keep the OUTPUT buffer full and the INPUT buffer empty.</p> 375<dl class="section return"><dt>Returns</dt><dd>a <a class="el" href="classoboe_1_1_result_with_value.html">ResultWithValue</a> which has a result of Result::OK and a value containing the latency in milliseconds, or a result of Result::Error*. </dd></dl> 376 377</div> 378</div> 379<a id="a9c8ea30e30e513766d5e996c370eb8d8"></a> 380<h2 class="memtitle"><span class="permalink"><a href="#a9c8ea30e30e513766d5e996c370eb8d8">◆ </a></span>close()</h2> 381 382<div class="memitem"> 383<div class="memproto"> 384<table class="mlabels"> 385 <tr> 386 <td class="mlabels-left"> 387 <table class="memname"> 388 <tr> 389 <td class="memname">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> oboe::AudioStream::close </td> 390 <td>(</td> 391 <td class="paramname"></td><td>)</td> 392 <td></td> 393 </tr> 394 </table> 395 </td> 396 <td class="mlabels-right"> 397<span class="mlabels"><span class="mlabel">virtual</span></span> </td> 398 </tr> 399</table> 400</div><div class="memdoc"> 401<p>Close the stream and deallocate any resources from the <a class="el" href="classoboe_1_1_audio_stream.html#a686c6ce8a29051c858fd1de386805dc6">open()</a> call. </p> 402 403</div> 404</div> 405<a id="ab7a8cfe5d6039386bc5850fd5ee9bd62"></a> 406<h2 class="memtitle"><span class="permalink"><a href="#ab7a8cfe5d6039386bc5850fd5ee9bd62">◆ </a></span>fireDataCallback()</h2> 407 408<div class="memitem"> 409<div class="memproto"> 410<table class="mlabels"> 411 <tr> 412 <td class="mlabels-left"> 413 <table class="memname"> 414 <tr> 415 <td class="memname"><a class="el" href="namespaceoboe.html#af85fc9910a287df6c5df0ed396bb75cd">DataCallbackResult</a> oboe::AudioStream::fireDataCallback </td> 416 <td>(</td> 417 <td class="paramtype">void * </td> 418 <td class="paramname"><em>audioData</em>, </td> 419 </tr> 420 <tr> 421 <td class="paramkey"></td> 422 <td></td> 423 <td class="paramtype">int </td> 424 <td class="paramname"><em>numFrames</em> </td> 425 </tr> 426 <tr> 427 <td></td> 428 <td>)</td> 429 <td></td><td></td> 430 </tr> 431 </table> 432 </td> 433 <td class="mlabels-right"> 434<span class="mlabels"><span class="mlabel">protected</span></span> </td> 435 </tr> 436</table> 437</div><div class="memdoc"> 438<p>Override this to provide your own behaviour for the audio callback</p> 439<dl class="params"><dt>Parameters</dt><dd> 440 <table class="params"> 441 <tr><td class="paramname">audioData</td><td>container array which audio frames will be written into or read from </td></tr> 442 <tr><td class="paramname">numFrames</td><td>number of frames which were read/written </td></tr> 443 </table> 444 </dd> 445</dl> 446<dl class="section return"><dt>Returns</dt><dd>the result of the callback: stop or continue </dd></dl> 447 448</div> 449</div> 450<a id="a32c25c0333eab3d65ce02275ad4acb3d"></a> 451<h2 class="memtitle"><span class="permalink"><a href="#a32c25c0333eab3d65ce02275ad4acb3d">◆ </a></span>flush()</h2> 452 453<div class="memitem"> 454<div class="memproto"> 455<table class="mlabels"> 456 <tr> 457 <td class="mlabels-left"> 458 <table class="memname"> 459 <tr> 460 <td class="memname">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> oboe::AudioStream::flush </td> 461 <td>(</td> 462 <td class="paramtype">int64_t </td> 463 <td class="paramname"><em>timeoutNanoseconds</em> = <code><a class="el" href="namespaceoboe.html#aab8f5f081a8b2147e16ec920347c1b5c">kDefaultTimeoutNanos</a></code></td><td>)</td> 464 <td></td> 465 </tr> 466 </table> 467 </td> 468 <td class="mlabels-right"> 469<span class="mlabels"><span class="mlabel">virtual</span></span> </td> 470 </tr> 471</table> 472</div><div class="memdoc"> 473<p>Flush the stream. This will block until the stream has been flushed, an error occurs or <code>timeoutNanoseconds</code> has been reached. </p> 474 475</div> 476</div> 477<a id="a2b7a3cee7444114843dbdd1fc705f6bb"></a> 478<h2 class="memtitle"><span class="permalink"><a href="#a2b7a3cee7444114843dbdd1fc705f6bb">◆ </a></span>getAudioApi()</h2> 479 480<div class="memitem"> 481<div class="memproto"> 482<table class="mlabels"> 483 <tr> 484 <td class="mlabels-left"> 485 <table class="memname"> 486 <tr> 487 <td class="memname">virtual <a class="el" href="namespaceoboe.html#a92972414867c81d5974cb2ed7abefbf6">AudioApi</a> oboe::AudioStream::getAudioApi </td> 488 <td>(</td> 489 <td class="paramname"></td><td>)</td> 490 <td> const</td> 491 </tr> 492 </table> 493 </td> 494 <td class="mlabels-right"> 495<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td> 496 </tr> 497</table> 498</div><div class="memdoc"> 499<p>Get the underlying audio API which the stream uses.</p> 500<dl class="section return"><dt>Returns</dt><dd>the API that this stream uses. </dd></dl> 501 502</div> 503</div> 504<a id="afa35ee4b8629fbffe26b9be7c7ed55d2"></a> 505<h2 class="memtitle"><span class="permalink"><a href="#afa35ee4b8629fbffe26b9be7c7ed55d2">◆ </a></span>getAvailableFrames()</h2> 506 507<div class="memitem"> 508<div class="memproto"> 509 <table class="memname"> 510 <tr> 511 <td class="memname"><a class="el" href="classoboe_1_1_result_with_value.html">ResultWithValue</a><int32_t> oboe::AudioStream::getAvailableFrames </td> 512 <td>(</td> 513 <td class="paramname"></td><td>)</td> 514 <td></td> 515 </tr> 516 </table> 517</div><div class="memdoc"> 518<dl class="section return"><dt>Returns</dt><dd>number of frames of data currently in the buffer </dd></dl> 519 520</div> 521</div> 522<a id="a5c01907a59d5f89a5e4b819fe66b08bc"></a> 523<h2 class="memtitle"><span class="permalink"><a href="#a5c01907a59d5f89a5e4b819fe66b08bc">◆ </a></span>getBytesPerFrame()</h2> 524 525<div class="memitem"> 526<div class="memproto"> 527<table class="mlabels"> 528 <tr> 529 <td class="mlabels-left"> 530 <table class="memname"> 531 <tr> 532 <td class="memname">int32_t oboe::AudioStream::getBytesPerFrame </td> 533 <td>(</td> 534 <td class="paramname"></td><td>)</td> 535 <td> const</td> 536 </tr> 537 </table> 538 </td> 539 <td class="mlabels-right"> 540<span class="mlabels"><span class="mlabel">inline</span></span> </td> 541 </tr> 542</table> 543</div><div class="memdoc"> 544<p>Get the number of bytes in each audio frame. This is calculated using the channel count and the sample format. For example, a 2 channel floating point stream will have 2 * 4 = 8 bytes per frame.</p> 545<dl class="section return"><dt>Returns</dt><dd>number of bytes in each audio frame. </dd></dl> 546 547</div> 548</div> 549<a id="a44dda61e6e948e49b68f87172f084d62"></a> 550<h2 class="memtitle"><span class="permalink"><a href="#a44dda61e6e948e49b68f87172f084d62">◆ </a></span>getBytesPerSample()</h2> 551 552<div class="memitem"> 553<div class="memproto"> 554 <table class="memname"> 555 <tr> 556 <td class="memname">int32_t oboe::AudioStream::getBytesPerSample </td> 557 <td>(</td> 558 <td class="paramname"></td><td>)</td> 559 <td> const</td> 560 </tr> 561 </table> 562</div><div class="memdoc"> 563<p>Get the number of bytes per sample. This is calculated using the sample format. For example, a stream using 16-bit integer samples will have 2 bytes per sample.</p> 564<dl class="section return"><dt>Returns</dt><dd>the number of bytes per sample. </dd></dl> 565 566</div> 567</div> 568<a id="ac160acb656515814fa6fdd157c131a0a"></a> 569<h2 class="memtitle"><span class="permalink"><a href="#ac160acb656515814fa6fdd157c131a0a">◆ </a></span>getFramesPerBurst()</h2> 570 571<div class="memitem"> 572<div class="memproto"> 573<table class="mlabels"> 574 <tr> 575 <td class="mlabels-left"> 576 <table class="memname"> 577 <tr> 578 <td class="memname">virtual int32_t oboe::AudioStream::getFramesPerBurst </td> 579 <td>(</td> 580 <td class="paramname"></td><td>)</td> 581 <td></td> 582 </tr> 583 </table> 584 </td> 585 <td class="mlabels-right"> 586<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td> 587 </tr> 588</table> 589</div><div class="memdoc"> 590<p>Query the number of frames that are read or written by the endpoint at one time.</p> 591<dl class="section return"><dt>Returns</dt><dd>burst size </dd></dl> 592 593</div> 594</div> 595<a id="aeebfc59abd978cd6dff07c16cfe266df"></a> 596<h2 class="memtitle"><span class="permalink"><a href="#aeebfc59abd978cd6dff07c16cfe266df">◆ </a></span>getFramesRead()</h2> 597 598<div class="memitem"> 599<div class="memproto"> 600<table class="mlabels"> 601 <tr> 602 <td class="mlabels-left"> 603 <table class="memname"> 604 <tr> 605 <td class="memname">virtual int64_t oboe::AudioStream::getFramesRead </td> 606 <td>(</td> 607 <td class="paramname"></td><td>)</td> 608 <td></td> 609 </tr> 610 </table> 611 </td> 612 <td class="mlabels-right"> 613<span class="mlabels"><span class="mlabel">virtual</span></span> </td> 614 </tr> 615</table> 616</div><div class="memdoc"> 617<p>The number of audio frames read from the stream. This monotonic counter will never get reset.</p> 618<dl class="section return"><dt>Returns</dt><dd>the number of frames read so far </dd></dl> 619 620</div> 621</div> 622<a id="ab43dd4074e1de57bac1c3fd111430341"></a> 623<h2 class="memtitle"><span class="permalink"><a href="#ab43dd4074e1de57bac1c3fd111430341">◆ </a></span>getFramesWritten()</h2> 624 625<div class="memitem"> 626<div class="memproto"> 627<table class="mlabels"> 628 <tr> 629 <td class="mlabels-left"> 630 <table class="memname"> 631 <tr> 632 <td class="memname">virtual int64_t oboe::AudioStream::getFramesWritten </td> 633 <td>(</td> 634 <td class="paramname"></td><td>)</td> 635 <td></td> 636 </tr> 637 </table> 638 </td> 639 <td class="mlabels-right"> 640<span class="mlabels"><span class="mlabel">virtual</span></span> </td> 641 </tr> 642</table> 643</div><div class="memdoc"> 644<p>The number of audio frames written into the stream. This monotonic counter will never get reset.</p> 645<dl class="section return"><dt>Returns</dt><dd>the number of frames written so far </dd></dl> 646 647</div> 648</div> 649<a id="a8fe8afdf164a1fe835c514f709743d75"></a> 650<h2 class="memtitle"><span class="permalink"><a href="#a8fe8afdf164a1fe835c514f709743d75">◆ </a></span>getLastErrorCallbackResult()</h2> 651 652<div class="memitem"> 653<div class="memproto"> 654<table class="mlabels"> 655 <tr> 656 <td class="mlabels-left"> 657 <table class="memname"> 658 <tr> 659 <td class="memname">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">oboe::Result</a> oboe::AudioStream::getLastErrorCallbackResult </td> 660 <td>(</td> 661 <td class="paramname"></td><td>)</td> 662 <td> const</td> 663 </tr> 664 </table> 665 </td> 666 <td class="mlabels-right"> 667<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td> 668 </tr> 669</table> 670</div><div class="memdoc"> 671<dl class="section return"><dt>Returns</dt><dd>last result passed from an error callback </dd></dl> 672 673</div> 674</div> 675<a id="a9d37cc6513823c685ae892626ff83ea8"></a> 676<h2 class="memtitle"><span class="permalink"><a href="#a9d37cc6513823c685ae892626ff83ea8">◆ </a></span>getState()</h2> 677 678<div class="memitem"> 679<div class="memproto"> 680<table class="mlabels"> 681 <tr> 682 <td class="mlabels-left"> 683 <table class="memname"> 684 <tr> 685 <td class="memname">virtual <a class="el" href="namespaceoboe.html#a89fa2ce046723764618c29db737917f6">StreamState</a> oboe::AudioStream::getState </td> 686 <td>(</td> 687 <td class="paramname"></td><td>)</td> 688 <td> const</td> 689 </tr> 690 </table> 691 </td> 692 <td class="mlabels-right"> 693<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td> 694 </tr> 695</table> 696</div><div class="memdoc"> 697<p>Query the current state, eg. StreamState::Pausing</p> 698<dl class="section return"><dt>Returns</dt><dd>state or a negative error. </dd></dl> 699 700</div> 701</div> 702<a id="acb8edbc17ff79993a8ed996d216fe6f3"></a> 703<h2 class="memtitle"><span class="permalink"><a href="#acb8edbc17ff79993a8ed996d216fe6f3">◆ </a></span>getTimestamp() <span class="overload">[1/2]</span></h2> 704 705<div class="memitem"> 706<div class="memproto"> 707<table class="mlabels"> 708 <tr> 709 <td class="mlabels-left"> 710 <table class="memname"> 711 <tr> 712 <td class="memname">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> oboe::AudioStream::getTimestamp </td> 713 <td>(</td> 714 <td class="paramtype">clockid_t </td> 715 <td class="paramname">, </td> 716 </tr> 717 <tr> 718 <td class="paramkey"></td> 719 <td></td> 720 <td class="paramtype">int64_t * </td> 721 <td class="paramname">, </td> 722 </tr> 723 <tr> 724 <td class="paramkey"></td> 725 <td></td> 726 <td class="paramtype">int64_t * </td> 727 <td class="paramname"> </td> 728 </tr> 729 <tr> 730 <td></td> 731 <td>)</td> 732 <td></td><td></td> 733 </tr> 734 </table> 735 </td> 736 <td class="mlabels-right"> 737<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td> 738 </tr> 739</table> 740</div><div class="memdoc"> 741<p>Get the estimated time that the frame at <code>framePosition</code> entered or left the audio processing pipeline.</p> 742<p>This can be used to coordinate events and interactions with the external environment, and to estimate the latency of an audio stream. An example of usage can be found in the hello-oboe sample (search for "calculateCurrentOutputLatencyMillis").</p> 743<p>The time is based on the implementation's best effort, using whatever knowledge is available to the system, but cannot account for any delay unknown to the implementation.</p> 744<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>since 1.0, use <a class="el" href="classoboe_1_1_audio_stream.html#a49254e6b1b19cb6d0ca6c63058029771">AudioStream::getTimestamp(clockid_t clockId)</a> instead, which returns <a class="el" href="classoboe_1_1_result_with_value.html">ResultWithValue</a> </dd></dl> 745<dl class="params"><dt>Parameters</dt><dd> 746 <table class="params"> 747 <tr><td class="paramname">clockId</td><td>the type of clock to use e.g. CLOCK_MONOTONIC </td></tr> 748 <tr><td class="paramname">framePosition</td><td>the frame number to query </td></tr> 749 <tr><td class="paramname">timeNanoseconds</td><td>an output parameter which will contain the presentation timestamp </td></tr> 750 </table> 751 </dd> 752</dl> 753 754</div> 755</div> 756<a id="a49254e6b1b19cb6d0ca6c63058029771"></a> 757<h2 class="memtitle"><span class="permalink"><a href="#a49254e6b1b19cb6d0ca6c63058029771">◆ </a></span>getTimestamp() <span class="overload">[2/2]</span></h2> 758 759<div class="memitem"> 760<div class="memproto"> 761<table class="mlabels"> 762 <tr> 763 <td class="mlabels-left"> 764 <table class="memname"> 765 <tr> 766 <td class="memname">virtual <a class="el" href="classoboe_1_1_result_with_value.html">ResultWithValue</a><<a class="el" href="structoboe_1_1_frame_timestamp.html">FrameTimestamp</a>> oboe::AudioStream::getTimestamp </td> 767 <td>(</td> 768 <td class="paramtype">clockid_t </td> 769 <td class="paramname"></td><td>)</td> 770 <td></td> 771 </tr> 772 </table> 773 </td> 774 <td class="mlabels-right"> 775<span class="mlabels"><span class="mlabel">virtual</span></span> </td> 776 </tr> 777</table> 778</div><div class="memdoc"> 779<p>Get the estimated time that the frame at <code>framePosition</code> entered or left the audio processing pipeline.</p> 780<p>This can be used to coordinate events and interactions with the external environment, and to estimate the latency of an audio stream. An example of usage can be found in the hello-oboe sample (search for "calculateCurrentOutputLatencyMillis").</p> 781<p>The time is based on the implementation's best effort, using whatever knowledge is available to the system, but cannot account for any delay unknown to the implementation.</p> 782<dl class="params"><dt>Parameters</dt><dd> 783 <table class="params"> 784 <tr><td class="paramname">clockId</td><td>the type of clock to use e.g. CLOCK_MONOTONIC </td></tr> 785 </table> 786 </dd> 787</dl> 788<dl class="section return"><dt>Returns</dt><dd>a <a class="el" href="structoboe_1_1_frame_timestamp.html">FrameTimestamp</a> containing the position and time at which a particular audio frame entered or left the audio processing pipeline, or an error if the operation failed. </dd></dl> 789 790</div> 791</div> 792<a id="a5458d7130415eb4defe3dbc11d479e2f"></a> 793<h2 class="memtitle"><span class="permalink"><a href="#a5458d7130415eb4defe3dbc11d479e2f">◆ </a></span>getUnderlyingStream()</h2> 794 795<div class="memitem"> 796<div class="memproto"> 797<table class="mlabels"> 798 <tr> 799 <td class="mlabels-left"> 800 <table class="memname"> 801 <tr> 802 <td class="memname">virtual void* oboe::AudioStream::getUnderlyingStream </td> 803 <td>(</td> 804 <td class="paramname"></td><td>)</td> 805 <td> const</td> 806 </tr> 807 </table> 808 </td> 809 <td class="mlabels-right"> 810<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td> 811 </tr> 812</table> 813</div><div class="memdoc"> 814<p>Only for debugging. Do not use in production. If you need to call this method something is wrong. If you think you need it for production then please let us know so we can modify Oboe so that you don't need this.</p> 815<dl class="section return"><dt>Returns</dt><dd>nullptr or a pointer to a stream from the system API </dd></dl> 816 817</div> 818</div> 819<a id="ad1a1d3bbf3b348ed92b7ed18ce9cc261"></a> 820<h2 class="memtitle"><span class="permalink"><a href="#ad1a1d3bbf3b348ed92b7ed18ce9cc261">◆ </a></span>getXRunCount()</h2> 821 822<div class="memitem"> 823<div class="memproto"> 824<table class="mlabels"> 825 <tr> 826 <td class="mlabels-left"> 827 <table class="memname"> 828 <tr> 829 <td class="memname">virtual <a class="el" href="classoboe_1_1_result_with_value.html">ResultWithValue</a><int32_t> oboe::AudioStream::getXRunCount </td> 830 <td>(</td> 831 <td class="paramname"></td><td>)</td> 832 <td> const</td> 833 </tr> 834 </table> 835 </td> 836 <td class="mlabels-right"> 837<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td> 838 </tr> 839</table> 840</div><div class="memdoc"> 841<p>An XRun is an Underrun or an Overrun. During playing, an underrun will occur if the stream is not written in time and the system runs out of valid data. During recording, an overrun will occur if the stream is not read in time and there is no place to put the incoming data so it is discarded.</p> 842<p>An underrun or overrun can cause an audible "pop" or "glitch".</p> 843<dl class="section return"><dt>Returns</dt><dd>a result which is either Result::OK with the xRun count as the value, or a Result::Error* code </dd></dl> 844 845</div> 846</div> 847<a id="add85011ba825f74931deeb92c5edf831"></a> 848<h2 class="memtitle"><span class="permalink"><a href="#add85011ba825f74931deeb92c5edf831">◆ </a></span>isDataCallbackEnabled()</h2> 849 850<div class="memitem"> 851<div class="memproto"> 852<table class="mlabels"> 853 <tr> 854 <td class="mlabels-left"> 855 <table class="memname"> 856 <tr> 857 <td class="memname">bool oboe::AudioStream::isDataCallbackEnabled </td> 858 <td>(</td> 859 <td class="paramname"></td><td>)</td> 860 <td></td> 861 </tr> 862 </table> 863 </td> 864 <td class="mlabels-right"> 865<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span> </td> 866 </tr> 867</table> 868</div><div class="memdoc"> 869<dl class="section return"><dt>Returns</dt><dd>true if callbacks may be called </dd></dl> 870 871</div> 872</div> 873<a id="a43d8a098440cde28f4ee8bedd6d107c4"></a> 874<h2 class="memtitle"><span class="permalink"><a href="#a43d8a098440cde28f4ee8bedd6d107c4">◆ </a></span>isXRunCountSupported()</h2> 875 876<div class="memitem"> 877<div class="memproto"> 878<table class="mlabels"> 879 <tr> 880 <td class="mlabels-left"> 881 <table class="memname"> 882 <tr> 883 <td class="memname">virtual bool oboe::AudioStream::isXRunCountSupported </td> 884 <td>(</td> 885 <td class="paramname"></td><td>)</td> 886 <td> const</td> 887 </tr> 888 </table> 889 </td> 890 <td class="mlabels-right"> 891<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td> 892 </tr> 893</table> 894</div><div class="memdoc"> 895<dl class="section return"><dt>Returns</dt><dd>true if XRun counts are supported on the stream </dd></dl> 896 897</div> 898</div> 899<a id="aa5f4801cca6877eeaa4735b93933269d"></a> 900<h2 class="memtitle"><span class="permalink"><a href="#aa5f4801cca6877eeaa4735b93933269d">◆ </a></span>launchStopThread()</h2> 901 902<div class="memitem"> 903<div class="memproto"> 904 <table class="memname"> 905 <tr> 906 <td class="memname">void oboe::AudioStream::launchStopThread </td> 907 <td>(</td> 908 <td class="paramname"></td><td>)</td> 909 <td></td> 910 </tr> 911 </table> 912</div><div class="memdoc"> 913<p>Launch a thread that will stop the stream. </p> 914 915</div> 916</div> 917<a id="a0ea79e60f5a3d29fc5a1a116aba11dfe"></a> 918<h2 class="memtitle"><span class="permalink"><a href="#a0ea79e60f5a3d29fc5a1a116aba11dfe">◆ </a></span>onDefaultCallback()</h2> 919 920<div class="memitem"> 921<div class="memproto"> 922<table class="mlabels"> 923 <tr> 924 <td class="mlabels-left"> 925 <table class="memname"> 926 <tr> 927 <td class="memname">virtual <a class="el" href="namespaceoboe.html#af85fc9910a287df6c5df0ed396bb75cd">DataCallbackResult</a> oboe::AudioStream::onDefaultCallback </td> 928 <td>(</td> 929 <td class="paramtype">void * </td> 930 <td class="paramname">, </td> 931 </tr> 932 <tr> 933 <td class="paramkey"></td> 934 <td></td> 935 <td class="paramtype">int </td> 936 <td class="paramname"> </td> 937 </tr> 938 <tr> 939 <td></td> 940 <td>)</td> 941 <td></td><td></td> 942 </tr> 943 </table> 944 </td> 945 <td class="mlabels-right"> 946<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td> 947 </tr> 948</table> 949</div><div class="memdoc"> 950<p>Override this to provide a default for when the application did not specify a callback.</p> 951<dl class="params"><dt>Parameters</dt><dd> 952 <table class="params"> 953 <tr><td class="paramname">audioData</td><td></td></tr> 954 <tr><td class="paramname">numFrames</td><td></td></tr> 955 </table> 956 </dd> 957</dl> 958<dl class="section return"><dt>Returns</dt><dd>result </dd></dl> 959 960</div> 961</div> 962<a id="a686c6ce8a29051c858fd1de386805dc6"></a> 963<h2 class="memtitle"><span class="permalink"><a href="#a686c6ce8a29051c858fd1de386805dc6">◆ </a></span>open()</h2> 964 965<div class="memitem"> 966<div class="memproto"> 967<table class="mlabels"> 968 <tr> 969 <td class="mlabels-left"> 970 <table class="memname"> 971 <tr> 972 <td class="memname">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> oboe::AudioStream::open </td> 973 <td>(</td> 974 <td class="paramname"></td><td>)</td> 975 <td></td> 976 </tr> 977 </table> 978 </td> 979 <td class="mlabels-right"> 980<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td> 981 </tr> 982</table> 983</div><div class="memdoc"> 984<p>Open a stream based on the current settings.</p> 985<p>Note that we do not recommend re-opening a stream that has been closed. TODO Should we prevent re-opening?</p> 986<dl class="section return"><dt>Returns</dt><dd></dd></dl> 987 988</div> 989</div> 990<a id="a04f29836748a8e5842aef2be200022ad"></a> 991<h2 class="memtitle"><span class="permalink"><a href="#a04f29836748a8e5842aef2be200022ad">◆ </a></span>pause()</h2> 992 993<div class="memitem"> 994<div class="memproto"> 995<table class="mlabels"> 996 <tr> 997 <td class="mlabels-left"> 998 <table class="memname"> 999 <tr> 1000 <td class="memname">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> oboe::AudioStream::pause </td> 1001 <td>(</td> 1002 <td class="paramtype">int64_t </td> 1003 <td class="paramname"><em>timeoutNanoseconds</em> = <code><a class="el" href="namespaceoboe.html#aab8f5f081a8b2147e16ec920347c1b5c">kDefaultTimeoutNanos</a></code></td><td>)</td> 1004 <td></td> 1005 </tr> 1006 </table> 1007 </td> 1008 <td class="mlabels-right"> 1009<span class="mlabels"><span class="mlabel">virtual</span></span> </td> 1010 </tr> 1011</table> 1012</div><div class="memdoc"> 1013<p>Pause the stream. This will block until the stream has been paused, an error occurs or <code>timeoutNanoseconds</code> has been reached. </p> 1014 1015</div> 1016</div> 1017<a id="a8089f0a0cb68d4039cf33e6584129978"></a> 1018<h2 class="memtitle"><span class="permalink"><a href="#a8089f0a0cb68d4039cf33e6584129978">◆ </a></span>read()</h2> 1019 1020<div class="memitem"> 1021<div class="memproto"> 1022<table class="mlabels"> 1023 <tr> 1024 <td class="mlabels-left"> 1025 <table class="memname"> 1026 <tr> 1027 <td class="memname">virtual <a class="el" href="classoboe_1_1_result_with_value.html">ResultWithValue</a><int32_t> oboe::AudioStream::read </td> 1028 <td>(</td> 1029 <td class="paramtype">void * </td> 1030 <td class="paramname">, </td> 1031 </tr> 1032 <tr> 1033 <td class="paramkey"></td> 1034 <td></td> 1035 <td class="paramtype">int32_t </td> 1036 <td class="paramname">, </td> 1037 </tr> 1038 <tr> 1039 <td class="paramkey"></td> 1040 <td></td> 1041 <td class="paramtype">int64_t </td> 1042 <td class="paramname"> </td> 1043 </tr> 1044 <tr> 1045 <td></td> 1046 <td>)</td> 1047 <td></td><td></td> 1048 </tr> 1049 </table> 1050 </td> 1051 <td class="mlabels-right"> 1052<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td> 1053 </tr> 1054</table> 1055</div><div class="memdoc"> 1056<p>Read data into the supplied buffer from the stream. This method will block until the read is complete or it runs out of time.</p> 1057<p>If <code>timeoutNanoseconds</code> is zero then this call will not wait.</p> 1058<dl class="params"><dt>Parameters</dt><dd> 1059 <table class="params"> 1060 <tr><td class="paramname">buffer</td><td>The address of the first sample. </td></tr> 1061 <tr><td class="paramname">numFrames</td><td>Number of frames to read. Only complete frames will be read. </td></tr> 1062 <tr><td class="paramname">timeoutNanoseconds</td><td>Maximum number of nanoseconds to wait for completion. </td></tr> 1063 </table> 1064 </dd> 1065</dl> 1066<dl class="section return"><dt>Returns</dt><dd>a <a class="el" href="classoboe_1_1_result_with_value.html">ResultWithValue</a> which has a result of Result::OK and a value containing the number of frames actually read, or result of Result::Error*. </dd></dl> 1067 1068</div> 1069</div> 1070<a id="a6bd5d633ff999e4da1faf3cd949aa602"></a> 1071<h2 class="memtitle"><span class="permalink"><a href="#a6bd5d633ff999e4da1faf3cd949aa602">◆ </a></span>requestFlush()</h2> 1072 1073<div class="memitem"> 1074<div class="memproto"> 1075<table class="mlabels"> 1076 <tr> 1077 <td class="mlabels-left"> 1078 <table class="memname"> 1079 <tr> 1080 <td class="memname">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> oboe::AudioStream::requestFlush </td> 1081 <td>(</td> 1082 <td class="paramname"></td><td>)</td> 1083 <td></td> 1084 </tr> 1085 </table> 1086 </td> 1087 <td class="mlabels-right"> 1088<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td> 1089 </tr> 1090</table> 1091</div><div class="memdoc"> 1092<p>Flush the stream asynchronously. Returns immediately (does not block). Equivalent to calling <code>flush(0)</code>. </p> 1093 1094</div> 1095</div> 1096<a id="a7f18bb3cc5490fd7fbc1f6da63c730f6"></a> 1097<h2 class="memtitle"><span class="permalink"><a href="#a7f18bb3cc5490fd7fbc1f6da63c730f6">◆ </a></span>requestPause()</h2> 1098 1099<div class="memitem"> 1100<div class="memproto"> 1101<table class="mlabels"> 1102 <tr> 1103 <td class="mlabels-left"> 1104 <table class="memname"> 1105 <tr> 1106 <td class="memname">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> oboe::AudioStream::requestPause </td> 1107 <td>(</td> 1108 <td class="paramname"></td><td>)</td> 1109 <td></td> 1110 </tr> 1111 </table> 1112 </td> 1113 <td class="mlabels-right"> 1114<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td> 1115 </tr> 1116</table> 1117</div><div class="memdoc"> 1118<p>Pause the stream asynchronously. Returns immediately (does not block). Equivalent to calling <code>pause(0)</code>. </p> 1119 1120</div> 1121</div> 1122<a id="a3c484e314dee8dfed1d419f487b5d601"></a> 1123<h2 class="memtitle"><span class="permalink"><a href="#a3c484e314dee8dfed1d419f487b5d601">◆ </a></span>requestStart()</h2> 1124 1125<div class="memitem"> 1126<div class="memproto"> 1127<table class="mlabels"> 1128 <tr> 1129 <td class="mlabels-left"> 1130 <table class="memname"> 1131 <tr> 1132 <td class="memname">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> oboe::AudioStream::requestStart </td> 1133 <td>(</td> 1134 <td class="paramname"></td><td>)</td> 1135 <td></td> 1136 </tr> 1137 </table> 1138 </td> 1139 <td class="mlabels-right"> 1140<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td> 1141 </tr> 1142</table> 1143</div><div class="memdoc"> 1144<p>Start the stream asynchronously. Returns immediately (does not block). Equivalent to calling <code>start(0)</code>. </p> 1145 1146</div> 1147</div> 1148<a id="a820e634f741e6b5efdcef8104cecb919"></a> 1149<h2 class="memtitle"><span class="permalink"><a href="#a820e634f741e6b5efdcef8104cecb919">◆ </a></span>requestStop()</h2> 1150 1151<div class="memitem"> 1152<div class="memproto"> 1153<table class="mlabels"> 1154 <tr> 1155 <td class="mlabels-left"> 1156 <table class="memname"> 1157 <tr> 1158 <td class="memname">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> oboe::AudioStream::requestStop </td> 1159 <td>(</td> 1160 <td class="paramname"></td><td>)</td> 1161 <td></td> 1162 </tr> 1163 </table> 1164 </td> 1165 <td class="mlabels-right"> 1166<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td> 1167 </tr> 1168</table> 1169</div><div class="memdoc"> 1170<p>Stop the stream asynchronously. Returns immediately (does not block). Equivalent to calling <code>stop(0)</code>. </p> 1171 1172</div> 1173</div> 1174<a id="a06e3f9e133b3a75515e7793939d1cd03"></a> 1175<h2 class="memtitle"><span class="permalink"><a href="#a06e3f9e133b3a75515e7793939d1cd03">◆ </a></span>setBufferSizeInFrames()</h2> 1176 1177<div class="memitem"> 1178<div class="memproto"> 1179<table class="mlabels"> 1180 <tr> 1181 <td class="mlabels-left"> 1182 <table class="memname"> 1183 <tr> 1184 <td class="memname">virtual <a class="el" href="classoboe_1_1_result_with_value.html">ResultWithValue</a><int32_t> oboe::AudioStream::setBufferSizeInFrames </td> 1185 <td>(</td> 1186 <td class="paramtype">int32_t </td> 1187 <td class="paramname"></td><td>)</td> 1188 <td></td> 1189 </tr> 1190 </table> 1191 </td> 1192 <td class="mlabels-right"> 1193<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td> 1194 </tr> 1195</table> 1196</div><div class="memdoc"> 1197<p>This can be used to adjust the latency of the buffer by changing the threshold where blocking will occur. By combining this with <a class="el" href="classoboe_1_1_audio_stream.html#ad1a1d3bbf3b348ed92b7ed18ce9cc261">getXRunCount()</a>, the latency can be tuned at run-time for each device.</p> 1198<p>This cannot be set higher than getBufferCapacity().</p> 1199<dl class="params"><dt>Parameters</dt><dd> 1200 <table class="params"> 1201 <tr><td class="paramname">requestedFrames</td><td>requested number of frames that can be filled without blocking </td></tr> 1202 </table> 1203 </dd> 1204</dl> 1205<dl class="section return"><dt>Returns</dt><dd>the resulting buffer size in frames (obtained using value()) or an error (obtained using error()) </dd></dl> 1206 1207</div> 1208</div> 1209<a id="a0faa6d3a6fd4f367e6f80d5a29e6dcba"></a> 1210<h2 class="memtitle"><span class="permalink"><a href="#a0faa6d3a6fd4f367e6f80d5a29e6dcba">◆ </a></span>setDataCallbackEnabled()</h2> 1211 1212<div class="memitem"> 1213<div class="memproto"> 1214<table class="mlabels"> 1215 <tr> 1216 <td class="mlabels-left"> 1217 <table class="memname"> 1218 <tr> 1219 <td class="memname">void oboe::AudioStream::setDataCallbackEnabled </td> 1220 <td>(</td> 1221 <td class="paramtype">bool </td> 1222 <td class="paramname"><em>enabled</em></td><td>)</td> 1223 <td></td> 1224 </tr> 1225 </table> 1226 </td> 1227 <td class="mlabels-right"> 1228<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span> </td> 1229 </tr> 1230</table> 1231</div><div class="memdoc"> 1232<p>This can be set false internally to prevent callbacks after DataCallbackResult::Stop has been returned. </p> 1233 1234</div> 1235</div> 1236<a id="af04f03eb6b64b564f1c4401688987d21"></a> 1237<h2 class="memtitle"><span class="permalink"><a href="#af04f03eb6b64b564f1c4401688987d21">◆ </a></span>start()</h2> 1238 1239<div class="memitem"> 1240<div class="memproto"> 1241<table class="mlabels"> 1242 <tr> 1243 <td class="mlabels-left"> 1244 <table class="memname"> 1245 <tr> 1246 <td class="memname">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> oboe::AudioStream::start </td> 1247 <td>(</td> 1248 <td class="paramtype">int64_t </td> 1249 <td class="paramname"><em>timeoutNanoseconds</em> = <code><a class="el" href="namespaceoboe.html#aab8f5f081a8b2147e16ec920347c1b5c">kDefaultTimeoutNanos</a></code></td><td>)</td> 1250 <td></td> 1251 </tr> 1252 </table> 1253 </td> 1254 <td class="mlabels-right"> 1255<span class="mlabels"><span class="mlabel">virtual</span></span> </td> 1256 </tr> 1257</table> 1258</div><div class="memdoc"> 1259<p>Start the stream. This will block until the stream has been started, an error occurs or <code>timeoutNanoseconds</code> has been reached. </p> 1260 1261</div> 1262</div> 1263<a id="aec093859d42f0470c884edd1e976d9f3"></a> 1264<h2 class="memtitle"><span class="permalink"><a href="#aec093859d42f0470c884edd1e976d9f3">◆ </a></span>stop()</h2> 1265 1266<div class="memitem"> 1267<div class="memproto"> 1268<table class="mlabels"> 1269 <tr> 1270 <td class="mlabels-left"> 1271 <table class="memname"> 1272 <tr> 1273 <td class="memname">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> oboe::AudioStream::stop </td> 1274 <td>(</td> 1275 <td class="paramtype">int64_t </td> 1276 <td class="paramname"><em>timeoutNanoseconds</em> = <code><a class="el" href="namespaceoboe.html#aab8f5f081a8b2147e16ec920347c1b5c">kDefaultTimeoutNanos</a></code></td><td>)</td> 1277 <td></td> 1278 </tr> 1279 </table> 1280 </td> 1281 <td class="mlabels-right"> 1282<span class="mlabels"><span class="mlabel">virtual</span></span> </td> 1283 </tr> 1284</table> 1285</div><div class="memdoc"> 1286<p>Stop the stream. This will block until the stream has been stopped, an error occurs or <code>timeoutNanoseconds</code> has been reached. </p> 1287 1288</div> 1289</div> 1290<a id="a462358ddab709c79d1a7968d6d55b727"></a> 1291<h2 class="memtitle"><span class="permalink"><a href="#a462358ddab709c79d1a7968d6d55b727">◆ </a></span>updateFramesRead()</h2> 1292 1293<div class="memitem"> 1294<div class="memproto"> 1295<table class="mlabels"> 1296 <tr> 1297 <td class="mlabels-left"> 1298 <table class="memname"> 1299 <tr> 1300 <td class="memname">virtual void oboe::AudioStream::updateFramesRead </td> 1301 <td>(</td> 1302 <td class="paramname"></td><td>)</td> 1303 <td></td> 1304 </tr> 1305 </table> 1306 </td> 1307 <td class="mlabels-right"> 1308<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td> 1309 </tr> 1310</table> 1311</div><div class="memdoc"> 1312<p>Update mFramesRead. For internal use only. </p> 1313 1314</div> 1315</div> 1316<a id="a64ad978c5f70ced17ef5a96605496515"></a> 1317<h2 class="memtitle"><span class="permalink"><a href="#a64ad978c5f70ced17ef5a96605496515">◆ </a></span>updateFramesWritten()</h2> 1318 1319<div class="memitem"> 1320<div class="memproto"> 1321<table class="mlabels"> 1322 <tr> 1323 <td class="mlabels-left"> 1324 <table class="memname"> 1325 <tr> 1326 <td class="memname">virtual void oboe::AudioStream::updateFramesWritten </td> 1327 <td>(</td> 1328 <td class="paramname"></td><td>)</td> 1329 <td></td> 1330 </tr> 1331 </table> 1332 </td> 1333 <td class="mlabels-right"> 1334<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td> 1335 </tr> 1336</table> 1337</div><div class="memdoc"> 1338<p>Update mFramesWritten. For internal use only. </p> 1339 1340</div> 1341</div> 1342<a id="a15cdaaaa4c1e8da322d6da33334c8147"></a> 1343<h2 class="memtitle"><span class="permalink"><a href="#a15cdaaaa4c1e8da322d6da33334c8147">◆ </a></span>usesAAudio()</h2> 1344 1345<div class="memitem"> 1346<div class="memproto"> 1347<table class="mlabels"> 1348 <tr> 1349 <td class="mlabels-left"> 1350 <table class="memname"> 1351 <tr> 1352 <td class="memname">bool oboe::AudioStream::usesAAudio </td> 1353 <td>(</td> 1354 <td class="paramname"></td><td>)</td> 1355 <td> const</td> 1356 </tr> 1357 </table> 1358 </td> 1359 <td class="mlabels-right"> 1360<span class="mlabels"><span class="mlabel">inline</span></span> </td> 1361 </tr> 1362</table> 1363</div><div class="memdoc"> 1364<p>Returns true if the underlying audio API is AAudio.</p> 1365<dl class="section return"><dt>Returns</dt><dd>true if this stream is implemented using the AAudio API. </dd></dl> 1366 1367</div> 1368</div> 1369<a id="afddb0962863ccf9ec6672a042fe15941"></a> 1370<h2 class="memtitle"><span class="permalink"><a href="#afddb0962863ccf9ec6672a042fe15941">◆ </a></span>waitForAvailableFrames()</h2> 1371 1372<div class="memitem"> 1373<div class="memproto"> 1374 <table class="memname"> 1375 <tr> 1376 <td class="memname"><a class="el" href="classoboe_1_1_result_with_value.html">ResultWithValue</a><int32_t> oboe::AudioStream::waitForAvailableFrames </td> 1377 <td>(</td> 1378 <td class="paramtype">int32_t </td> 1379 <td class="paramname"><em>numFrames</em>, </td> 1380 </tr> 1381 <tr> 1382 <td class="paramkey"></td> 1383 <td></td> 1384 <td class="paramtype">int64_t </td> 1385 <td class="paramname"><em>timeoutNanoseconds</em> </td> 1386 </tr> 1387 <tr> 1388 <td></td> 1389 <td>)</td> 1390 <td></td><td></td> 1391 </tr> 1392 </table> 1393</div><div class="memdoc"> 1394<p>Wait until the stream has a minimum amount of data available in its buffer. This can be used with an EXCLUSIVE MMAP input stream to avoid reading data too close to the DSP write position, which may cause glitches.</p> 1395<dl class="params"><dt>Parameters</dt><dd> 1396 <table class="params"> 1397 <tr><td class="paramname">numFrames</td><td>minimum frames available </td></tr> 1398 <tr><td class="paramname">timeoutNanoseconds</td><td></td></tr> 1399 </table> 1400 </dd> 1401</dl> 1402<dl class="section return"><dt>Returns</dt><dd>number of frames available, ErrorTimeout </dd></dl> 1403 1404</div> 1405</div> 1406<a id="a0c865a5501f369d959c39d8ab8b46a07"></a> 1407<h2 class="memtitle"><span class="permalink"><a href="#a0c865a5501f369d959c39d8ab8b46a07">◆ </a></span>waitForStateChange()</h2> 1408 1409<div class="memitem"> 1410<div class="memproto"> 1411<table class="mlabels"> 1412 <tr> 1413 <td class="mlabels-left"> 1414 <table class="memname"> 1415 <tr> 1416 <td class="memname">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> oboe::AudioStream::waitForStateChange </td> 1417 <td>(</td> 1418 <td class="paramtype"><a class="el" href="namespaceoboe.html#a89fa2ce046723764618c29db737917f6">StreamState</a> </td> 1419 <td class="paramname"><em>inputState</em>, </td> 1420 </tr> 1421 <tr> 1422 <td class="paramkey"></td> 1423 <td></td> 1424 <td class="paramtype"><a class="el" href="namespaceoboe.html#a89fa2ce046723764618c29db737917f6">StreamState</a> * </td> 1425 <td class="paramname"><em>nextState</em>, </td> 1426 </tr> 1427 <tr> 1428 <td class="paramkey"></td> 1429 <td></td> 1430 <td class="paramtype">int64_t </td> 1431 <td class="paramname"><em>timeoutNanoseconds</em> </td> 1432 </tr> 1433 <tr> 1434 <td></td> 1435 <td>)</td> 1436 <td></td><td></td> 1437 </tr> 1438 </table> 1439 </td> 1440 <td class="mlabels-right"> 1441<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td> 1442 </tr> 1443</table> 1444</div><div class="memdoc"> 1445<p>Wait until the stream's current state no longer matches the input state. The input state is passed to avoid race conditions caused by the state changing between calls.</p> 1446<p>Note that generally applications do not need to call this. It is considered an advanced technique and is mostly used for testing.</p> 1447<pre><code> 1448int64_t timeoutNanos = 500 * kNanosPerMillisecond; // arbitrary 1/2 second 1449StreamState currentState = stream-><a class="el" href="classoboe_1_1_audio_stream.html#a9d37cc6513823c685ae892626ff83ea8">getState()</a>; 1450StreamState nextState = StreamState::Unknown; 1451while (result == Result::OK && currentState != StreamState::Paused) { 1452 result = stream->waitForStateChange( 1453 currentState, &nextState, timeoutNanos); 1454 currentState = nextState; 1455} 1456</code></pre><p>If the state does not change within the timeout period then it will return ErrorTimeout. This is true even if timeoutNanoseconds is zero.</p> 1457<dl class="params"><dt>Parameters</dt><dd> 1458 <table class="params"> 1459 <tr><td class="paramname">inputState</td><td>The state we want to change away from. </td></tr> 1460 <tr><td class="paramname">nextState</td><td>Pointer to a variable that will be set to the new state. </td></tr> 1461 <tr><td class="paramname">timeoutNanoseconds</td><td>The maximum time to wait in nanoseconds. </td></tr> 1462 </table> 1463 </dd> 1464</dl> 1465<dl class="section return"><dt>Returns</dt><dd>Result::OK or a Result::Error. </dd></dl> 1466 1467</div> 1468</div> 1469<a id="a8adbacd6a55a94a532916ab037fba1d6"></a> 1470<h2 class="memtitle"><span class="permalink"><a href="#a8adbacd6a55a94a532916ab037fba1d6">◆ </a></span>waitForStateTransition()</h2> 1471 1472<div class="memitem"> 1473<div class="memproto"> 1474<table class="mlabels"> 1475 <tr> 1476 <td class="mlabels-left"> 1477 <table class="memname"> 1478 <tr> 1479 <td class="memname">virtual <a class="el" href="namespaceoboe.html#a486512e787b609c80ba4436f23929af1">Result</a> oboe::AudioStream::waitForStateTransition </td> 1480 <td>(</td> 1481 <td class="paramtype"><a class="el" href="namespaceoboe.html#a89fa2ce046723764618c29db737917f6">StreamState</a> </td> 1482 <td class="paramname"><em>startingState</em>, </td> 1483 </tr> 1484 <tr> 1485 <td class="paramkey"></td> 1486 <td></td> 1487 <td class="paramtype"><a class="el" href="namespaceoboe.html#a89fa2ce046723764618c29db737917f6">StreamState</a> </td> 1488 <td class="paramname"><em>endingState</em>, </td> 1489 </tr> 1490 <tr> 1491 <td class="paramkey"></td> 1492 <td></td> 1493 <td class="paramtype">int64_t </td> 1494 <td class="paramname"><em>timeoutNanoseconds</em> </td> 1495 </tr> 1496 <tr> 1497 <td></td> 1498 <td>)</td> 1499 <td></td><td></td> 1500 </tr> 1501 </table> 1502 </td> 1503 <td class="mlabels-right"> 1504<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td> 1505 </tr> 1506</table> 1507</div><div class="memdoc"> 1508<p>Wait for a transition from one state to another. </p><dl class="section return"><dt>Returns</dt><dd>OK if the endingState was observed, or ErrorUnexpectedState if any state that was not the startingState or endingState was observed or ErrorTimeout. </dd></dl> 1509 1510</div> 1511</div> 1512<a id="aa48da7bf28026b7cccee73e6b054af28"></a> 1513<h2 class="memtitle"><span class="permalink"><a href="#aa48da7bf28026b7cccee73e6b054af28">◆ </a></span>wasErrorCallbackCalled()</h2> 1514 1515<div class="memitem"> 1516<div class="memproto"> 1517<table class="mlabels"> 1518 <tr> 1519 <td class="mlabels-left"> 1520 <table class="memname"> 1521 <tr> 1522 <td class="memname">bool oboe::AudioStream::wasErrorCallbackCalled </td> 1523 <td>(</td> 1524 <td class="paramname"></td><td>)</td> 1525 <td></td> 1526 </tr> 1527 </table> 1528 </td> 1529 <td class="mlabels-right"> 1530<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span> </td> 1531 </tr> 1532</table> 1533</div><div class="memdoc"> 1534<p>This is used to detect more than one error callback from a stream. These were bugs in some versions of Android that caused multiple error callbacks. Internal bug b/63087953</p> 1535<p>Calling this sets an atomic<bool> true and returns the previous value.</p> 1536<dl class="section return"><dt>Returns</dt><dd>false on first call, true on subsequent calls </dd></dl> 1537 1538</div> 1539</div> 1540<a id="a3612c05ed6b01a213dde67d913c07e11"></a> 1541<h2 class="memtitle"><span class="permalink"><a href="#a3612c05ed6b01a213dde67d913c07e11">◆ </a></span>write()</h2> 1542 1543<div class="memitem"> 1544<div class="memproto"> 1545<table class="mlabels"> 1546 <tr> 1547 <td class="mlabels-left"> 1548 <table class="memname"> 1549 <tr> 1550 <td class="memname">virtual <a class="el" href="classoboe_1_1_result_with_value.html">ResultWithValue</a><int32_t> oboe::AudioStream::write </td> 1551 <td>(</td> 1552 <td class="paramtype">const void * </td> 1553 <td class="paramname">, </td> 1554 </tr> 1555 <tr> 1556 <td class="paramkey"></td> 1557 <td></td> 1558 <td class="paramtype">int32_t </td> 1559 <td class="paramname">, </td> 1560 </tr> 1561 <tr> 1562 <td class="paramkey"></td> 1563 <td></td> 1564 <td class="paramtype">int64_t </td> 1565 <td class="paramname"> </td> 1566 </tr> 1567 <tr> 1568 <td></td> 1569 <td>)</td> 1570 <td></td><td></td> 1571 </tr> 1572 </table> 1573 </td> 1574 <td class="mlabels-right"> 1575<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td> 1576 </tr> 1577</table> 1578</div><div class="memdoc"> 1579<p>Write data from the supplied buffer into the stream. This method will block until the write is complete or it runs out of time.</p> 1580<p>If <code>timeoutNanoseconds</code> is zero then this call will not wait.</p> 1581<dl class="params"><dt>Parameters</dt><dd> 1582 <table class="params"> 1583 <tr><td class="paramname">buffer</td><td>The address of the first sample. </td></tr> 1584 <tr><td class="paramname">numFrames</td><td>Number of frames to write. Only complete frames will be written. </td></tr> 1585 <tr><td class="paramname">timeoutNanoseconds</td><td>Maximum number of nanoseconds to wait for completion. </td></tr> 1586 </table> 1587 </dd> 1588</dl> 1589<dl class="section return"><dt>Returns</dt><dd>a <a class="el" href="classoboe_1_1_result_with_value.html">ResultWithValue</a> which has a result of Result::OK and a value containing the number of frames actually written, or result of Result::Error*. </dd></dl> 1590 1591</div> 1592</div> 1593<h2 class="groupheader">Member Data Documentation</h2> 1594<a id="a07e82f9b9e2e4800f23ae9a7193c3b58"></a> 1595<h2 class="memtitle"><span class="permalink"><a href="#a07e82f9b9e2e4800f23ae9a7193c3b58">◆ </a></span>mFramesRead</h2> 1596 1597<div class="memitem"> 1598<div class="memproto"> 1599<table class="mlabels"> 1600 <tr> 1601 <td class="mlabels-left"> 1602 <table class="memname"> 1603 <tr> 1604 <td class="memname">std::atomic<int64_t> oboe::AudioStream::mFramesRead {}</td> 1605 </tr> 1606 </table> 1607 </td> 1608 <td class="mlabels-right"> 1609<span class="mlabels"><span class="mlabel">protected</span></span> </td> 1610 </tr> 1611</table> 1612</div><div class="memdoc"> 1613<p>Number of frames which have been read from the stream.</p> 1614<p>This is signed integer to match the counters in AAudio. At audio rates, the counter will overflow in about six million years. </p> 1615 1616</div> 1617</div> 1618<a id="a88a63317b7c58815bac074976b00aa23"></a> 1619<h2 class="memtitle"><span class="permalink"><a href="#a88a63317b7c58815bac074976b00aa23">◆ </a></span>mFramesWritten</h2> 1620 1621<div class="memitem"> 1622<div class="memproto"> 1623<table class="mlabels"> 1624 <tr> 1625 <td class="mlabels-left"> 1626 <table class="memname"> 1627 <tr> 1628 <td class="memname">std::atomic<int64_t> oboe::AudioStream::mFramesWritten {}</td> 1629 </tr> 1630 </table> 1631 </td> 1632 <td class="mlabels-right"> 1633<span class="mlabels"><span class="mlabel">protected</span></span> </td> 1634 </tr> 1635</table> 1636</div><div class="memdoc"> 1637<p>Number of frames which have been written into the stream</p> 1638<p>This is signed integer to match the counters in AAudio. At audio rates, the counter will overflow in about six million years. </p> 1639 1640</div> 1641</div> 1642<hr/>The documentation for this class was generated from the following file:<ul> 1643<li>include/oboe/<a class="el" href="_audio_stream_8h_source.html">AudioStream.h</a></li> 1644</ul> 1645</div><!-- contents --> 1646<!-- start footer part --> 1647<hr class="footer"/><address class="footer"><small> 1648Generated by  <a href="http://www.doxygen.org/index.html"> 1649<img class="footer" src="doxygen.png" alt="doxygen"/> 1650</a> 1.8.15 1651</small></address> 1652</body> 1653</html> 1654