Symbian3/SDK/Source/GUID-D62A282E-9DEA-5EF3-A606-20647BC5049D.dita
changeset 8 ae94777fff8f
parent 7 51a74ef9ed63
child 13 48780e181b38
equal deleted inserted replaced
7:51a74ef9ed63 8:ae94777fff8f
     9 -->
     9 -->
    10 <!DOCTYPE concept
    10 <!DOCTYPE concept
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    12 <concept xml:lang="en" id="GUID-D62A282E-9DEA-5EF3-A606-20647BC5049D"><title>Audio Client Overview </title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This document provides an overview of the Audio Client. </p> <section><title>Purpose</title> <p>The Audio Client provides an interface to: </p> <ul><li id="GUID-E1752C25-893D-5859-A9B7-C527AC115044"><p>Play back, record, and convert sound clips. </p> </li> <li id="GUID-5AF02D1B-25A9-59F0-B57B-7F0CAE7EB07D"><p>Play tone sequences and DTMF (Dual-Tone Multi-Frequency) strings. </p> </li> </ul> <p><b>Audio Client Library Details</b> </p> <p>The DLL that provides the functionality and the library to which your code must link is identified below. </p> <table id="GUID-28BCAB7A-147C-5519-8833-62ACA430C4D3"><tgroup cols="3"><colspec colname="col0"/><colspec colname="col1"/><colspec colname="col2"/><thead><row><entry>DLL</entry> <entry>LIB</entry> <entry>Short Description</entry> </row> </thead> <tbody><row><entry><p> <b>mediaclientaudio.dll</b>  </p> </entry> <entry><p> <b>mediaclientaudio.lib</b>  </p> </entry> <entry><p>These files are used for implementing the Audio Client. </p> </entry> </row> </tbody> </tgroup> </table> </section> <section><title>Architectural Relationship</title> <p>The methods for recording, converting, and playing audio clips or tones interact with the lower levels of MMF (known as the controller framework). The controller framework is in turn responsible for managing the interface to audio hardware. On some phones, this is implemented as a device driver; on others it may be implemented as a connection to a lower level hardware controller. </p> <p>Clients using any of the <xref href="GUID-29FB1DE6-D00C-3E6B-A8AA-476FAFD7F26C.dita"><apiname>CMdaAudioRecorderUtility</apiname></xref>, <xref href="GUID-810D29DA-8332-3E63-8A63-5B8A04EC9688.dita"><apiname>CMdaAudioConvertUtility</apiname></xref>, <xref href="GUID-778D24B5-A68E-3C91-B66A-69007FBA4791.dita"><apiname>CMdaAudioPlayerUtility</apiname></xref> or <xref href="GUID-D728A286-A202-3915-9643-8FD70646F78A.dita"><apiname>CMdaAudioToneUtility</apiname></xref> classes must have an active scheduler running in their thread because the implementations use active objects and callbacks. </p> <p>How the tone player class interacts with other components of MMF is shown below. </p> <fig id="GUID-8273BE86-D5F9-528F-9147-0C0C58D9ABCD"><title>
    12 <concept xml:lang="en" id="GUID-D62A282E-9DEA-5EF3-A606-20647BC5049D"><title>Audio Client Overview </title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This document provides an overview of the Audio Client. </p> <section><title>Purpose</title> <p>The Audio Client provides an interface to: </p> <ul><li id="GUID-E1752C25-893D-5859-A9B7-C527AC115044"><p>Play back, record, and convert sound clips. </p> </li> <li id="GUID-5AF02D1B-25A9-59F0-B57B-7F0CAE7EB07D"><p>Play tone sequences and DTMF (Dual-Tone Multi-Frequency) strings. </p> </li> </ul> <p><b>Audio Client Library Details</b> </p> <p>The DLL that provides the functionality and the library to which your code must link is identified below. </p> <table id="GUID-28BCAB7A-147C-5519-8833-62ACA430C4D3"><tgroup cols="3"><colspec colname="col0"/><colspec colname="col1"/><colspec colname="col2"/><thead><row><entry>DLL</entry> <entry>LIB</entry> <entry>Short Description</entry> </row> </thead> <tbody><row><entry><p> <b>mediaclientaudio.dll</b>  </p> </entry> <entry><p> <b>mediaclientaudio.lib</b>  </p> </entry> <entry><p>These files are used for implementing the Audio Client. </p> </entry> </row> </tbody> </tgroup> </table> </section> <section><title>Architectural Relationship</title> <p>The methods for recording, converting, and playing audio clips or tones interact with the lower levels of MMF (known as the controller framework). The controller framework is in turn responsible for managing the interface to audio hardware. On some phones, this is implemented as a device driver; on others it may be implemented as a connection to a lower level hardware controller. </p> <p>Clients using any of the <xref href="GUID-29FB1DE6-D00C-3E6B-A8AA-476FAFD7F26C.dita"><apiname>CMdaAudioRecorderUtility</apiname></xref>, <xref href="GUID-810D29DA-8332-3E63-8A63-5B8A04EC9688.dita"><apiname>CMdaAudioConvertUtility</apiname></xref>, <xref href="GUID-778D24B5-A68E-3C91-B66A-69007FBA4791.dita"><apiname>CMdaAudioPlayerUtility</apiname></xref> or <xref href="GUID-D728A286-A202-3915-9643-8FD70646F78A.dita"><apiname>CMdaAudioToneUtility</apiname></xref> classes must have an active scheduler running in their thread because the implementations use active objects and callbacks. </p> <p>How the tone player class interacts with other components of MMF is shown below. </p> <fig id="GUID-8273BE86-D5F9-528F-9147-0C0C58D9ABCD"><title>
    13              Audio tone player overview 
    13              Audio tone player overview 
    14           </title> <image href="GUID-4F879832-8425-5C56-B3FE-4C4592EBB6A5_d0e313317_href.png" placement="inline"/></fig> </section> <section><title>Description</title> <p><b>Audio Playing, Recording, and Conversion</b> </p> <p>All three of the audio classes are plugin based, leaving the list of supported audio formats for input and output open ended. The audio file formats supported as standard by MMF are: AU, WAV and raw audio data. Each file format may support one or more compression algorithms (codecs). The standard file formats and corresponding codecs are shown below: </p> <table id="GUID-058548B8-0DEF-5E61-B9A1-6FEC07DCAA8A"><tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/><thead><row><entry>Audio file format</entry> <entry>Codecs supported</entry> </row> </thead> <tbody><row><entry><p>AU </p> </entry> <entry><p>A-Law, mu-law, signed 16 bit PCM big-endian, signed 8 bit PCM </p> </entry> </row> <row><entry><p>WAV </p> </entry> <entry><p>IMA-ADPCM, A-Law, mu-law, unsigned 8 bit PCM, gsm 6.10, signed 16 bit PCM </p> </entry> </row> <row><entry><p>raw data </p> </entry> <entry><p>Signed big-endian 16 bit PCM, signed 16 bit PCM, unsigned 16 bit PCM </p> </entry> </row> </tbody> </tgroup> </table> <p>Input and output audio data can be of any format supported by the installed plugins. When possible MMF uses a plugin resolver to determine the format and codecs to use. It determines this by checking the filename extension and reading any header data that may be present in the audio clip. The plugin resolver cannot determine the format and codecs to use for raw audio, so in such cases you must specify this information yourself. A full list of supported plugins can be retrieved by using <xref href="GUID-810D29DA-8332-3E63-8A63-5B8A04EC9688.dita#GUID-810D29DA-8332-3E63-8A63-5B8A04EC9688/GUID-D0456E01-109E-3C93-949D-0452B09E886F"><apiname>CMdaAudioConvertUtility::GetSupportedDestinationDataTypesL()</apiname></xref>. </p> <p> <b> Note:</b> All audio clips can be uniquely identified for purposes of plugin assignment by their format (gsm z6.10, AU, WAV and so on) and their codec (for example for AU, valid codecs include A-Law, mu-law, signed 16 bit PCM big-endian, signed 8 bit PCM). Each format and codec has an arbitrary ID assigned to it by MMF and its associated plugin, for use with the "Open" functions of both <codeph>CMdaAudioConvertUtility</codeph> and <codeph>CMdaAudioRecorderUtility</codeph>. </p> <p id="GUID-B99776D8-B713-5C18-AB32-3BF13EDDFEBB"><b>Tone Playing</b> </p> <p>The Audio Client provide a simple interface for tone generation (synthesized sounds) that enables the playing of tone sequences and DTMF (Dual-Tone Multi-Frequency) strings. The tone player functionality is provided by the <xref href="GUID-D728A286-A202-3915-9643-8FD70646F78A.dita"><apiname>CMdaAudioToneUtility</apiname></xref> class and using this class you can play: </p> <ul><li id="GUID-5B1FD304-5905-5F3A-97C6-237A59F911A1"><p>Single tones of a specified duration and frequency. </p> </li> <li id="GUID-6CD5A5D6-8659-5DDB-B773-1513C663E4F6"><p>DTMF strings. </p> </li> <li id="GUID-9F98BD96-C5F6-5100-96FB-EA8396AE0364"><p>Sequences of tones held in files or descriptors. </p> </li> <li id="GUID-B27D9870-E9AE-5280-A144-E4C24AA91E09"><p>Predefined (fixed) sequences of tones held in the mobile equipment. </p> </li> </ul> </section> <section><title>Key Audio Client Classes</title> <p>The functionality provided by the Audio Client is contained within the following classes: </p> <ul><li id="GUID-0EF967E4-CFE1-5528-9EAB-BA0A2E71C6D3"><p> <xref href="GUID-29FB1DE6-D00C-3E6B-A8AA-476FAFD7F26C.dita"><apiname>CMdaAudioRecorderUtility</apiname></xref>  </p> </li> <li id="GUID-93D94E92-E9E6-523B-9C4B-02DF91D9976E"><p> <xref href="GUID-810D29DA-8332-3E63-8A63-5B8A04EC9688.dita"><apiname>CMdaAudioConvertUtility</apiname></xref>  </p> </li> <li id="GUID-CBD9AF2F-BB55-5D03-A87B-A7A23AAA4CD5"><p> <xref href="GUID-778D24B5-A68E-3C91-B66A-69007FBA4791.dita"><apiname>CMdaAudioPlayerUtility</apiname></xref>  </p> </li> <li id="GUID-3B16D9CB-B192-548F-B096-5BA7B0E89344"><p> <xref href="GUID-D728A286-A202-3915-9643-8FD70646F78A.dita"><apiname>CMdaAudioToneUtility</apiname></xref> <xref href="GUID-6BD89347-671F-3518-9777-55801A090C79.dita"><apiname/></xref>  </p> </li> </ul> </section> <section><title>Using the Audio Client</title> <p>Clients can use the Audio Client to: </p> <ul><li id="GUID-AB6FC77A-FD23-55F0-9A07-916D388CE19D"><p>Manipulate audio sources and sinks, add, retrieve and modify meta data and record audio data to files or descriptors. </p> </li> <li id="GUID-8557E211-D6E7-59FF-AE63-939A0BCBF3C4"><p>Convert audio clips contained in files or descriptors to other formats using the default codecs provided by MMF. </p> </li> <li id="GUID-E9D2FB84-0CF1-5873-BC5B-005869025A91"><p>Play audio clips contained in files, descriptors or URLs. </p> </li> <li id="GUID-C3C75693-4113-5684-9643-2C6DC1A5BCB0"><p>Play single tones, DTMF strings and tone sequences. </p> </li> </ul> </section> <section><title>See Also</title> <p><xref href="GUID-F46E4F89-B9ED-5A4A-B812-B605B925D0C0.dita">How to use the audio convert utility</xref>  </p> <p><xref href="GUID-4E1F04EB-09EA-5354-8EFF-BBC95F44C9AE.dita">How to use the audio player utility</xref>  </p> <p><xref href="GUID-BA2EEEC3-86AC-5B1C-81E2-CC571EB5AB3E.dita">How to use audio recorder utility</xref>  </p> <p><xref href="GUID-9EE78D5A-32BC-5E0F-9139-AF00CDB95CC1.dita">How to use the audio tone player utility</xref>  </p> <p><xref href="GUID-2D3F7471-9B92-5E49-B8BC-E0FA7AA709D7.dita">DevSound Overview</xref>  </p> </section> </conbody></concept>
    14           </title> <image href="GUID-4F879832-8425-5C56-B3FE-4C4592EBB6A5_d0e306923_href.png" placement="inline"/></fig> </section> <section><title>Description</title> <p><b>Audio Playing, Recording, and Conversion</b> </p> <p>All three of the audio classes are plugin based, leaving the list of supported audio formats for input and output open ended. The audio file formats supported as standard by MMF are: AU, WAV and raw audio data. Each file format may support one or more compression algorithms (codecs). The standard file formats and corresponding codecs are shown below: </p> <table id="GUID-058548B8-0DEF-5E61-B9A1-6FEC07DCAA8A"><tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/><thead><row><entry>Audio file format</entry> <entry>Codecs supported</entry> </row> </thead> <tbody><row><entry><p>AU </p> </entry> <entry><p>A-Law, mu-law, signed 16 bit PCM big-endian, signed 8 bit PCM </p> </entry> </row> <row><entry><p>WAV </p> </entry> <entry><p>IMA-ADPCM, A-Law, mu-law, unsigned 8 bit PCM, gsm 6.10, signed 16 bit PCM </p> </entry> </row> <row><entry><p>raw data </p> </entry> <entry><p>Signed big-endian 16 bit PCM, signed 16 bit PCM, unsigned 16 bit PCM </p> </entry> </row> </tbody> </tgroup> </table> <p>Input and output audio data can be of any format supported by the installed plugins. When possible MMF uses a plugin resolver to determine the format and codecs to use. It determines this by checking the filename extension and reading any header data that may be present in the audio clip. The plugin resolver cannot determine the format and codecs to use for raw audio, so in such cases you must specify this information yourself. A full list of supported plugins can be retrieved by using <xref href="GUID-810D29DA-8332-3E63-8A63-5B8A04EC9688.dita#GUID-810D29DA-8332-3E63-8A63-5B8A04EC9688/GUID-D0456E01-109E-3C93-949D-0452B09E886F"><apiname>CMdaAudioConvertUtility::GetSupportedDestinationDataTypesL()</apiname></xref>. </p> <p> <b> Note:</b> All audio clips can be uniquely identified for purposes of plugin assignment by their format (gsm z6.10, AU, WAV and so on) and their codec (for example for AU, valid codecs include A-Law, mu-law, signed 16 bit PCM big-endian, signed 8 bit PCM). Each format and codec has an arbitrary ID assigned to it by MMF and its associated plugin, for use with the "Open" functions of both <codeph>CMdaAudioConvertUtility</codeph> and <codeph>CMdaAudioRecorderUtility</codeph>. </p> <p id="GUID-B99776D8-B713-5C18-AB32-3BF13EDDFEBB"><b>Tone Playing</b> </p> <p>The Audio Client provide a simple interface for tone generation (synthesized sounds) that enables the playing of tone sequences and DTMF (Dual-Tone Multi-Frequency) strings. The tone player functionality is provided by the <xref href="GUID-D728A286-A202-3915-9643-8FD70646F78A.dita"><apiname>CMdaAudioToneUtility</apiname></xref> class and using this class you can play: </p> <ul><li id="GUID-5B1FD304-5905-5F3A-97C6-237A59F911A1"><p>Single tones of a specified duration and frequency. </p> </li> <li id="GUID-6CD5A5D6-8659-5DDB-B773-1513C663E4F6"><p>DTMF strings. </p> </li> <li id="GUID-9F98BD96-C5F6-5100-96FB-EA8396AE0364"><p>Sequences of tones held in files or descriptors. </p> </li> <li id="GUID-B27D9870-E9AE-5280-A144-E4C24AA91E09"><p>Predefined (fixed) sequences of tones held in the mobile equipment. </p> </li> </ul> </section> <section><title>Key Audio Client Classes</title> <p>The functionality provided by the Audio Client is contained within the following classes: </p> <ul><li id="GUID-0EF967E4-CFE1-5528-9EAB-BA0A2E71C6D3"><p> <xref href="GUID-29FB1DE6-D00C-3E6B-A8AA-476FAFD7F26C.dita"><apiname>CMdaAudioRecorderUtility</apiname></xref>  </p> </li> <li id="GUID-93D94E92-E9E6-523B-9C4B-02DF91D9976E"><p> <xref href="GUID-810D29DA-8332-3E63-8A63-5B8A04EC9688.dita"><apiname>CMdaAudioConvertUtility</apiname></xref>  </p> </li> <li id="GUID-CBD9AF2F-BB55-5D03-A87B-A7A23AAA4CD5"><p> <xref href="GUID-778D24B5-A68E-3C91-B66A-69007FBA4791.dita"><apiname>CMdaAudioPlayerUtility</apiname></xref>  </p> </li> <li id="GUID-3B16D9CB-B192-548F-B096-5BA7B0E89344"><p> <xref href="GUID-D728A286-A202-3915-9643-8FD70646F78A.dita"><apiname>CMdaAudioToneUtility</apiname></xref> <xref href="GUID-6BD89347-671F-3518-9777-55801A090C79.dita"><apiname/></xref>  </p> </li> </ul> </section> <section><title>Using the Audio Client</title> <p>Clients can use the Audio Client to: </p> <ul><li id="GUID-AB6FC77A-FD23-55F0-9A07-916D388CE19D"><p>Manipulate audio sources and sinks, add, retrieve and modify meta data and record audio data to files or descriptors. </p> </li> <li id="GUID-8557E211-D6E7-59FF-AE63-939A0BCBF3C4"><p>Convert audio clips contained in files or descriptors to other formats using the default codecs provided by MMF. </p> </li> <li id="GUID-E9D2FB84-0CF1-5873-BC5B-005869025A91"><p>Play audio clips contained in files, descriptors or URLs. </p> </li> <li id="GUID-C3C75693-4113-5684-9643-2C6DC1A5BCB0"><p>Play single tones, DTMF strings and tone sequences. </p> </li> </ul> </section> <section><title>See Also</title> <p><xref href="GUID-F46E4F89-B9ED-5A4A-B812-B605B925D0C0.dita">How to use the audio convert utility</xref>  </p> <p><xref href="GUID-4E1F04EB-09EA-5354-8EFF-BBC95F44C9AE.dita">How to use the audio player utility</xref>  </p> <p><xref href="GUID-BA2EEEC3-86AC-5B1C-81E2-CC571EB5AB3E.dita">How to use audio recorder utility</xref>  </p> <p><xref href="GUID-9EE78D5A-32BC-5E0F-9139-AF00CDB95CC1.dita">How to use the audio tone player utility</xref>  </p> <p><xref href="GUID-2D3F7471-9B92-5E49-B8BC-E0FA7AA709D7.dita">DevSound Overview</xref>  </p> </section> </conbody></concept>