Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > fba57c789abf4ed3484c767370e6ce0d > files > 180

lib64pulseaudio-devel-0.9.9-7mdv2008.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>PulseAudio: volume.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.5 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
<h1>volume.h</h1><a href="volume_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef foovolumehfoo</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define foovolumehfoo</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="comment">/* $Id: volume.h 1971 2007-10-28 19:13:50Z lennart $ */</span>
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 <span class="comment">/***</span>
<a name="l00007"></a>00007 <span class="comment">  This file is part of PulseAudio.</span>
<a name="l00008"></a>00008 <span class="comment"></span>
<a name="l00009"></a>00009 <span class="comment">  Copyright 2004-2006 Lennart Poettering</span>
<a name="l00010"></a>00010 <span class="comment">  Copyright 2006 Pierre Ossman &lt;ossman@cendio.se&gt; for Cendio AB</span>
<a name="l00011"></a>00011 <span class="comment"></span>
<a name="l00012"></a>00012 <span class="comment">  PulseAudio is free software; you can redistribute it and/or modify</span>
<a name="l00013"></a>00013 <span class="comment">  it under the terms of the GNU Lesser General Public License as published</span>
<a name="l00014"></a>00014 <span class="comment">  by the Free Software Foundation; either version 2 of the License,</span>
<a name="l00015"></a>00015 <span class="comment">  or (at your option) any later version.</span>
<a name="l00016"></a>00016 <span class="comment"></span>
<a name="l00017"></a>00017 <span class="comment">  PulseAudio is distributed in the hope that it will be useful, but</span>
<a name="l00018"></a>00018 <span class="comment">  WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00019"></a>00019 <span class="comment">  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
<a name="l00020"></a>00020 <span class="comment">  General Public License for more details.</span>
<a name="l00021"></a>00021 <span class="comment"></span>
<a name="l00022"></a>00022 <span class="comment">  You should have received a copy of the GNU Lesser General Public License</span>
<a name="l00023"></a>00023 <span class="comment">  along with PulseAudio; if not, write to the Free Software</span>
<a name="l00024"></a>00024 <span class="comment">  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307</span>
<a name="l00025"></a>00025 <span class="comment">  USA.</span>
<a name="l00026"></a>00026 <span class="comment">***/</span>
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;pulse/cdecl.h&gt;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &lt;<a class="code" href="sample_8h.html" title="Constants and routines for sample type handling.">pulse/sample.h</a>&gt;</span>
<a name="l00031"></a>00031 
<a name="l00094"></a>00094 PA_C_DECL_BEGIN
<a name="l00095"></a>00095 
<a name="l00101"></a><a class="code" href="volume_8h.html#6d671c65284ff2e94d3773c7368a0352">00101</a> <span class="keyword">typedef</span> uint32_t <a class="code" href="volume_8h.html#6d671c65284ff2e94d3773c7368a0352" title="Volume specification: PA_VOLUME_MUTED: silence; &amp;lt; PA_VOLUME_NORM: decreased volume;...">pa_volume_t</a>;
<a name="l00102"></a>00102 
<a name="l00104"></a><a class="code" href="volume_8h.html#ded56902e68e0f8ab576339bde55960e">00104</a> <span class="preprocessor">#define PA_VOLUME_NORM (0x10000)</span>
<a name="l00105"></a>00105 <span class="preprocessor"></span>
<a name="l00107"></a><a class="code" href="volume_8h.html#9e6e4562a3be216d39ad2246f0339f4c">00107</a> <span class="preprocessor">#define PA_VOLUME_MUTED (0)</span>
<a name="l00108"></a>00108 <span class="preprocessor"></span>
<a name="l00110"></a><a class="code" href="structpa__cvolume.html">00110</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structpa__cvolume.html" title="A structure encapsulating a per-channel volume.">pa_cvolume</a> {
<a name="l00111"></a><a class="code" href="structpa__cvolume.html#03f1742e241a995c6d76b6f7794fd342">00111</a>     uint8_t <a class="code" href="structpa__cvolume.html#03f1742e241a995c6d76b6f7794fd342" title="Number of channels.">channels</a>;                     
<a name="l00112"></a><a class="code" href="structpa__cvolume.html#c47f79992e87428386d20411ebc9c32a">00112</a>     <a class="code" href="volume_8h.html#6d671c65284ff2e94d3773c7368a0352" title="Volume specification: PA_VOLUME_MUTED: silence; &amp;lt; PA_VOLUME_NORM: decreased volume;...">pa_volume_t</a> <a class="code" href="structpa__cvolume.html#c47f79992e87428386d20411ebc9c32a" title="Per-channel volume.">values</a>[<a class="code" href="sample_8h.html#4c6778fd8a093f9984ce0448f81d9dcf" title="Maximum number of allowed channels.">PA_CHANNELS_MAX</a>];  
<a name="l00113"></a>00113 } <a class="code" href="structpa__cvolume.html" title="A structure encapsulating a per-channel volume.">pa_cvolume</a>;
<a name="l00114"></a>00114 
<a name="l00116"></a>00116 <span class="keywordtype">int</span> <a class="code" href="volume_8h.html#84b52cdbff47aad9c058df783f342b57" title="Return non-zero when *a == *b.">pa_cvolume_equal</a>(<span class="keyword">const</span> <a class="code" href="structpa__cvolume.html" title="A structure encapsulating a per-channel volume.">pa_cvolume</a> *a, <span class="keyword">const</span> <a class="code" href="structpa__cvolume.html" title="A structure encapsulating a per-channel volume.">pa_cvolume</a> *b) PA_GCC_PURE;
<a name="l00117"></a>00117 
<a name="l00119"></a><a class="code" href="volume_8h.html#a2701828c290031c9bca9036f5148c72">00119</a> <span class="preprocessor">#define pa_cvolume_reset(a, n) pa_cvolume_set((a), (n), PA_VOLUME_NORM)</span>
<a name="l00120"></a>00120 <span class="preprocessor"></span>
<a name="l00122"></a><a class="code" href="volume_8h.html#04805cb4b83ded75deca9c122977d8fb">00122</a> <span class="preprocessor">#define pa_cvolume_mute(a, n) pa_cvolume_set((a), (n), PA_VOLUME_MUTED)</span>
<a name="l00123"></a>00123 <span class="preprocessor"></span>
<a name="l00125"></a>00125 <a class="code" href="structpa__cvolume.html" title="A structure encapsulating a per-channel volume.">pa_cvolume</a>* <a class="code" href="volume_8h.html#0777581d85a1d4bf9c831bdacaac51ac" title="Set the volume of all channels to the specified parameter.">pa_cvolume_set</a>(<a class="code" href="structpa__cvolume.html" title="A structure encapsulating a per-channel volume.">pa_cvolume</a> *a, <span class="keywordtype">unsigned</span> channels, <a class="code" href="volume_8h.html#6d671c65284ff2e94d3773c7368a0352" title="Volume specification: PA_VOLUME_MUTED: silence; &amp;lt; PA_VOLUME_NORM: decreased volume;...">pa_volume_t</a> v);
<a name="l00126"></a>00126 
<a name="l00128"></a><a class="code" href="volume_8h.html#4162617e79bec0c7972326cf28a98712">00128</a> <span class="preprocessor">#define PA_CVOLUME_SNPRINT_MAX 64</span>
<a name="l00129"></a>00129 <span class="preprocessor"></span>
<a name="l00131"></a>00131 <span class="keywordtype">char</span> *<a class="code" href="volume_8h.html#99f2e389f425b888d3a02ade86d7c85f" title="Pretty print a volume structure.">pa_cvolume_snprint</a>(<span class="keywordtype">char</span> *s, <span class="keywordtype">size_t</span> l, <span class="keyword">const</span> <a class="code" href="structpa__cvolume.html" title="A structure encapsulating a per-channel volume.">pa_cvolume</a> *c);
<a name="l00132"></a>00132 
<a name="l00134"></a>00134 <a class="code" href="volume_8h.html#6d671c65284ff2e94d3773c7368a0352" title="Volume specification: PA_VOLUME_MUTED: silence; &amp;lt; PA_VOLUME_NORM: decreased volume;...">pa_volume_t</a> <a class="code" href="volume_8h.html#0f34f2c6d1b4738bf7f11ff06775dc1f" title="Return the average volume of all channels.">pa_cvolume_avg</a>(<span class="keyword">const</span> <a class="code" href="structpa__cvolume.html" title="A structure encapsulating a per-channel volume.">pa_cvolume</a> *a) PA_GCC_PURE;
<a name="l00135"></a>00135 
<a name="l00137"></a>00137 <span class="keywordtype">int</span> <a class="code" href="volume_8h.html#ba14d00682b29838ef39ca5a9afe8972" title="Return TRUE when the passed cvolume structure is valid, FALSE otherwise.">pa_cvolume_valid</a>(<span class="keyword">const</span> <a class="code" href="structpa__cvolume.html" title="A structure encapsulating a per-channel volume.">pa_cvolume</a> *v) PA_GCC_PURE;
<a name="l00138"></a>00138 
<a name="l00140"></a>00140 <span class="keywordtype">int</span> <a class="code" href="volume_8h.html#2dd140d5c2fadd1d8cb7aa0eace05109" title="Return non-zero if the volume of all channels is equal to the specified value.">pa_cvolume_channels_equal_to</a>(<span class="keyword">const</span> <a class="code" href="structpa__cvolume.html" title="A structure encapsulating a per-channel volume.">pa_cvolume</a> *a, <a class="code" href="volume_8h.html#6d671c65284ff2e94d3773c7368a0352" title="Volume specification: PA_VOLUME_MUTED: silence; &amp;lt; PA_VOLUME_NORM: decreased volume;...">pa_volume_t</a> v) PA_GCC_PURE;
<a name="l00141"></a>00141 
<a name="l00143"></a><a class="code" href="volume_8h.html#6b8766a2f30420a83457d2e1f0f139b2">00143</a> <span class="preprocessor">#define pa_cvolume_is_muted(a) pa_cvolume_channels_equal_to((a), PA_VOLUME_MUTED)</span>
<a name="l00144"></a>00144 <span class="preprocessor"></span>
<a name="l00146"></a><a class="code" href="volume_8h.html#0b374bbe16de9ac047fc4e5f6994390c">00146</a> <span class="preprocessor">#define pa_cvolume_is_norm(a) pa_cvolume_channels_equal_to((a), PA_VOLUME_NORM)</span>
<a name="l00147"></a>00147 <span class="preprocessor"></span>
<a name="l00149"></a>00149 <a class="code" href="volume_8h.html#6d671c65284ff2e94d3773c7368a0352" title="Volume specification: PA_VOLUME_MUTED: silence; &amp;lt; PA_VOLUME_NORM: decreased volume;...">pa_volume_t</a> <a class="code" href="volume_8h.html#1ca01f5bd640e7c5b2d3a6dad9093226" title="Multiply two volumes specifications, return the result.">pa_sw_volume_multiply</a>(<a class="code" href="volume_8h.html#6d671c65284ff2e94d3773c7368a0352" title="Volume specification: PA_VOLUME_MUTED: silence; &amp;lt; PA_VOLUME_NORM: decreased volume;...">pa_volume_t</a> a, <a class="code" href="volume_8h.html#6d671c65284ff2e94d3773c7368a0352" title="Volume specification: PA_VOLUME_MUTED: silence; &amp;lt; PA_VOLUME_NORM: decreased volume;...">pa_volume_t</a> b) PA_GCC_CONST;
<a name="l00150"></a>00150 
<a name="l00152"></a>00152 <a class="code" href="structpa__cvolume.html" title="A structure encapsulating a per-channel volume.">pa_cvolume</a> *<a class="code" href="volume_8h.html#3055944924cfb464d1745c8eaf800314" title="Multiply to per-channel volumes and return the result in *dest.">pa_sw_cvolume_multiply</a>(<a class="code" href="structpa__cvolume.html" title="A structure encapsulating a per-channel volume.">pa_cvolume</a> *dest, <span class="keyword">const</span> <a class="code" href="structpa__cvolume.html" title="A structure encapsulating a per-channel volume.">pa_cvolume</a> *a, <span class="keyword">const</span> <a class="code" href="structpa__cvolume.html" title="A structure encapsulating a per-channel volume.">pa_cvolume</a> *b) PA_GCC_PURE;
<a name="l00153"></a>00153 
<a name="l00155"></a>00155 <a class="code" href="volume_8h.html#6d671c65284ff2e94d3773c7368a0352" title="Volume specification: PA_VOLUME_MUTED: silence; &amp;lt; PA_VOLUME_NORM: decreased volume;...">pa_volume_t</a> <a class="code" href="volume_8h.html#d638dfbc737f126e743584665ea8f557" title="Convert a decibel value to a volume.">pa_sw_volume_from_dB</a>(<span class="keywordtype">double</span> f) PA_GCC_CONST;
<a name="l00156"></a>00156 
<a name="l00158"></a>00158 <span class="keywordtype">double</span> <a class="code" href="volume_8h.html#297851419c1e994d9fd2cfbb49aa480a" title="Convert a volume to a decibel value.">pa_sw_volume_to_dB</a>(<a class="code" href="volume_8h.html#6d671c65284ff2e94d3773c7368a0352" title="Volume specification: PA_VOLUME_MUTED: silence; &amp;lt; PA_VOLUME_NORM: decreased volume;...">pa_volume_t</a> v) PA_GCC_CONST;
<a name="l00159"></a>00159 
<a name="l00161"></a>00161 <a class="code" href="volume_8h.html#6d671c65284ff2e94d3773c7368a0352" title="Volume specification: PA_VOLUME_MUTED: silence; &amp;lt; PA_VOLUME_NORM: decreased volume;...">pa_volume_t</a> <a class="code" href="volume_8h.html#afb4825a03178ee327e55ae0866b7471" title="Convert a linear factor to a volume.">pa_sw_volume_from_linear</a>(<span class="keywordtype">double</span> v) PA_GCC_CONST;
<a name="l00162"></a>00162 
<a name="l00164"></a>00164 <span class="keywordtype">double</span> <a class="code" href="volume_8h.html#04da6c4572a758a0244bbfc81d370cfb" title="Convert a volume to a linear factor.">pa_sw_volume_to_linear</a>(<a class="code" href="volume_8h.html#6d671c65284ff2e94d3773c7368a0352" title="Volume specification: PA_VOLUME_MUTED: silence; &amp;lt; PA_VOLUME_NORM: decreased volume;...">pa_volume_t</a> v) PA_GCC_CONST;
<a name="l00165"></a>00165 
<a name="l00166"></a>00166 <span class="preprocessor">#ifdef INFINITY</span>
<a name="l00167"></a>00167 <span class="preprocessor"></span><span class="preprocessor">#define PA_DECIBEL_MININFTY (-INFINITY)</span>
<a name="l00168"></a>00168 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00169"></a>00169 <span class="preprocessor"></span>
<a name="l00170"></a><a class="code" href="volume_8h.html#e0b917d42c58310ed848916058d75f27">00170</a> <span class="preprocessor">#define PA_DECIBEL_MININFTY (-200)</span>
<a name="l00171"></a>00171 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00172"></a>00172 <span class="preprocessor"></span>
<a name="l00173"></a>00173 PA_C_DECL_END
<a name="l00174"></a>00174 
<a name="l00175"></a>00175 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Mar 26 12:02:40 2008 for PulseAudio by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
</body>
</html>