1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5<title>MixAudio</title>
6<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
7<link rel="start" href="index.html" title="MixAudio Reference Manual">
8<link rel="up" href="ch01.html" title="Mix Audio API">
9<link rel="prev" href="MixAudio-MixAudioInitParams.html" title="MixAudioInitParams">
10<link rel="next" href="MixAudio-mixaudiotypes.html" title="Mix Audio Types">
11<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12<link rel="stylesheet" href="style.css" type="text/css">
13<link rel="chapter" href="ch01.html" title="Mix Audio API">
14<link rel="chapter" href="tree-hierarchy.html" title="Object Hierarchy">
15<link rel="index" href="api-index-full.html" title="API Index">
16</head>
17<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
18<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
19<tr valign="middle">
20<td><a accesskey="p" href="MixAudio-MixAudioInitParams.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
21<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
22<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
23<th width="100%" align="center">MixAudio Reference Manual</th>
24<td><a accesskey="n" href="MixAudio-mixaudiotypes.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
25</tr>
26<tr><td colspan="5" class="shortcuts">
27<a href="#MixAudio.synopsis" class="shortcut">Top</a>
28                 | 
29                <a href="#MixAudio.description" class="shortcut">Description</a>
30                 | 
31                <a href="#MixAudio.object-hierarchy" class="shortcut">Object Hierarchy</a>
32</td></tr>
33</table>
34<div class="refentry" lang="en">
35<a name="MixAudio"></a><div class="titlepage"></div>
36<div class="refnamediv"><table width="100%"><tr>
37<td valign="top">
38<h2><span class="refentrytitle"><a name="MixAudio.top_of_page"></a>MixAudio</span></h2>
39<p>MixAudio — Object to support a single stream playback using hardware accelerated decoder.</p>
40</td>
41<td valign="top" align="right"></td>
42</tr></table></div>
43<div class="refsynopsisdiv">
44<a name="MixAudio.synopsis"></a><h2>Synopsis</h2>
45<pre class="synopsis">
46
47#include &lt;mixaudio.h&gt;
48
49enum                <a class="link" href="MixAudio.html#MixStreamState" title="enum MixStreamState">MixStreamState</a>;
50enum                <a class="link" href="MixAudio.html#MixState" title="enum MixState">MixState</a>;
51enum                <a class="link" href="MixAudio.html#MixCodecMode" title="enum MixCodecMode">MixCodecMode</a>;
52enum                <a class="link" href="MixAudio.html#MixVolType" title="enum MixVolType">MixVolType</a>;
53enum                <a class="link" href="MixAudio.html#MixVolRamp" title="enum MixVolRamp">MixVolRamp</a>;
54                    <a class="link" href="MixAudio.html#MixIOVec" title="MixIOVec">MixIOVec</a>;
55enum                <a class="link" href="MixAudio.html#MixDeviceState" title="enum MixDeviceState">MixDeviceState</a>;
56                    <a class="link" href="MixAudio.html#MixAudio-struct" title="MixAudio">MixAudio</a>;
57<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *          <a class="link" href="MixAudio.html#mix-audio-new" title="mix_audio_new ()">mix_audio_new</a>                       (void);
58<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *          <a class="link" href="MixAudio.html#mix-audio-ref" title="mix_audio_ref ()">mix_audio_ref</a>                       (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix);
59#define             <a class="link" href="MixAudio.html#mix-audio-unref" title="mix_audio_unref()">mix_audio_unref</a>                     (obj)
60MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-get-version" title="mix_audio_get_version ()">mix_audio_get_version</a>               (guint *major,
61                                                         guint *minor);
62MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-initialize" title="mix_audio_initialize ()">mix_audio_initialize</a>                (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
63                                                         <a class="link" href="MixAudio.html#MixCodecMode" title="enum MixCodecMode">MixCodecMode</a> mode,
64                                                         <a class="link" href="MixAudio-MixAudioInitParams.html#MixAudioInitParams" title="MixAudioInitParams">MixAudioInitParams</a> *aip,
65                                                         MixDrmParams *drminitparams);
66MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-configure" title="mix_audio_configure ()">mix_audio_configure</a>                 (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
67                                                         <a class="link" href="MixAudio-MixAudioConfigParams.html#MixAudioConfigParams" title="MixAudioConfigParams">MixAudioConfigParams</a> *audioconfigparams,
68                                                         MixDrmParams *drmparams);
69MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-decode" title="mix_audio_decode ()">mix_audio_decode</a>                    (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
70                                                         const <a class="link" href="MixAudio.html#MixIOVec" title="MixIOVec">MixIOVec</a> *iovin,
71                                                         gint iovincnt,
72                                                         guint64 *insize,
73                                                         <a class="link" href="MixAudio.html#MixIOVec" title="MixIOVec">MixIOVec</a> *iovout,
74                                                         gint iovoutcnt,
75                                                         guint64 *outsize);
76MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-capture-encode" title="mix_audio_capture_encode ()">mix_audio_capture_encode</a>            (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
77                                                         <a class="link" href="MixAudio.html#MixIOVec" title="MixIOVec">MixIOVec</a> *iovout,
78                                                         gint iovoutcnt);
79MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-start" title="mix_audio_start ()">mix_audio_start</a>                     (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix);
80MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-stop-drop" title="mix_audio_stop_drop ()">mix_audio_stop_drop</a>                 (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix);
81MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-stop-drain" title="mix_audio_stop_drain ()">mix_audio_stop_drain</a>                (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix);
82MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-pause" title="mix_audio_pause ()">mix_audio_pause</a>                     (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix);
83MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-resume" title="mix_audio_resume ()">mix_audio_resume</a>                    (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix);
84MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-get-timestamp" title="mix_audio_get_timestamp ()">mix_audio_get_timestamp</a>             (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
85                                                         guint64 *msecs);
86MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-set-mute" title="mix_audio_set_mute ()">mix_audio_set_mute</a>                  (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
87                                                         gboolean mute);
88MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-get-mute" title="mix_audio_get_mute ()">mix_audio_get_mute</a>                  (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
89                                                         gboolean *muted);
90MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-get-max-vol" title="mix_audio_get_max_vol ()">mix_audio_get_max_vol</a>               (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
91                                                         gint *maxvol);
92MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-get-min-vol" title="mix_audio_get_min_vol ()">mix_audio_get_min_vol</a>               (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
93                                                         gint *minvol);
94MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-get-volume" title="mix_audio_get_volume ()">mix_audio_get_volume</a>                (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
95                                                         gint *currvol,
96                                                         <a class="link" href="MixAudio.html#MixVolType" title="enum MixVolType">MixVolType</a> type);
97MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-set-volume" title="mix_audio_set_volume ()">mix_audio_set_volume</a>                (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
98                                                         gint currvol,
99                                                         <a class="link" href="MixAudio.html#MixVolType" title="enum MixVolType">MixVolType</a> type,
100                                                         gulong msecs,
101                                                         <a class="link" href="MixAudio.html#MixVolRamp" title="enum MixVolRamp">MixVolRamp</a> ramptype);
102MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-deinitialize" title="mix_audio_deinitialize ()">mix_audio_deinitialize</a>              (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix);
103MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-get-stream-state" title="mix_audio_get_stream_state ()">mix_audio_get_stream_state</a>          (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
104                                                         <a class="link" href="MixAudio.html#MixStreamState" title="enum MixStreamState">MixStreamState</a> *streamState);
105MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-get-state" title="mix_audio_get_state ()">mix_audio_get_state</a>                 (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
106                                                         <a class="link" href="MixAudio.html#MixState" title="enum MixState">MixState</a> *state);
107gboolean            <a class="link" href="MixAudio.html#mix-audio-am-is-enabled" title="mix_audio_am_is_enabled ()">mix_audio_am_is_enabled</a>             (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix);
108MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-is-am-available" title="mix_audio_is_am_available ()">mix_audio_is_am_available</a>           (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
109                                                         <a class="link" href="MixAudio-mixaudiotypes.html#MixAudioManager" title="enum MixAudioManager">MixAudioManager</a> am,
110                                                         gboolean *avail);
111MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-get-output-configuration" title="mix_audio_get_output_configuration ()">mix_audio_get_output_configuration</a>  (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
112                                                         <a class="link" href="MixAudio-MixAudioConfigParams.html#MixAudioConfigParams" title="MixAudioConfigParams">MixAudioConfigParams</a> **audioconfigparams);
113MIX_RESULT          <a class="link" href="MixAudio.html#mix-audio-get-stream-byte-decoded" title="mix_audio_get_stream_byte_decoded ()">mix_audio_get_stream_byte_decoded</a>   (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
114                                                         guint64 *byte);
115</pre>
116</div>
117<div class="refsect1" lang="en">
118<a name="MixAudio.object-hierarchy"></a><h2>Object Hierarchy</h2>
119<pre class="synopsis">
120  GObject
121   +----MixAudio
122</pre>
123</div>
124<div class="refsect1" lang="en">
125<a name="MixAudio.description"></a><h2>Description</h2>
126<p>
127<a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object provide thread-safe API for application and/or multimedia framework to take advantage of Intel Smart Sound Technology(TM) driver for hardware audio decode and render.
128</p>
129<p>
130Each <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object represents one streaming session with the Intel Smart Sound driver and provides configuration and control of the decoding and playback options.
131</p>
132<p>
133The <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object also support integration with Intel Audio Manager service.
134</p>
135<p>
136An application can utilize the <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object by calling the following sequence:
137</p>
138<div class="orderedlist"><ol type="1">
139<li>
140<a class="link" href="MixAudio.html#mix-audio-new" title="mix_audio_new ()"><code class="function">mix_audio_new()</code></a> to create a <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> instance.</li>
141<li>
142<a class="link" href="MixAudio.html#mix-audio-initialize" title="mix_audio_initialize ()"><code class="function">mix_audio_initialize()</code></a> to allocate Intel Smart Sound Technology resource.</li>
143<li>
144<a class="link" href="MixAudio.html#mix-audio-configure" title="mix_audio_configure ()"><code class="function">mix_audio_configure()</code></a> to configure stream parameters.</li>
145<li>
146<a class="link" href="MixAudio.html#mix-audio-decode" title="mix_audio_decode ()"><code class="function">mix_audio_decode()</code></a> can be called repeatedly for decoding and, optionally, rendering.</li>
147<li>
148<a class="link" href="MixAudio.html#mix-audio-start" title="mix_audio_start ()"><code class="function">mix_audio_start()</code></a> is called after the 1st <a class="link" href="MixAudio.html#mix-audio-decode" title="mix_audio_decode ()"><code class="function">mix_audio_decode()</code></a> method to start rendering.</li>
149<li>
150<a class="link" href="MixAudio.html#mix-audio-stop-drain" title="mix_audio_stop_drain ()"><code class="function">mix_audio_stop_drain()</code></a> is called after the last buffer is passed for decoding in with <a class="link" href="MixAudio.html#mix-audio-decode" title="mix_audio_decode ()"><code class="function">mix_audio_decode()</code></a>. </li>
151<li>
152<a class="link" href="MixAudio.html#mix-audio-deinitialize" title="mix_audio_deinitialize ()"><code class="function">mix_audio_deinitialize()</code></a> to free resource once playback is completed.</li>
153</ol></div>
154<p>
155</p>
156<p>
157Since <a class="link" href="MixAudio.html#mix-audio-decode" title="mix_audio_decode ()"><code class="function">mix_audio_decode()</code></a> is a blocking call during playback, the following methods are called in a seperate thread to control progress:
158</p>
159<div class="itemizedlist"><ul type="disc">
160<li><a class="link" href="MixAudio.html#mix-audio-start" title="mix_audio_start ()"><code class="function">mix_audio_start()</code></a></li>
161<li><a class="link" href="MixAudio.html#mix-audio-pause" title="mix_audio_pause ()"><code class="function">mix_audio_pause()</code></a></li>
162<li><a class="link" href="MixAudio.html#mix-audio-resume" title="mix_audio_resume ()"><code class="function">mix_audio_resume()</code></a></li>
163<li><a class="link" href="MixAudio.html#mix-audio-stop-drop" title="mix_audio_stop_drop ()"><code class="function">mix_audio_stop_drop()</code></a></li>
164</ul></div>
165</div>
166<div class="refsect1" lang="en">
167<a name="MixAudio.details"></a><h2>Details</h2>
168<div class="refsect2" lang="en">
169<a name="MixStreamState"></a><h3>enum MixStreamState</h3>
170<pre class="programlisting">typedef enum {
171  MIX_STREAM_NULL=0,
172  MIX_STREAM_STOPPED,
173  MIX_STREAM_PLAYING,
174  MIX_STREAM_PAUSED,
175  MIX_STREAM_DRAINING,
176  MIX_STREAM_LAST
177} MixStreamState;
178</pre>
179<p>
180Stream State during Decode and Render or Encode mode. These states do not apply to Decode and Return mode.</p>
181<div class="variablelist"><table border="0">
182<col align="left" valign="top">
183<tbody>
184<tr>
185<td><p><a name="MIX-STREAM-NULL--CAPS"></a><span class="term"><code class="literal">MIX_STREAM_NULL</code></span></p></td>
186<td> Stream is not allocated.
187</td>
188</tr>
189<tr>
190<td><p><a name="MIX-STREAM-STOPPED--CAPS"></a><span class="term"><code class="literal">MIX_STREAM_STOPPED</code></span></p></td>
191<td> Stream is at STOP state. This is the only state DNR is allowed.
192</td>
193</tr>
194<tr>
195<td><p><a name="MIX-STREAM-PLAYING--CAPS"></a><span class="term"><code class="literal">MIX_STREAM_PLAYING</code></span></p></td>
196<td> Stream is at Playing state.
197</td>
198</tr>
199<tr>
200<td><p><a name="MIX-STREAM-PAUSED--CAPS"></a><span class="term"><code class="literal">MIX_STREAM_PAUSED</code></span></p></td>
201<td> Stream is Paused.
202</td>
203</tr>
204<tr>
205<td><p><a name="MIX-STREAM-DRAINING--CAPS"></a><span class="term"><code class="literal">MIX_STREAM_DRAINING</code></span></p></td>
206<td> Stream is draining -- remaining of the buffer in the device are playing. This state is special due to the limitation that no other control operations are allowed at this state. Stream will become <em class="parameter"><code>MIX_STREAM_STOPPED</code></em> automatically when this data draining has completed.
207</td>
208</tr>
209<tr>
210<td><p><a name="MIX-STREAM-LAST--CAPS"></a><span class="term"><code class="literal">MIX_STREAM_LAST</code></span></p></td>
211<td> Last index in the enumeration.
212</td>
213</tr>
214</tbody>
215</table></div>
216</div>
217<hr>
218<div class="refsect2" lang="en">
219<a name="MixState"></a><h3>enum MixState</h3>
220<pre class="programlisting">typedef enum {
221  MIX_STATE_NULL=0,
222  MIX_STATE_UNINITIALIZED,
223  MIX_STATE_INITIALIZED,
224  MIX_STATE_CONFIGURED,
225  MIX_STATE_LAST
226} MixState;
227</pre>
228<p>
229The varies states the device is in.</p>
230<div class="variablelist"><table border="0">
231<col align="left" valign="top">
232<tbody>
233<tr>
234<td><p><a name="MIX-STATE-NULL--CAPS"></a><span class="term"><code class="literal">MIX_STATE_NULL</code></span></p></td>
235<td></td>
236</tr>
237<tr>
238<td><p><a name="MIX-STATE-UNINITIALIZED--CAPS"></a><span class="term"><code class="literal">MIX_STATE_UNINITIALIZED</code></span></p></td>
239<td> MIX is not initialized.
240</td>
241</tr>
242<tr>
243<td><p><a name="MIX-STATE-INITIALIZED--CAPS"></a><span class="term"><code class="literal">MIX_STATE_INITIALIZED</code></span></p></td>
244<td> MIX is initialized.
245</td>
246</tr>
247<tr>
248<td><p><a name="MIX-STATE-CONFIGURED--CAPS"></a><span class="term"><code class="literal">MIX_STATE_CONFIGURED</code></span></p></td>
249<td> MIX is configured successfully.
250</td>
251</tr>
252<tr>
253<td><p><a name="MIX-STATE-LAST--CAPS"></a><span class="term"><code class="literal">MIX_STATE_LAST</code></span></p></td>
254<td> Last index in the enumeration.
255</td>
256</tr>
257</tbody>
258</table></div>
259</div>
260<hr>
261<div class="refsect2" lang="en">
262<a name="MixCodecMode"></a><h3>enum MixCodecMode</h3>
263<pre class="programlisting">typedef enum {
264  MIX_CODING_INVALID=0,
265  MIX_CODING_ENCODE,
266  MIX_CODING_DECODE,
267  MIX_CODING_LAST
268} MixCodecMode;
269</pre>
270<p>
271Mode where device is operating on. See <a class="link" href="MixAudio.html#mix-audio-initialize" title="mix_audio_initialize ()"><code class="function">mix_audio_initialize()</code></a>.</p>
272<div class="variablelist"><table border="0">
273<col align="left" valign="top">
274<tbody>
275<tr>
276<td><p><a name="MIX-CODING-INVALID--CAPS"></a><span class="term"><code class="literal">MIX_CODING_INVALID</code></span></p></td>
277<td> Indicates device uninitialied for any mode.
278</td>
279</tr>
280<tr>
281<td><p><a name="MIX-CODING-ENCODE--CAPS"></a><span class="term"><code class="literal">MIX_CODING_ENCODE</code></span></p></td>
282<td> Indicates device is opened for encoding.
283</td>
284</tr>
285<tr>
286<td><p><a name="MIX-CODING-DECODE--CAPS"></a><span class="term"><code class="literal">MIX_CODING_DECODE</code></span></p></td>
287<td> Indicates device is opened for decoding.
288</td>
289</tr>
290<tr>
291<td><p><a name="MIX-CODING-LAST--CAPS"></a><span class="term"><code class="literal">MIX_CODING_LAST</code></span></p></td>
292<td> Last index in the enumeration.
293</td>
294</tr>
295</tbody>
296</table></div>
297</div>
298<hr>
299<div class="refsect2" lang="en">
300<a name="MixVolType"></a><h3>enum MixVolType</h3>
301<pre class="programlisting">typedef enum {
302  MIX_VOL_PERCENT=0,
303  MIX_VOL_DECIBELS,
304  MIX_VOL_LAST
305} MixVolType;
306</pre>
307<p>
308See <code class="function">mix_audio_getvolume()</code> and <code class="function">mix_audio_setvolume()</code>.</p>
309<div class="variablelist"><table border="0">
310<col align="left" valign="top">
311<tbody>
312<tr>
313<td><p><a name="MIX-VOL-PERCENT--CAPS"></a><span class="term"><code class="literal">MIX_VOL_PERCENT</code></span></p></td>
314<td> volume is expressed in percentage.
315</td>
316</tr>
317<tr>
318<td><p><a name="MIX-VOL-DECIBELS--CAPS"></a><span class="term"><code class="literal">MIX_VOL_DECIBELS</code></span></p></td>
319<td> volume is expressed in decibel.
320</td>
321</tr>
322<tr>
323<td><p><a name="MIX-VOL-LAST--CAPS"></a><span class="term"><code class="literal">MIX_VOL_LAST</code></span></p></td>
324<td> last entry.
325</td>
326</tr>
327</tbody>
328</table></div>
329</div>
330<hr>
331<div class="refsect2" lang="en">
332<a name="MixVolRamp"></a><h3>enum MixVolRamp</h3>
333<pre class="programlisting">typedef enum
334{
335  MIX_RAMP_LINEAR = 0,
336  MIX_RAMP_EXPONENTIAL,
337  MIX_RAMP_LAST
338} MixVolRamp;
339</pre>
340<p>
341See <code class="function">mix_audio_getvolume()</code> and <code class="function">mix_audio_setvolume()</code>.</p>
342<div class="variablelist"><table border="0">
343<col align="left" valign="top">
344<tbody>
345<tr>
346<td><p><a name="MIX-RAMP-LINEAR--CAPS"></a><span class="term"><code class="literal">MIX_RAMP_LINEAR</code></span></p></td>
347<td> volume is expressed in percentage.
348</td>
349</tr>
350<tr>
351<td><p><a name="MIX-RAMP-EXPONENTIAL--CAPS"></a><span class="term"><code class="literal">MIX_RAMP_EXPONENTIAL</code></span></p></td>
352<td> volume is expressed in decibel.
353</td>
354</tr>
355<tr>
356<td><p><a name="MIX-RAMP-LAST--CAPS"></a><span class="term"><code class="literal">MIX_RAMP_LAST</code></span></p></td>
357<td> last entry.
358</td>
359</tr>
360</tbody>
361</table></div>
362</div>
363<hr>
364<div class="refsect2" lang="en">
365<a name="MixIOVec"></a><h3>MixIOVec</h3>
366<pre class="programlisting">typedef struct {
367  guchar *data;
368  gint size;
369} MixIOVec;
370</pre>
371<p>
372Scatter-gather style structure. To be used by <a class="link" href="MixAudio.html#mix-audio-decode" title="mix_audio_decode ()"><code class="function">mix_audio_decode()</code></a> method for input and output buffer.</p>
373<div class="variablelist"><table border="0">
374<col align="left" valign="top">
375<tbody>
376<tr>
377<td><p><span class="term">guchar *<em class="structfield"><code>data</code></em>;</span></p></td>
378<td> data pointer
379</td>
380</tr>
381<tr>
382<td><p><span class="term">gint <em class="structfield"><code>size</code></em>;</span></p></td>
383<td> size of buffer in <em class="parameter"><code>data</code></em>
384</td>
385</tr>
386</tbody>
387</table></div>
388</div>
389<hr>
390<div class="refsect2" lang="en">
391<a name="MixDeviceState"></a><h3>enum MixDeviceState</h3>
392<pre class="programlisting">typedef enum {
393  MIX_AUDIO_DEV_CLOSED=0,
394  MIX_AUDIO_DEV_OPENED,
395  MIX_AUDIO_DEV_ALLOCATED
396} MixDeviceState;
397</pre>
398<p>
399Device state.</p>
400<div class="variablelist"><table border="0">
401<col align="left" valign="top">
402<tbody>
403<tr>
404<td><p><a name="MIX-AUDIO-DEV-CLOSED--CAPS"></a><span class="term"><code class="literal">MIX_AUDIO_DEV_CLOSED</code></span></p></td>
405<td> TBD
406</td>
407</tr>
408<tr>
409<td><p><a name="MIX-AUDIO-DEV-OPENED--CAPS"></a><span class="term"><code class="literal">MIX_AUDIO_DEV_OPENED</code></span></p></td>
410<td> TBD
411</td>
412</tr>
413<tr>
414<td><p><a name="MIX-AUDIO-DEV-ALLOCATED--CAPS"></a><span class="term"><code class="literal">MIX_AUDIO_DEV_ALLOCATED</code></span></p></td>
415<td> TBD
416</td>
417</tr>
418</tbody>
419</table></div>
420</div>
421<hr>
422<div class="refsect2" lang="en">
423<a name="MixAudio-struct"></a><h3>MixAudio</h3>
424<pre class="programlisting">typedef struct {
425  GObject parent;
426} MixAudio;
427</pre>
428<p>
429MI-X Audio object</p>
430<div class="variablelist"><table border="0">
431<col align="left" valign="top">
432<tbody><tr>
433<td><p><span class="term">GObject <em class="structfield"><code>parent</code></em>;</span></p></td>
434<td> Parent object.
435</td>
436</tr></tbody>
437</table></div>
438</div>
439<hr>
440<div class="refsect2" lang="en">
441<a name="mix-audio-new"></a><h3>mix_audio_new ()</h3>
442<pre class="programlisting"><a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *          mix_audio_new                       (void);</pre>
443<p>
444Use this method to create new instance of <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a></p>
445<div class="variablelist"><table border="0">
446<col align="left" valign="top">
447<tbody><tr>
448<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
449<td> A newly allocated instance of <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a>
450</td>
451</tr></tbody>
452</table></div>
453</div>
454<hr>
455<div class="refsect2" lang="en">
456<a name="mix-audio-ref"></a><h3>mix_audio_ref ()</h3>
457<pre class="programlisting"><a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *          mix_audio_ref                       (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix);</pre>
458<p>
459Add reference count.</p>
460<div class="variablelist"><table border="0">
461<col align="left" valign="top">
462<tbody>
463<tr>
464<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
465<td> object to add reference
466</td>
467</tr>
468<tr>
469<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
470<td> the MixAudio instance where reference count has been increased.
471</td>
472</tr>
473</tbody>
474</table></div>
475</div>
476<hr>
477<div class="refsect2" lang="en">
478<a name="mix-audio-unref"></a><h3>mix_audio_unref()</h3>
479<pre class="programlisting">#define mix_audio_unref(obj) g_object_unref (G_OBJECT(obj))
480</pre>
481<p>
482Decrement reference count of the object.</p>
483<div class="variablelist"><table border="0">
484<col align="left" valign="top">
485<tbody><tr>
486<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
487<td> object to unref.
488</td>
489</tr></tbody>
490</table></div>
491</div>
492<hr>
493<div class="refsect2" lang="en">
494<a name="mix-audio-get-version"></a><h3>mix_audio_get_version ()</h3>
495<pre class="programlisting">MIX_RESULT          mix_audio_get_version               (guint *major,
496                                                         guint *minor);</pre>
497<p>
498Returns the version of the MI-X library.</p>
499<div class="variablelist"><table border="0">
500<col align="left" valign="top">
501<tbody><tr>
502<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
503<td> <span class="type">MIX_RESULT_SUCCESS</span>
504</td>
505</tr></tbody>
506</table></div>
507</div>
508<hr>
509<div class="refsect2" lang="en">
510<a name="mix-audio-initialize"></a><h3>mix_audio_initialize ()</h3>
511<pre class="programlisting">MIX_RESULT          mix_audio_initialize                (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
512                                                         <a class="link" href="MixAudio.html#MixCodecMode" title="enum MixCodecMode">MixCodecMode</a> mode,
513                                                         <a class="link" href="MixAudio-MixAudioInitParams.html#MixAudioInitParams" title="MixAudioInitParams">MixAudioInitParams</a> *aip,
514                                                         MixDrmParams *drminitparams);</pre>
515<p>
516This function will initialize an encode or decode session with this <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> instance.  During this call, the device will be opened. If the device is not available, an error is returned to the caller so that an alternative (e.g. software decoding) can be configured instead. Use <a class="link" href="MixAudio.html#mix-audio-deinitialize" title="mix_audio_deinitialize ()"><code class="function">mix_audio_deinitialize()</code></a> to close the device.
517</p>
518<p>
519A previous initialized session must be de-initialized using <a class="link" href="MixAudio.html#mix-audio-deinitialize" title="mix_audio_deinitialize ()"><code class="function">mix_audio_deinitialize()</code></a> before it can be initialized again.</p>
520<div class="variablelist"><table border="0">
521<col align="left" valign="top">
522<tbody>
523<tr>
524<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
525<td> <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object.
526</td>
527</tr>
528<tr>
529<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
530<td> Requested <a class="link" href="MixAudio.html#MixCodecMode" title="enum MixCodecMode"><span class="type">MixCodecMode</span></a>.
531</td>
532</tr>
533<tr>
534<td><p><span class="term"><em class="parameter"><code>aip</code></em> :</span></p></td>
535<td> Audio initialization parameters.
536</td>
537</tr>
538<tr>
539<td><p><span class="term"><em class="parameter"><code>drminitparams</code></em> :</span></p></td>
540<td> <span class="emphasis"><em>Optional.</em></span> DRM initialization param if applicable.
541</td>
542</tr>
543<tr>
544<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
545<td> <span class="type">MIX_RESULT_SUCCESS</span> on successful initilaization. <span class="type">MIX_RESULT_ALREADY_INIT</span> if session is already initialized.
546</td>
547</tr>
548</tbody>
549</table></div>
550</div>
551<hr>
552<div class="refsect2" lang="en">
553<a name="mix-audio-configure"></a><h3>mix_audio_configure ()</h3>
554<pre class="programlisting">MIX_RESULT          mix_audio_configure                 (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
555                                                         <a class="link" href="MixAudio-MixAudioConfigParams.html#MixAudioConfigParams" title="MixAudioConfigParams">MixAudioConfigParams</a> *audioconfigparams,
556                                                         MixDrmParams *drmparams);</pre>
557<p>
558This function can be used to configure a stream for the current session.  The caller can use this function to do the following:
559</p>
560<p>
561</p>
562<div class="itemizedlist"><ul type="disc">
563<li>Choose decoding mode (direct-render or decode-return)</li>
564<li>Provide DRM parameters (using DRMparams object)</li>
565<li>Provide stream parameters (using STRMparams objects)</li>
566<li>Provide a stream name for the Intel Smart Sound Technology stream</li>
567</ul></div>
568<p>
569</p>
570<p>
571SST stream parameters will be set during this call, and stream resources allocated in SST.
572</p>
573<p>
574</p>
575<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
576<h3 class="title">Intel Audio Manager support:</h3>
577<p>If Intel Audio Manager support is enabled, and if <em class="parameter"><code>mode</code></em> is specified to <a class="link" href="MixAudio-MixAudioConfigParams.html#MIX-DECODE-DIRECTRENDER--CAPS"><span class="type">MIX_DECODE_DIRECTRENDER</span></a>, the SST stream will be registered with Intel Audio Manager in the context of this call, using the stream name provided in <em class="parameter"><code>streamname</code></em>. Application will receive a notification from Intel Audio Manager that the stream has been created during or soon after this call. The application should be ready to handle either possibility.  A stream ID (associated with the stream name) will be provided by Intel Audio Manager which will be used for subsequent notifications from Intel Audio Manager or calls to Intel Audio Manager for muting, pause and resume. See <code class="function">mix_audio_getstreamid()</code></p>
578<p>If a stream is already registered with Intel Audio Manager, application must pass the same <em class="parameter"><code>streamname</code></em> argument to retain the session. Otherwise, the existing stream will be unregistered and a new stream will be registered with the new <em class="parameter"><code>streamname</code></em>.
579</p>
580</div>
581<p>
582</p>
583<p>
584If <em class="parameter"><code>mode</code></em> is specified to <a class="link" href="MixAudio-MixAudioConfigParams.html#MIX-DECODE-DIRECTRENDER--CAPS"><span class="type">MIX_DECODE_DIRECTRENDER</span></a> but direct-render mode is not available (due to end user use of alternative output device), an error indication will be returned to the caller so that an alternate pipeline configuration can be created (e.g. including a Pulse Audio sink, and support for output buffers).  In this case, the caller will need to call <a class="link" href="MixAudio.html#mix-audio-configure" title="mix_audio_configure ()"><code class="function">mix_audio_configure()</code></a> again to with <em class="parameter"><code>mode</code></em> specify as <a class="link" href="MixAudio-MixAudioConfigParams.html#MIX-DECODE-DECODERETURN--CAPS"><span class="type">MIX_DECODE_DECODERETURN</span></a> to request decode-return mode.
585</p>
586<p>
587This method can be called multiple times if reconfiguration of the stream is needed. However, this method must be called when the stream is in <a class="link" href="MixAudio.html#MIX-STREAM-STOPPED--CAPS"><span class="type">MIX_STREAM_STOPPED</span></a> state.</p>
588<div class="variablelist"><table border="0">
589<col align="left" valign="top">
590<tbody>
591<tr>
592<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
593<td> <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object.
594</td>
595</tr>
596<tr>
597<td><p><span class="term"><em class="parameter"><code>audioconfigparams</code></em> :</span></p></td>
598<td> a <a class="link" href="MixAudio-MixAudioConfigParams.html#MixAudioConfigParams" title="MixAudioConfigParams"><span class="type">MixAudioConfigParams</span></a> derived object containing information for the specific stream type.
599</td>
600</tr>
601<tr>
602<td><p><span class="term"><em class="parameter"><code>drmparams</code></em> :</span></p></td>
603<td> <span class="emphasis"><em>Optional.</em></span> DRM initialization param if applicable.
604</td>
605</tr>
606<tr>
607<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
608<td> Result indicates successful or not.
609</td>
610</tr>
611</tbody>
612</table></div>
613</div>
614<hr>
615<div class="refsect2" lang="en">
616<a name="mix-audio-decode"></a><h3>mix_audio_decode ()</h3>
617<pre class="programlisting">MIX_RESULT          mix_audio_decode                    (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
618                                                         const <a class="link" href="MixAudio.html#MixIOVec" title="MixIOVec">MixIOVec</a> *iovin,
619                                                         gint iovincnt,
620                                                         guint64 *insize,
621                                                         <a class="link" href="MixAudio.html#MixIOVec" title="MixIOVec">MixIOVec</a> *iovout,
622                                                         gint iovoutcnt,
623                                                         guint64 *outsize);</pre>
624<p>
625This function is used to initiate HW accelerated decoding of encoded data buffers.  This function may be used in two major modes, direct-render or decode-return.
626</p>
627<p>
628With direct-render, input buffers are provided by the caller which hold encoded audio data, and no output buffers are provided.  The encoded data is decoded, and the decoded data is sent directly to the output speaker.  This allows very low power audio rendering and is the best choice of operation for longer battery life.
629</p>
630<p>
631</p>
632<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
633<h3 class="title">Intel Audio Manager Support</h3>
634However, if the user has connected a different target output device, such as Bluetooth headphones, this mode cannot be used as the decoded audio must be directed to the Pulse Audio stack where the output to Bluetooth device can be supported, per Intel Audio Manager guidelines.  This mode is called decode-return, and requires the caller to provide output buffers for the decoded data.
635</div>
636<p>
637</p>
638<p>
639Input buffers in both modes are one or more user space buffers using a scatter/gather style vector interface.
640</p>
641<p>
642Output buffers for the decode-return mode are one or more user space buffers in a scatter style vector interface.  Buffers will be filled in order and lengths of data filled will be returned.
643</p>
644<p>
645This call will block until data has been completely copied or queued to the driver.  All user space buffers may be used or released when this call returns.
646</p>
647<p>
648Note: If the stream is configured as <a class="link" href="MixAudio-MixAudioConfigParams.html#MIX-DECODE-DIRECTRENDER--CAPS"><span class="type">MIX_DECODE_DIRECTRENDER</span></a>, and whenever the stream in <a class="link" href="MixAudio.html#MIX-STREAM-STOPPED--CAPS"><span class="type">MIX_STREAM_STOPPED</span></a> state, the call to <a class="link" href="MixAudio.html#mix-audio-decode" title="mix_audio_decode ()"><code class="function">mix_audio_decode()</code></a> will not start the playback until <a class="link" href="MixAudio.html#mix-audio-start" title="mix_audio_start ()"><code class="function">mix_audio_start()</code></a> is called. This behavior would allow application to queue up data but delay the playback until appropriate time.</p>
649<div class="variablelist"><table border="0">
650<col align="left" valign="top">
651<tbody>
652<tr>
653<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
654<td> <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object.
655</td>
656</tr>
657<tr>
658<td><p><span class="term"><em class="parameter"><code>iovin</code></em> :</span></p></td>
659<td> a pointer to an array of <a class="link" href="MixAudio.html#MixIOVec" title="MixIOVec"><span class="type">MixIOVec</span></a> structure that contains the input buffers
660</td>
661</tr>
662<tr>
663<td><p><span class="term"><em class="parameter"><code>iovincnt</code></em> :</span></p></td>
664<td> the number of entry in the <em class="parameter"><code>iovin</code></em> array
665</td>
666</tr>
667<tr>
668<td><p><span class="term"><em class="parameter"><code>iovout</code></em> :</span></p></td>
669<td> a pointer to an arrya of <a class="link" href="MixAudio.html#MixIOVec" title="MixIOVec"><span class="type">MixIOVec</span></a> structure that represent the output buffer. During input, each size in the <a class="link" href="MixAudio.html#MixIOVec" title="MixIOVec"><span class="type">MixIOVec</span></a> array represents the available buffer size pointed to by data. Upon return, each size value will be updated to reflect how much data has been filled. This parameter is ignored if stream is configured to <a class="link" href="MixAudio-MixAudioConfigParams.html#MIX-DECODE-DIRECTRENDER--CAPS"><span class="type">MIX_DECODE_DIRECTRENDER</span></a>. See <a class="link" href="MixAudio.html#mix-audio-configure" title="mix_audio_configure ()"><code class="function">mix_audio_configure()</code></a> for more detail.
670</td>
671</tr>
672<tr>
673<td><p><span class="term"><em class="parameter"><code>iovoutcnt</code></em> :</span></p></td>
674<td> in/out parameter which when input, it contains the number of entry available in the <em class="parameter"><code>iovout</code></em> array. Upon return, this value will be updated to reflect how many entry in the <em class="parameter"><code>iovout</code></em> array has been populated with data. This parameter is ignored if stream is configured to <a class="link" href="MixAudio-MixAudioConfigParams.html#MIX-DECODE-DIRECTRENDER--CAPS"><span class="type">MIX_DECODE_DIRECTRENDER</span></a>. See <a class="link" href="MixAudio.html#mix-audio-configure" title="mix_audio_configure ()"><code class="function">mix_audio_configure()</code></a> for more detail.
675</td>
676</tr>
677<tr>
678<td><p><span class="term"><em class="parameter"><code>outsize</code></em> :</span></p></td>
679<td> Total number of bytes returned for the decode session. This parameter is ignored if stream is configured to <a class="link" href="MixAudio-MixAudioConfigParams.html#MIX-DECODE-DIRECTRENDER--CAPS"><span class="type">MIX_DECODE_DIRECTRENDER</span></a>.
680</td>
681</tr>
682<tr>
683<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
684<td> <span class="type">MIX_RESULT</span>
685</td>
686</tr>
687</tbody>
688</table></div>
689</div>
690<hr>
691<div class="refsect2" lang="en">
692<a name="mix-audio-capture-encode"></a><h3>mix_audio_capture_encode ()</h3>
693<pre class="programlisting">MIX_RESULT          mix_audio_capture_encode            (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
694                                                         <a class="link" href="MixAudio.html#MixIOVec" title="MixIOVec">MixIOVec</a> *iovout,
695                                                         gint iovoutcnt);</pre>
696<p>
697To read encoded data from device.
698</p>
699<p>
700<em><span class="comment">
701NOTE: May need to rename to "read_encoded" or other name. Since "encode" seems to mean taking raw audio and convert to compressed audio.
702</span></em></p>
703<div class="variablelist"><table border="0">
704<col align="left" valign="top">
705<tbody>
706<tr>
707<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
708<td> <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object.
709</td>
710</tr>
711<tr>
712<td><p><span class="term"><em class="parameter"><code>iovout</code></em> :</span></p></td>
713<td> Capture audio samples.
714</td>
715</tr>
716<tr>
717<td><p><span class="term"><em class="parameter"><code>iovoutcnt</code></em> :</span></p></td>
718<td> Number of entry in the input vector <em class="parameter"><code>iovout</code></em>.
719</td>
720</tr>
721<tr>
722<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
723<td> <span class="type">MIX_RESULT</span>
724</td>
725</tr>
726</tbody>
727</table></div>
728</div>
729<hr>
730<div class="refsect2" lang="en">
731<a name="mix-audio-start"></a><h3>mix_audio_start ()</h3>
732<pre class="programlisting">MIX_RESULT          mix_audio_start                     (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix);</pre>
733<p>
734If the stream is configured to <a class="link" href="MixAudio-MixAudioConfigParams.html#MIX-DECODE-DIRECTRENDER--CAPS"><span class="type">MIX_DECODE_DIRECTRENDER</span></a>, application use this call to change the stream out of the <a class="link" href="MixAudio.html#MIX-STREAM-STOPPED--CAPS"><span class="type">MIX_STREAM_STOPPED</span></a> state. If <a class="link" href="MixAudio.html#mix-audio-decode" title="mix_audio_decode ()"><code class="function">mix_audio_decode()</code></a> is called and blocking in a seperate thread prior to this call. This method causes the device to start rendering data.
735</p>
736<p>
737In <a class="link" href="MixAudio-MixAudioConfigParams.html#MIX-DECODE-DECODERETURN--CAPS"><span class="type">MIX_DECODE_DECODERETURN</span></a>, this method is no op.</p>
738<div class="variablelist"><table border="0">
739<col align="left" valign="top">
740<tbody>
741<tr>
742<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
743<td> <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object.
744</td>
745</tr>
746<tr>
747<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
748<td> <span class="type">MIX_RESULT_SUCCESS</span> if the resulting state is either <a class="link" href="MixAudio.html#MIX-STREAM-PLAYING--CAPS"><span class="type">MIX_STREAM_PLAYING</span></a> or <a class="link" href="MixAudio.html#MIX-STREAM-PAUSED--CAPS"><span class="type">MIX_STREAM_PAUSED</span></a>. Fail code otherwise.
749</td>
750</tr>
751</tbody>
752</table></div>
753</div>
754<hr>
755<div class="refsect2" lang="en">
756<a name="mix-audio-stop-drop"></a><h3>mix_audio_stop_drop ()</h3>
757<pre class="programlisting">MIX_RESULT          mix_audio_stop_drop                 (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix);</pre>
758<p>
759If the stream is configured to <a class="link" href="MixAudio-MixAudioConfigParams.html#MIX-DECODE-DIRECTRENDER--CAPS"><span class="type">MIX_DECODE_DIRECTRENDER</span></a>, application uses this function to stop the processing and playback of audio.
760</p>
761<p>
762All remaining frames to be decoded or rendered will be discarded and playback will stop immediately, unblocks any pending <a class="link" href="MixAudio.html#mix-audio-decode" title="mix_audio_decode ()"><code class="function">mix_audio_decode()</code></a>.
763</p>
764<p>
765If <span class="type">MIX_STOP_DRAIN</span> is requested, the call will block with stream state set to <a class="link" href="MixAudio.html#MIX-STREAM-DRAINING--CAPS"><span class="type">MIX_STREAM_DRAINING</span></a>, and return only until all remaining frame in previously submitted buffers are decoded and rendered. When <span class="type">MIX_STOP_DRAIN</span> returns successfully, the stream would have reached <a class="link" href="MixAudio.html#MIX-STREAM-STOPPED--CAPS"><span class="type">MIX_STREAM_STOPPED</span></a> successfully.
766</p>
767<p>
768After this call, timestamp retrived by <code class="function">mix_audio_gettimestamp()</code> is reset to zero.
769</p>
770<p>
771Note that this method returns <span class="type">MIX_RESULT_WRONG_STATE</span> if the stream is in <a class="link" href="MixAudio.html#MIX-STREAM-DRAINING--CAPS"><span class="type">MIX_STREAM_DRAINING</span></a> state.</p>
772<div class="variablelist"><table border="0">
773<col align="left" valign="top">
774<tbody>
775<tr>
776<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
777<td> <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object.
778</td>
779</tr>
780<tr>
781<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
782<td> <span class="type">MIX_RESULT_SUCCESS</span> if the resulting state has successfully reached <a class="link" href="MixAudio.html#MIX-STREAM-STOPPED--CAPS"><span class="type">MIX_STREAM_STOPPED</span></a>. Fail code otherwise.
783</td>
784</tr>
785</tbody>
786</table></div>
787</div>
788<hr>
789<div class="refsect2" lang="en">
790<a name="mix-audio-stop-drain"></a><h3>mix_audio_stop_drain ()</h3>
791<pre class="programlisting">MIX_RESULT          mix_audio_stop_drain                (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix);</pre>
792<p>
793If the stream is configured to <a class="link" href="MixAudio-MixAudioConfigParams.html#MIX-DECODE-DIRECTRENDER--CAPS"><span class="type">MIX_DECODE_DIRECTRENDER</span></a>, application uses this function to stop the processing and playback of audio.
794</p>
795<p>
796The call will block with stream state set to <a class="link" href="MixAudio.html#MIX-STREAM-DRAINING--CAPS"><span class="type">MIX_STREAM_DRAINING</span></a>, and return only until all remaining frame in previously submitted buffers are decoded and rendered.
797</p>
798<p>
799Note that this method blocks until <a class="link" href="MixAudio.html#MIX-STREAM-STOPPED--CAPS"><span class="type">MIX_STREAM_STOPPED</span></a> is reached if it is called when the stream is already in <a class="link" href="MixAudio.html#MIX-STREAM-DRAINING--CAPS"><span class="type">MIX_STREAM_DRAINING</span></a> state.</p>
800<div class="variablelist"><table border="0">
801<col align="left" valign="top">
802<tbody>
803<tr>
804<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
805<td> <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object.
806</td>
807</tr>
808<tr>
809<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
810<td> <span class="type">MIX_RESULT_SUCCESS</span> if the resulting state has successfully reached <a class="link" href="MixAudio.html#MIX-STREAM-STOPPED--CAPS"><span class="type">MIX_STREAM_STOPPED</span></a>. Fail code otherwise.
811</td>
812</tr>
813</tbody>
814</table></div>
815</div>
816<hr>
817<div class="refsect2" lang="en">
818<a name="mix-audio-pause"></a><h3>mix_audio_pause ()</h3>
819<pre class="programlisting">MIX_RESULT          mix_audio_pause                     (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix);</pre>
820<p>
821If the stream is configured to <a class="link" href="MixAudio-MixAudioConfigParams.html#MIX-DECODE-DIRECTRENDER--CAPS"><span class="type">MIX_DECODE_DIRECTRENDER</span></a>, application uses this call to change the stream state from <a class="link" href="MixAudio.html#MIX-STREAM-PLAYING--CAPS"><span class="type">MIX_STREAM_PLAYING</span></a> to <a class="link" href="MixAudio.html#MIX-STREAM-PAUSED--CAPS"><span class="type">MIX_STREAM_PAUSED</span></a>. Note that this method returns sucessful only when the resulting state reaches <a class="link" href="MixAudio.html#MIX-STREAM-PAUSED--CAPS"><span class="type">MIX_STREAM_PAUSED</span></a>. Meaning it will return fail code if it is called in a state such as <a class="link" href="MixAudio.html#MIX-STREAM-STOPPED--CAPS"><span class="type">MIX_STREAM_STOPPED</span></a>, where transitioning to <a class="link" href="MixAudio.html#MIX-STREAM-PAUSED--CAPS"><span class="type">MIX_STREAM_PAUSED</span></a> is not possible.
822</p>
823<p>
824In some situation, where there is potential race condition with the DRAINING operation, this method may return MIX_RESULT_NEED_RETRY to indicate last operation result is inclusive and request caller to call again.</p>
825<div class="variablelist"><table border="0">
826<col align="left" valign="top">
827<tbody>
828<tr>
829<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
830<td> <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object.
831</td>
832</tr>
833<tr>
834<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
835<td> <span class="type">MIX_RESULT_SUCCESS</span> if <a class="link" href="MixAudio.html#MIX-STREAM-PAUSED--CAPS"><span class="type">MIX_STREAM_PAUSED</span></a> state is reached successfully. <span class="type">MIX_RESULT_WRONG_STATE</span> if operation is not allowed with the current state.
836</td>
837</tr>
838</tbody>
839</table></div>
840</div>
841<hr>
842<div class="refsect2" lang="en">
843<a name="mix-audio-resume"></a><h3>mix_audio_resume ()</h3>
844<pre class="programlisting">MIX_RESULT          mix_audio_resume                    (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix);</pre>
845<p>
846If the stream is configured to <a class="link" href="MixAudio-MixAudioConfigParams.html#MIX-DECODE-DIRECTRENDER--CAPS"><span class="type">MIX_DECODE_DIRECTRENDER</span></a>, application uses this call to change the stream state to <a class="link" href="MixAudio.html#MIX-STREAM-PLAYING--CAPS"><span class="type">MIX_STREAM_PLAYING</span></a>. Note that this method returns sucessful only when the resulting state reaches <a class="link" href="MixAudio.html#MIX-STREAM-PAUSED--CAPS"><span class="type">MIX_STREAM_PAUSED</span></a>. Meaning it will return fail code if it is called in a state such as <a class="link" href="MixAudio.html#MIX-STREAM-DRAINING--CAPS"><span class="type">MIX_STREAM_DRAINING</span></a>, where transitioning to <a class="link" href="MixAudio.html#MIX-STREAM-PLAYING--CAPS"><span class="type">MIX_STREAM_PLAYING</span></a> is not possible.</p>
847<div class="variablelist"><table border="0">
848<col align="left" valign="top">
849<tbody>
850<tr>
851<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
852<td> <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object.
853</td>
854</tr>
855<tr>
856<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
857<td> <span class="type">MIX_RESULT_SUCCESS</span> if <a class="link" href="MixAudio.html#MIX-STREAM-PLAYING--CAPS"><span class="type">MIX_STREAM_PLAYING</span></a> state is reached successfully. <span class="type">MIX_RESULT_WRONG_STATE</span> if operation is not allowed with the current state.
858</td>
859</tr>
860</tbody>
861</table></div>
862</div>
863<hr>
864<div class="refsect2" lang="en">
865<a name="mix-audio-get-timestamp"></a><h3>mix_audio_get_timestamp ()</h3>
866<pre class="programlisting">MIX_RESULT          mix_audio_get_timestamp             (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
867                                                         guint64 *msecs);</pre>
868<p>
869This function can be used to retrieve the current timestamp for audio playback in milliseconds.  The timestamp will reflect the amount of audio data rendered since the start of stream, or since the last stop.  Note that the timestamp is always reset to zero when the stream enter <a class="link" href="MixAudio.html#MIX-STREAM-STOPPED--CAPS"><span class="type">MIX_STREAM_STOPPED</span></a> state. The timestamp is an unsigned long value, so the value will wrap when the timestamp reaches <span class="type">ULONG_MAX</span>. This function is only valid in direct-render mode.</p>
870<div class="variablelist"><table border="0">
871<col align="left" valign="top">
872<tbody>
873<tr>
874<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
875<td> <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object.
876</td>
877</tr>
878<tr>
879<td><p><span class="term"><em class="parameter"><code>msecs</code></em> :</span></p></td>
880<td> play time in milliseconds.
881</td>
882</tr>
883<tr>
884<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
885<td> <span class="type">MIX_RESULT_SUCCESS</span> if the timestamp is available. <span class="type">MIX_RESULT_WRONG_MODE</span> if operation is not allowed with the current mode.
886</td>
887</tr>
888</tbody>
889</table></div>
890</div>
891<hr>
892<div class="refsect2" lang="en">
893<a name="mix-audio-set-mute"></a><h3>mix_audio_set_mute ()</h3>
894<pre class="programlisting">MIX_RESULT          mix_audio_set_mute                  (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
895                                                         gboolean mute);</pre>
896<p>
897This function is used to mute and unmute audio playback. While muted, playback would continue but silently. This function is only valid when the session is configured to <a class="link" href="MixAudio-MixAudioConfigParams.html#MIX-DECODE-DIRECTRENDER--CAPS"><span class="type">MIX_DECODE_DIRECTRENDER</span></a> mode.
898</p>
899<p>
900Note that playback volumn may change due to change of global settings while stream is muted.</p>
901<div class="variablelist"><table border="0">
902<col align="left" valign="top">
903<tbody>
904<tr>
905<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
906<td> <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object.
907</td>
908</tr>
909<tr>
910<td><p><span class="term"><em class="parameter"><code>mute</code></em> :</span></p></td>
911<td> Turn mute on/off.
912</td>
913</tr>
914<tr>
915<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
916<td> <span class="type">MIX_RESULT_SUCCESS</span> on success or other fail code.
917</td>
918</tr>
919</tbody>
920</table></div>
921</div>
922<hr>
923<div class="refsect2" lang="en">
924<a name="mix-audio-get-mute"></a><h3>mix_audio_get_mute ()</h3>
925<pre class="programlisting">MIX_RESULT          mix_audio_get_mute                  (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
926                                                         gboolean *muted);</pre>
927<p>
928Get Mute.</p>
929<div class="variablelist"><table border="0">
930<col align="left" valign="top">
931<tbody>
932<tr>
933<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
934<td> <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object.
935</td>
936</tr>
937<tr>
938<td><p><span class="term"><em class="parameter"><code>muted</code></em> :</span></p></td>
939<td> current mute state.
940</td>
941</tr>
942<tr>
943<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
944<td> <span class="type">MIX_RESULT_SUCCESS</span> on success or other fail code.
945</td>
946</tr>
947</tbody>
948</table></div>
949</div>
950<hr>
951<div class="refsect2" lang="en">
952<a name="mix-audio-get-max-vol"></a><h3>mix_audio_get_max_vol ()</h3>
953<pre class="programlisting">MIX_RESULT          mix_audio_get_max_vol               (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
954                                                         gint *maxvol);</pre>
955<p>
956This function can be used if the application will be setting the audio volume using decibels instead of percentage.  The maximum volume in decibels supported by the driver will be returned.  This value can be used to determine the upper bound of the decibel range in calculating volume levels.  This value is a signed integer. This function is only valid if stream is configured to <a class="link" href="MixAudio-MixAudioConfigParams.html#MIX-DECODE-DIRECTRENDER--CAPS"><span class="type">MIX_DECODE_DIRECTRENDER</span></a> mode.</p>
957<div class="variablelist"><table border="0">
958<col align="left" valign="top">
959<tbody>
960<tr>
961<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
962<td> <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object.
963</td>
964</tr>
965<tr>
966<td><p><span class="term"><em class="parameter"><code>maxvol</code></em> :</span></p></td>
967<td> pointer to receive max volumn.
968</td>
969</tr>
970<tr>
971<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
972<td> <span class="type">MIX_RESULT_SUCCESS</span> on success or other fail code.
973</td>
974</tr>
975</tbody>
976</table></div>
977</div>
978<hr>
979<div class="refsect2" lang="en">
980<a name="mix-audio-get-min-vol"></a><h3>mix_audio_get_min_vol ()</h3>
981<pre class="programlisting">MIX_RESULT          mix_audio_get_min_vol               (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
982                                                         gint *minvol);</pre>
983<p>
984This function can be used if the application will be setting the audio volume using decibels instead of percentage.  The minimum volume in decibels supported by the driver will be returned.  This value can be used to determine the lower bound of the decibel range in calculating volume levels.  This value is a signed integer. This function is only valid if stream is configured to <a class="link" href="MixAudio-MixAudioConfigParams.html#MIX-DECODE-DIRECTRENDER--CAPS"><span class="type">MIX_DECODE_DIRECTRENDER</span></a> mode.</p>
985<div class="variablelist"><table border="0">
986<col align="left" valign="top">
987<tbody>
988<tr>
989<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
990<td> <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object.
991</td>
992</tr>
993<tr>
994<td><p><span class="term"><em class="parameter"><code>minvol</code></em> :</span></p></td>
995<td> pointer to receive max volumn.
996</td>
997</tr>
998<tr>
999<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
1000<td> <span class="type">MIX_RESULT_SUCCESS</span> on success or other fail code.
1001</td>
1002</tr>
1003</tbody>
1004</table></div>
1005</div>
1006<hr>
1007<div class="refsect2" lang="en">
1008<a name="mix-audio-get-volume"></a><h3>mix_audio_get_volume ()</h3>
1009<pre class="programlisting">MIX_RESULT          mix_audio_get_volume                (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
1010                                                         gint *currvol,
1011                                                         <a class="link" href="MixAudio.html#MixVolType" title="enum MixVolType">MixVolType</a> type);</pre>
1012<p>
1013This function returns the current volume setting in either decibels or percentage. This function is only valid if stream is configured to <a class="link" href="MixAudio-MixAudioConfigParams.html#MIX-DECODE-DIRECTRENDER--CAPS"><span class="type">MIX_DECODE_DIRECTRENDER</span></a> mode.</p>
1014<div class="variablelist"><table border="0">
1015<col align="left" valign="top">
1016<tbody>
1017<tr>
1018<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
1019<td> <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object.
1020</td>
1021</tr>
1022<tr>
1023<td><p><span class="term"><em class="parameter"><code>currvol</code></em> :</span></p></td>
1024<td> Current volume. Note that if <em class="parameter"><code>type</code></em> equals <a class="link" href="MixAudio.html#MIX-VOL-PERCENT--CAPS"><span class="type">MIX_VOL_PERCENT</span></a>, this value will be return within the range of 0 to 100 inclusive.
1025</td>
1026</tr>
1027<tr>
1028<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
1029<td> The type represented by <em class="parameter"><code>currvol</code></em>.
1030</td>
1031</tr>
1032<tr>
1033<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
1034<td> <span class="type">MIX_RESULT_SUCCESS</span> on success or other fail code.
1035</td>
1036</tr>
1037</tbody>
1038</table></div>
1039</div>
1040<hr>
1041<div class="refsect2" lang="en">
1042<a name="mix-audio-set-volume"></a><h3>mix_audio_set_volume ()</h3>
1043<pre class="programlisting">MIX_RESULT          mix_audio_set_volume                (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
1044                                                         gint currvol,
1045                                                         <a class="link" href="MixAudio.html#MixVolType" title="enum MixVolType">MixVolType</a> type,
1046                                                         gulong msecs,
1047                                                         <a class="link" href="MixAudio.html#MixVolRamp" title="enum MixVolRamp">MixVolRamp</a> ramptype);</pre>
1048<p>
1049This function sets the current volume setting in either decibels or percentage.  This function is only valid if the stream is configured to <a class="link" href="MixAudio-MixAudioConfigParams.html#MIX-DECODE-DIRECTRENDER--CAPS"><span class="type">MIX_DECODE_DIRECTRENDER</span></a> mode.</p>
1050<div class="variablelist"><table border="0">
1051<col align="left" valign="top">
1052<tbody>
1053<tr>
1054<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
1055<td> <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object.
1056</td>
1057</tr>
1058<tr>
1059<td><p><span class="term"><em class="parameter"><code>currvol</code></em> :</span></p></td>
1060<td> Current volume. Note that if <em class="parameter"><code>type</code></em> equals <a class="link" href="MixAudio.html#MIX-VOL-PERCENT--CAPS"><span class="type">MIX_VOL_PERCENT</span></a>, this value will be trucated to within the range of 0 to 100 inclusive.
1061</td>
1062</tr>
1063<tr>
1064<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
1065<td> The type represented by <em class="parameter"><code>currvol</code></em>.
1066</td>
1067</tr>
1068<tr>
1069<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
1070<td> <span class="type">MIX_RESULT_SUCCESS</span> on success or other fail code.
1071</td>
1072</tr>
1073</tbody>
1074</table></div>
1075</div>
1076<hr>
1077<div class="refsect2" lang="en">
1078<a name="mix-audio-deinitialize"></a><h3>mix_audio_deinitialize ()</h3>
1079<pre class="programlisting">MIX_RESULT          mix_audio_deinitialize              (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix);</pre>
1080<p>
1081This function will uninitialize a session with this MI-X instance.  During this call, the SST device will be closed and resources including mmapped buffers would be freed.This function should be called by the application once <code class="function">mix_audio_init()</code> has been called.
1082</p>
1083<p>
1084</p>
1085<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1086<h3 class="title">Intel Audio Manager Support</h3>
1087The SST stream would be unregistered with Intel Audio Manager if it was registered.
1088</div>
1089<p>
1090</p>
1091<p>
1092Note that if this method should not fail normally. If it does return failure, the state of this object and the underlying mechanism is compromised and application should not attempt to reuse this object.</p>
1093<div class="variablelist"><table border="0">
1094<col align="left" valign="top">
1095<tbody>
1096<tr>
1097<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
1098<td> <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object.
1099</td>
1100</tr>
1101<tr>
1102<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
1103<td> <span class="type">MIX_RESULT_SUCCESS</span> on success or other fail code.
1104</td>
1105</tr>
1106</tbody>
1107</table></div>
1108</div>
1109<hr>
1110<div class="refsect2" lang="en">
1111<a name="mix-audio-get-stream-state"></a><h3>mix_audio_get_stream_state ()</h3>
1112<pre class="programlisting">MIX_RESULT          mix_audio_get_stream_state          (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
1113                                                         <a class="link" href="MixAudio.html#MixStreamState" title="enum MixStreamState">MixStreamState</a> *streamState);</pre>
1114<p>
1115Get the stream state of the current stream.</p>
1116<div class="variablelist"><table border="0">
1117<col align="left" valign="top">
1118<tbody>
1119<tr>
1120<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
1121<td> <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object.
1122</td>
1123</tr>
1124<tr>
1125<td><p><span class="term"><em class="parameter"><code>streamState</code></em> :</span></p></td>
1126<td> pointer to receive stream state.
1127</td>
1128</tr>
1129<tr>
1130<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
1131<td> <span class="type">MIX_RESULT</span>
1132</td>
1133</tr>
1134</tbody>
1135</table></div>
1136</div>
1137<hr>
1138<div class="refsect2" lang="en">
1139<a name="mix-audio-get-state"></a><h3>mix_audio_get_state ()</h3>
1140<pre class="programlisting">MIX_RESULT          mix_audio_get_state                 (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
1141                                                         <a class="link" href="MixAudio.html#MixState" title="enum MixState">MixState</a> *state);</pre>
1142<p>
1143Get the device state of the audio session.</p>
1144<div class="variablelist"><table border="0">
1145<col align="left" valign="top">
1146<tbody>
1147<tr>
1148<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
1149<td> <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object.
1150</td>
1151</tr>
1152<tr>
1153<td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td>
1154<td> pointer to receive state
1155</td>
1156</tr>
1157<tr>
1158<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
1159<td> Current device state.
1160</td>
1161</tr>
1162</tbody>
1163</table></div>
1164</div>
1165<hr>
1166<div class="refsect2" lang="en">
1167<a name="mix-audio-am-is-enabled"></a><h3>mix_audio_am_is_enabled ()</h3>
1168<pre class="programlisting">gboolean            mix_audio_am_is_enabled             (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix);</pre>
1169<p>
1170This method checks if the current session is configure to use Intel Audio Manager. Note that Intel Audio Manager is considered disabled if the stream has not be initialized to use the service explicitly.</p>
1171<div class="variablelist"><table border="0">
1172<col align="left" valign="top">
1173<tbody>
1174<tr>
1175<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
1176<td> <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object.
1177</td>
1178</tr>
1179<tr>
1180<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
1181<td> boolean indicates if Intel Audio Manager is enabled with the current session.
1182</td>
1183</tr>
1184</tbody>
1185</table></div>
1186</div>
1187<hr>
1188<div class="refsect2" lang="en">
1189<a name="mix-audio-is-am-available"></a><h3>mix_audio_is_am_available ()</h3>
1190<pre class="programlisting">MIX_RESULT          mix_audio_is_am_available           (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
1191                                                         <a class="link" href="MixAudio-mixaudiotypes.html#MixAudioManager" title="enum MixAudioManager">MixAudioManager</a> am,
1192                                                         gboolean *avail);</pre>
1193<p>
1194Check if AM is available.</p>
1195<div class="variablelist"><table border="0">
1196<col align="left" valign="top">
1197<tbody>
1198<tr>
1199<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
1200<td> TBD
1201</td>
1202</tr>
1203<tr>
1204<td><p><span class="term"><em class="parameter"><code>am</code></em> :</span></p></td>
1205<td> TBD
1206</td>
1207</tr>
1208<tr>
1209<td><p><span class="term"><em class="parameter"><code>avail</code></em> :</span></p></td>
1210<td> TBD
1211</td>
1212</tr>
1213<tr>
1214<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
1215<td> TBD
1216</td>
1217</tr>
1218</tbody>
1219</table></div>
1220</div>
1221<hr>
1222<div class="refsect2" lang="en">
1223<a name="mix-audio-get-output-configuration"></a><h3>mix_audio_get_output_configuration ()</h3>
1224<pre class="programlisting">MIX_RESULT          mix_audio_get_output_configuration  (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
1225                                                         <a class="link" href="MixAudio-MixAudioConfigParams.html#MixAudioConfigParams" title="MixAudioConfigParams">MixAudioConfigParams</a> **audioconfigparams);</pre>
1226<p>
1227This method retrieve the current configuration. This can be called after initialization. If a stream has been configured, it returns the corresponding derive object of MixAudioConfigParams.</p>
1228<div class="variablelist"><table border="0">
1229<col align="left" valign="top">
1230<tbody>
1231<tr>
1232<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
1233<td> <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object.
1234</td>
1235</tr>
1236<tr>
1237<td><p><span class="term"><em class="parameter"><code>audioconfigparams</code></em> :</span></p></td>
1238<td> double pointer to hold output configuration.
1239</td>
1240</tr>
1241<tr>
1242<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
1243<td> <span class="type">MIX_RESULT_SUCCESS</span> on success or other fail code.
1244</td>
1245</tr>
1246</tbody>
1247</table></div>
1248</div>
1249<hr>
1250<div class="refsect2" lang="en">
1251<a name="mix-audio-get-stream-byte-decoded"></a><h3>mix_audio_get_stream_byte_decoded ()</h3>
1252<pre class="programlisting">MIX_RESULT          mix_audio_get_stream_byte_decoded   (<a class="link" href="MixAudio.html" title="MixAudio">MixAudio</a> *mix,
1253                                                         guint64 *byte);</pre>
1254<p>
1255Retrive the culmulative byte decoded.
1256</p>
1257<p>
1258<em><span class="remark">Not Implemented.</span></em></p>
1259<div class="variablelist"><table border="0">
1260<col align="left" valign="top">
1261<tbody>
1262<tr>
1263<td><p><span class="term"><em class="parameter"><code>mix</code></em> :</span></p></td>
1264<td> <a class="link" href="MixAudio.html" title="MixAudio"><span class="type">MixAudio</span></a> object.
1265</td>
1266</tr>
1267<tr>
1268<td><p><span class="term"><em class="parameter"><code>msecs</code></em> :</span></p></td>
1269<td> stream byte decoded..
1270</td>
1271</tr>
1272<tr>
1273<td><p><span class="term"><em class="parameter"><code>returns</code></em> :</span></p></td>
1274<td> <span class="type">MIX_RESULT_SUCCESS</span> if the value is available. <span class="type">MIX_RESULT_WRONG_MODE</span> if operation is not allowed with the current mode.
1275</td>
1276</tr>
1277</tbody>
1278</table></div>
1279</div>
1280</div>
1281</div>
1282<div class="footer">
1283<hr>
1284          Generated by GTK-Doc V1.11</div>
1285</body>
1286</html>
1287