-
Notifications
You must be signed in to change notification settings - Fork 2
/
audio.html
162 lines (142 loc) · 11.9 KB
/
audio.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Audio — C++ SDK 2.6.0 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/graphviz.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/custom.css" type="text/css" />
<link rel="shortcut icon" href="../../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Media Recording Events" href="events.html" />
<link rel="prev" title="Encoded Video" href="encoded_video.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home">
C++ SDK
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../index.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../other/getting_started.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../other/run_time_deps.html">Run Time Dependencies</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../other/supported_platforms.html">Supported Platforms</a></li>
<li class="toctree-l1"><a class="reference internal" href="../coresdk.html">Core API</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../media_io.html">Media IO API</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../media_io.html#injection">Injection</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../media_io.html#recording">Recording</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="raw_video.html">Raw Video</a></li>
<li class="toctree-l3"><a class="reference internal" href="encoded_video.html">Encoded Video</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">Audio</a></li>
<li class="toctree-l3"><a class="reference internal" href="events.html">Media Recording Events</a></li>
<li class="toctree-l3"><a class="reference internal" href="example.html">Example Recorder Implementation</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../plugins.html">Plugins</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">C++ SDK</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="../media_io.html">Media IO API</a></li>
<li class="breadcrumb-item active">Audio</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/api/recording/audio.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="audio">
<span id="api-record-audio"></span><h1>Audio<a class="headerlink" href="#audio" title="Permalink to this heading"></a></h1>
<p>#include <dolbyio/comms/media_engine/media_engine.h></p>
<p>The interface for handling incoming audio frames. Applications must set listener which override the virtual function. The
<a class="reference internal" href="#_CPPv4N7dolbyio5comms10audio_sink12handle_audioERKNSt6stringERKNSt6stringEPK7int16_t6size_ti6size_t" title="dolbyio::comms::audio_sink::handle_audio"><code class="xref cpp cpp-func docutils literal notranslate"><span class="pre">handle_audio</span></code></a> function is called with the decoded PCM audio data. When inside a conference the
C++ SDK will receive a single audio stream which contains the mixed audio of all unmuted participants within that conference. The <a class="reference internal" href="#_CPPv4N7dolbyio5comms10audio_sinkE" title="dolbyio::comms::audio_sink"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">Audio</span> <span class="pre">Sink</span></code></a> must be provided to the SDK using the <a class="reference internal" href="../media_io.html#_CPPv4N7dolbyio5comms8services8media_io14set_audio_sinkEP10audio_sink" title="dolbyio::comms::services::media_io::set_audio_sink"><code class="xref cpp cpp-func docutils literal notranslate"><span class="pre">Set</span> <span class="pre">Audio</span> <span class="pre">Sink</span></code></a> function and this must be done before starting a conference.</p>
<dl class="cpp class">
<dt class="sig sig-object cpp" id="_CPPv4N7dolbyio5comms10audio_sinkE">
<span id="_CPPv3N7dolbyio5comms10audio_sinkE"></span><span id="_CPPv2N7dolbyio5comms10audio_sinkE"></span><span id="dolbyio::comms::audio_sink"></span><span class="target" id="classdolbyio_1_1comms_1_1audio__sink"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">audio_sink</span></span></span><a class="headerlink" href="#_CPPv4N7dolbyio5comms10audio_sinkE" title="Permalink to this definition"></a><br /></dt>
<dd><p>The interface for receiving audio frames. </p>
<p>Subclassed by <a class="reference internal" href="../sdk/recorder.html#classdolbyio_1_1comms_1_1plugin_1_1recorder"><span class="std std-ref">dolbyio::comms::plugin::recorder</span></a></p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
<dl class="cpp function">
<dt class="sig sig-object cpp" id="_CPPv4N7dolbyio5comms10audio_sink12handle_audioERKNSt6stringERKNSt6stringEPK7int16_t6size_ti6size_t">
<span id="_CPPv3N7dolbyio5comms10audio_sink12handle_audioERKNSt6stringERKNSt6stringEPK7int16_t6size_ti6size_t"></span><span id="_CPPv2N7dolbyio5comms10audio_sink12handle_audioERKNSt6stringERKNSt6stringEPK7int16_t6size_ti6size_t"></span><span id="dolbyio::comms::audio_sink::handle_audio__ssCR.ssCR.int16_tCP.s.i.s"></span><span class="target" id="classdolbyio_1_1comms_1_1audio__sink_1ab965afe7d6b21141a99900ed63eefb3c"></span><span class="k"><span class="pre">virtual</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">handle_audio</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">std</span></span><span class="p"><span class="pre">::</span></span><span class="n"><span class="pre">string</span></span><span class="w"> </span><span class="p"><span class="pre">&</span></span><span class="n sig-param"><span class="pre">stream_id</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">std</span></span><span class="p"><span class="pre">::</span></span><span class="n"><span class="pre">string</span></span><span class="w"> </span><span class="p"><span class="pre">&</span></span><span class="n sig-param"><span class="pre">track_id</span></span>, <span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="n"><span class="pre">int16_t</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n sig-param"><span class="pre">data</span></span>, <span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">n_data</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">sample_rate</span></span>, <span class="n"><span class="pre">size_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">channels</span></span><span class="sig-paren">)</span><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="m"><span class="pre">0</span></span><a class="headerlink" href="#_CPPv4N7dolbyio5comms10audio_sink12handle_audioERKNSt6stringERKNSt6stringEPK7int16_t6size_ti6size_t" title="Permalink to this definition"></a><br /></dt>
<dd><p>The callback that is invoked when an audio frame is decoded and ready to be processed. </p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>stream_id</strong> – The media stream ID to which the audio track belongs. </p></li>
<li><p><strong>track_id</strong> – The ID of the audio track. </p></li>
<li><p><strong>data</strong> – The pointer to the underlying PCM data. </p></li>
<li><p><strong>n_data</strong> – The size of data. </p></li>
<li><p><strong>sample_rate</strong> – The sample rate </p></li>
<li><p><strong>channels</strong> – The number of channels. </p></li>
</ul>
</dd>
</dl>
</dd></dl>
</div>
</dd></dl>
<p>See <a class="reference internal" href="example.html#recording-example"><span class="std std-ref">Example Recorder Implementation</span></a> for a template for child recording class for all possible media.</p>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="encoded_video.html" class="btn btn-neutral float-left" title="Encoded Video" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="events.html" class="btn btn-neutral float-right" title="Media Recording Events" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>© Copyright Dolby Laboratories.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>