Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/class_c_m_m_f_record_test.html
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 13 Aug 2010 16:47:46 +0100
changeset 14 578be2adaf3e
parent 6 43e37759235e
permissions -rw-r--r--
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>TB9.2 Example Applications: CMMFRecordTest Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">
<h1>CMMFRecordTest Class Reference</h1><!-- doxytag: class="CMMFRecordTest" -->
<p><a href="class_c_m_m_f_record_test-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a373448249ca3b5b645b915cab1f2ca46"></a><!-- doxytag: member="CMMFRecordTest::Go" ref="a373448249ca3b5b645b915cab1f2ca46" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>Go</b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_m_m_f_record_test.html#a7d51322057936bba891cc6f375671e80">MoscoStateChangeEvent</a> (CBase *aObject, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode)</td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a223fa583d02e766942f59002ac21646c"></a><!-- doxytag: member="CMMFRecordTest::NewLC" ref="a223fa583d02e766942f59002ac21646c" args="()" -->
static <a class="el" href="class_c_m_m_f_record_test.html">CMMFRecordTest</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><b>NewLC</b> ()</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>This class implements a state machine that records a short clip using each format that the system supports. For each record format that the system supports, it will record 2s of audio to a file, then 2s of audio into a descriptor. It will then move onto the next format.</p>
<p>It is necessary to implement this as a state machine as we get asynchronous callbacks via MoscoStateChangeEvent which we have to wait for before we can continue to the next step.</p>
<p>For each record format, we go through these states in order: 1. EInitFile - while the file recording is initialised 2. (after the MoscoStateChangeEvent callback) ERecordFile - on a 2s timer while recording takes place 3. EDoOpenDesc - while recording into a descriptor is initialised 4. (after the MoscoStateChangeEvent callback) ERecordDesc - again on a 2s timer.</p>
<p>The logic implemented here is probably somewhat more complex that would be necessary for any normal recording, but it demonstrates the principal of how to use the recording API. </p>

<p>Definition at line <a class="el" href="mmfrec_8h_source.html#l00041">41</a> of file <a class="el" href="mmfrec_8h_source.html">mmfrec.h</a>.</p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a7d51322057936bba891cc6f375671e80"></a><!-- doxytag: member="CMMFRecordTest::MoscoStateChangeEvent" ref="a7d51322057936bba891cc6f375671e80" args="(CBase *aObject, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CMMFRecordTest::MoscoStateChangeEvent </td>
          <td>(</td>
          <td class="paramtype">CBase *&nbsp;</td>
          <td class="paramname"> <em>aObject</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">TInt&nbsp;</td>
          <td class="paramname"> <em>aPreviousState</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">TInt&nbsp;</td>
          <td class="paramname"> <em>aCurrentState</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">TInt&nbsp;</td>
          <td class="paramname"> <em>aErrorCode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This is called by the recorder utility whenever some event occurs relating to the recording. For example, it is called after initialisation when the utility is ready to begin recording. It would be called again if there was a problem during recording that meant it had to be terminated. </p>

<p>Definition at line <a class="el" href="mmfrec_8cpp_source.html#l00102">102</a> of file <a class="el" href="mmfrec_8cpp_source.html">mmfrec.cpp</a>.</p>

</div>
</div>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
</body>
</html>