Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 50facae208d4a6f280e44a513b104320 > files > 601

qt-mobility-doc-1.2.0-13.mga5.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qaudioformat.cpp -->
  <title>Qt Mobility 1.2: QAudioFormat Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="content"> 
    <a href="index.html" class="qtref"><span>QtMobility Reference Documentation</span></a>
  </div>
  <div class="breadcrumb toolblock">
    <ul>
      <li class="first"><a href="index.html">Home</a></li>
      <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtmultimediakit.html">QtMultimediaKit</a></li>
<li>QAudioFormat</li>
    </ul>
  </div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QAudioFormat Class Reference</h1>
<!-- $$$QAudioFormat-brief -->
<p>The QAudioFormat class stores audio parameter information. <a href="#details">More...</a></p>
<!-- @@@QAudioFormat -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QAudioFormat&gt;</span></pre><p>This class was introduced in Qt Mobility 1.0.</p>
<ul>
<li><a href="qaudioformat-members.html">List of all members, including inherited members</a></li>
<li><a href="qaudioformat-obsolete.html">Obsolete members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qaudioformat.html#Endian-enum">Endian</a></b> { BigEndian, LittleEndian }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qaudioformat.html#SampleType-enum">SampleType</a></b> { Unknown, SignedInt, UnSignedInt, Float }</td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qaudioformat.html#QAudioFormat">QAudioFormat</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qaudioformat.html#QAudioFormat-2">QAudioFormat</a></b> ( const QAudioFormat &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qaudioformat.html#dtor.QAudioFormat">~QAudioFormat</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAudioFormat::Endian </td><td class="memItemRight bottomAlign"><b><a href="qaudioformat.html#byteOrder">byteOrder</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qaudioformat.html#channelCount">channelCount</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qaudioformat.html#codec">codec</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qaudioformat.html#isValid">isValid</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qaudioformat.html#sampleRate">sampleRate</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qaudioformat.html#sampleSize">sampleSize</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAudioFormat::SampleType </td><td class="memItemRight bottomAlign"><b><a href="qaudioformat.html#sampleType">sampleType</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaudioformat.html#setByteOrder">setByteOrder</a></b> ( QAudioFormat::Endian <i>byteOrder</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaudioformat.html#setChannelCount">setChannelCount</a></b> ( int <i>channels</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaudioformat.html#setCodec">setCodec</a></b> ( const QString &amp; <i>codec</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaudioformat.html#setSampleRate">setSampleRate</a></b> ( int <i>samplerate</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaudioformat.html#setSampleSize">setSampleSize</a></b> ( int <i>sampleSize</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaudioformat.html#setSampleType">setSampleType</a></b> ( QAudioFormat::SampleType <i>sampleType</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qaudioformat.html#operator-not-eq">operator!=</a></b> ( const QAudioFormat &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAudioFormat &amp; </td><td class="memItemRight bottomAlign"><b><a href="qaudioformat.html#operator-eq">operator=</a></b> ( const QAudioFormat &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qaudioformat.html#operator-eq-eq">operator==</a></b> ( const QAudioFormat &amp; <i>other</i> ) const</td></tr>
</table>
<a name="details"></a>
<!-- $$$QAudioFormat-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QAudioFormat class stores audio parameter information.</p>
<p>An audio format specifies how data in an audio stream is arranged, i.e, how the stream is to be interpreted. The encoding itself is specified by the <a href="qaudioformat.html#codec">codec</a>() used for the stream.</p>
<p>In addition to the encoding, QAudioFormat contains other parameters that further specify how the audio data is arranged. These are the frequency, the number of channels, the sample size, the sample type, and the byte order. The following table describes these in more detail.</p>
<table class="generic">
<thead><tr class="qt-style"><th >Parameter</th><th >Description</th></tr></thead>
<tr valign="top" class="odd"><td >Sample Rate</td><td >Samples per second of audio data in Hertz.</td></tr>
<tr valign="top" class="even"><td >Number of channels</td><td >The number of audio channels (typically one for mono or two for stereo)</td></tr>
<tr valign="top" class="odd"><td >Sample size</td><td >How much data is stored in each sample (typically 8 or 16 bits)</td></tr>
<tr valign="top" class="even"><td >Sample type</td><td >Numerical representation of sample (typically signed integer, unsigned integer or float)</td></tr>
<tr valign="top" class="odd"><td >Byte order</td><td >Byte ordering of sample (typically little endian, big endian)</td></tr>
</table>
<p>You can obtain audio formats compatible with the audio device used through functions in <a href="qaudiodeviceinfo.html">QAudioDeviceInfo</a>. This class also lets you query available parameter values for a device, so that you can set the parameters yourself. See the <a href="qaudiodeviceinfo.html">QAudioDeviceInfo</a> class description for details. You need to know the format of the audio streams you wish to play. Qt does not set up formats for you.</p>
</div>
<!-- @@@QAudioFormat -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Endian$$$BigEndian$$$LittleEndian -->
<h3 class="fn"><a name="Endian-enum"></a>enum QAudioFormat::<span class="name">Endian</span></h3>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QAudioFormat::BigEndian</tt></td><td class="topAlign"><tt>QSysInfo::BigEndian</tt></td><td class="topAlign">samples are big endian byte order</td></tr>
<tr><td class="topAlign"><tt>QAudioFormat::LittleEndian</tt></td><td class="topAlign"><tt>QSysInfo::LittleEndian</tt></td><td class="topAlign">samples are little endian byte order</td></tr>
</table>
<!-- @@@Endian -->
<!-- $$$SampleType$$$Unknown$$$SignedInt$$$UnSignedInt$$$Float -->
<h3 class="fn"><a name="SampleType-enum"></a>enum QAudioFormat::<span class="name">SampleType</span></h3>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QAudioFormat::Unknown</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Not Set</td></tr>
<tr><td class="topAlign"><tt>QAudioFormat::SignedInt</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">samples are signed integers</td></tr>
<tr><td class="topAlign"><tt>QAudioFormat::UnSignedInt</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">samples are unsigned intergers</td></tr>
<tr><td class="topAlign"><tt>QAudioFormat::Float</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">samples are floats</td></tr>
</table>
<!-- @@@SampleType -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QAudioFormat[overload1]$$$QAudioFormat -->
<h3 class="fn"><a name="QAudioFormat"></a>QAudioFormat::<span class="name">QAudioFormat</span> ()</h3>
<p>Construct a new audio format.</p>
<p>Values are initialized as follows:</p>
<ul>
<li><a href="qaudioformat.html#sampleRate">sampleRate</a>() = -1</li>
<li><a href="qaudioformat.html#channelCount">channelCount</a>() = -1</li>
<li><a href="qaudioformat.html#sampleSize">sampleSize</a>() = -1</li>
<li><a href="qaudioformat.html#byteOrder">byteOrder</a>() = <a href="qaudioformat.html#Endian-enum">QAudioFormat::Endian</a>(<a href="http://qt.nokia.com/doc/4.7/qsysinfo.html#Endian-enum">QSysInfo::ByteOrder</a>)</li>
<li><a href="qaudioformat.html#sampleType">sampleType</a>() = <a href="qaudioformat.html#SampleType-enum">QAudioFormat::Unknown</a> <tt>codec()</tt> = &quot;&quot;</li>
</ul>
<!-- @@@QAudioFormat -->
<!-- $$$QAudioFormat$$$QAudioFormatconstQAudioFormat& -->
<h3 class="fn"><a name="QAudioFormat-2"></a>QAudioFormat::<span class="name">QAudioFormat</span> ( const <span class="type">QAudioFormat</span> &amp; <i>other</i> )</h3>
<p>Construct a new audio format using <i>other</i>.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@QAudioFormat -->
<!-- $$$~QAudioFormat[overload1]$$$~QAudioFormat -->
<h3 class="fn"><a name="dtor.QAudioFormat"></a>QAudioFormat::<span class="name">~QAudioFormat</span> ()</h3>
<p>Destroy this audio format.</p>
<!-- @@@~QAudioFormat -->
<!-- $$$byteOrder[overload1]$$$byteOrder -->
<h3 class="fn"><a name="byteOrder"></a><span class="type"><a href="qaudioformat.html#Endian-enum">QAudioFormat::Endian</a></span> QAudioFormat::<span class="name">byteOrder</span> () const</h3>
<p>Returns the current byteOrder value.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qaudioformat.html#setByteOrder">setByteOrder</a>().</p>
<!-- @@@byteOrder -->
<!-- $$$channelCount[overload1]$$$channelCount -->
<h3 class="fn"><a name="channelCount"></a><span class="type">int</span> QAudioFormat::<span class="name">channelCount</span> () const</h3>
<p>Returns the current channel count value.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qaudioformat.html#setChannelCount">setChannelCount</a>().</p>
<!-- @@@channelCount -->
<!-- $$$codec[overload1]$$$codec -->
<h3 class="fn"><a name="codec"></a><span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> QAudioFormat::<span class="name">codec</span> () const</h3>
<p>Returns the current codec value.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qaudioformat.html#setCodec">setCodec</a>() and <a href="qaudiodeviceinfo.html#supportedCodecs">QAudioDeviceInfo::supportedCodecs</a>().</p>
<!-- @@@codec -->
<!-- $$$isValid[overload1]$$$isValid -->
<h3 class="fn"><a name="isValid"></a><span class="type">bool</span> QAudioFormat::<span class="name">isValid</span> () const</h3>
<p>Returns true if all of the parameters are valid.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@isValid -->
<!-- $$$sampleRate[overload1]$$$sampleRate -->
<h3 class="fn"><a name="sampleRate"></a><span class="type">int</span> QAudioFormat::<span class="name">sampleRate</span> () const</h3>
<p>Returns the current sample rate in Hertz.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qaudioformat.html#setSampleRate">setSampleRate</a>().</p>
<!-- @@@sampleRate -->
<!-- $$$sampleSize[overload1]$$$sampleSize -->
<h3 class="fn"><a name="sampleSize"></a><span class="type">int</span> QAudioFormat::<span class="name">sampleSize</span> () const</h3>
<p>Returns the current sample size value.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qaudioformat.html#setSampleSize">setSampleSize</a>().</p>
<!-- @@@sampleSize -->
<!-- $$$sampleType[overload1]$$$sampleType -->
<h3 class="fn"><a name="sampleType"></a><span class="type"><a href="qaudioformat.html#SampleType-enum">QAudioFormat::SampleType</a></span> QAudioFormat::<span class="name">sampleType</span> () const</h3>
<p>Returns the current <a href="qaudioformat.html#SampleType-enum">SampleType</a> value.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qaudioformat.html#setSampleType">setSampleType</a>().</p>
<!-- @@@sampleType -->
<!-- $$$setByteOrder[overload1]$$$setByteOrderQAudioFormat::Endian -->
<h3 class="fn"><a name="setByteOrder"></a><span class="type">void</span> QAudioFormat::<span class="name">setByteOrder</span> ( <span class="type"><a href="qaudioformat.html#Endian-enum">QAudioFormat::Endian</a></span> <i>byteOrder</i> )</h3>
<p>Sets the byteOrder to <i>byteOrder</i>.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qaudioformat.html#byteOrder">byteOrder</a>().</p>
<!-- @@@setByteOrder -->
<!-- $$$setChannelCount[overload1]$$$setChannelCountint -->
<h3 class="fn"><a name="setChannelCount"></a><span class="type">void</span> QAudioFormat::<span class="name">setChannelCount</span> ( <span class="type">int</span> <i>channels</i> )</h3>
<p>Sets the channel count to <i>channels</i>.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qaudioformat.html#channelCount">channelCount</a>().</p>
<!-- @@@setChannelCount -->
<!-- $$$setCodec[overload1]$$$setCodecconstQString& -->
<h3 class="fn"><a name="setCodec"></a><span class="type">void</span> QAudioFormat::<span class="name">setCodec</span> ( const <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> &amp; <i>codec</i> )</h3>
<p>Sets the codec to <i>codec</i>.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qaudioformat.html#codec">codec</a>() and <a href="qaudiodeviceinfo.html#supportedCodecs">QAudioDeviceInfo::supportedCodecs</a>().</p>
<!-- @@@setCodec -->
<!-- $$$setSampleRate[overload1]$$$setSampleRateint -->
<h3 class="fn"><a name="setSampleRate"></a><span class="type">void</span> QAudioFormat::<span class="name">setSampleRate</span> ( <span class="type">int</span> <i>samplerate</i> )</h3>
<p>Sets the sample rate to <i>samplerate</i> Hertz.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qaudioformat.html#sampleRate">sampleRate</a>().</p>
<!-- @@@setSampleRate -->
<!-- $$$setSampleSize[overload1]$$$setSampleSizeint -->
<h3 class="fn"><a name="setSampleSize"></a><span class="type">void</span> QAudioFormat::<span class="name">setSampleSize</span> ( <span class="type">int</span> <i>sampleSize</i> )</h3>
<p>Sets the sample size to the <i>sampleSize</i> specified.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qaudioformat.html#sampleSize">sampleSize</a>().</p>
<!-- @@@setSampleSize -->
<!-- $$$setSampleType[overload1]$$$setSampleTypeQAudioFormat::SampleType -->
<h3 class="fn"><a name="setSampleType"></a><span class="type">void</span> QAudioFormat::<span class="name">setSampleType</span> ( <span class="type"><a href="qaudioformat.html#SampleType-enum">QAudioFormat::SampleType</a></span> <i>sampleType</i> )</h3>
<p>Sets the sampleType to <i>sampleType</i>.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qaudioformat.html#sampleType">sampleType</a>().</p>
<!-- @@@setSampleType -->
<!-- $$$operator!=[overload1]$$$operator!=constQAudioFormat& -->
<h3 class="fn"><a name="operator-not-eq"></a><span class="type">bool</span> QAudioFormat::<span class="name">operator!=</span> ( const <span class="type">QAudioFormat</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if this <a href="qaudioformat.html">QAudioFormat</a> is not equal to the <i>other</i> <a href="qaudioformat.html">QAudioFormat</a>; otherwise returns false.</p>
<p>All elements of <a href="qaudioformat.html">QAudioFormat</a> are used for the comparison.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@operator!= -->
<!-- $$$operator=[overload1]$$$operator=constQAudioFormat& -->
<h3 class="fn"><a name="operator-eq"></a><span class="type">QAudioFormat</span> &amp; QAudioFormat::<span class="name">operator=</span> ( const <span class="type">QAudioFormat</span> &amp; <i>other</i> )</h3>
<p>Assigns <i>other</i> to this <a href="qaudioformat.html">QAudioFormat</a> implementation.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQAudioFormat& -->
<h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> QAudioFormat::<span class="name">operator==</span> ( const <span class="type">QAudioFormat</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if this <a href="qaudioformat.html">QAudioFormat</a> is equal to the <i>other</i> <a href="qaudioformat.html">QAudioFormat</a>; otherwise returns false.</p>
<p>All elements of <a href="qaudioformat.html">QAudioFormat</a> are used for the comparison.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@operator== -->
</div>
  <div class="ft">
    <span></span>
  </div>
</div> 
<div class="footer">
  <p>
     <acronym title="Copyright">&copy;</acronym> 2008-2011 Nokia Corporation and/or its
     subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation 
     in Finland and/or other countries worldwide.</p>
  <p>
     All other trademarks are property of their respective owners. <a title="Privacy Policy"
     href="http://qt.nokia.com/about/privacy-policy">Privacy Policy</a></p>
  <br />
  <p>
    Licensees holding valid Qt Commercial licenses may use this document in accordance with the    Qt Commercial License Agreement provided with the Software or, alternatively, in accordance    with the terms contained in a written agreement between you and Nokia.</p>
  <p>
    Alternatively, this document may be used under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU
    Free Documentation License version 1.3</a>
    as published by the Free Software Foundation.</p>
</div>
</body>
</html>