Adaptation/GUID-73B853D5-13E6-54E7-AA8B-C41EEDB5EA7F.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
permissions -rw-r--r--
Initial contribution of the Adaptation Documentation.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-73B853D5-13E6-54E7-AA8B-C41EEDB5EA7F" xml:lang="en"><title> RMdaDevSound-Based
Driver Migration</title><shortdesc>Explains how to convert an <codeph>RMdaDevSound</codeph> -based
sound driver to the current Sound Driver architecture. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>Symbian converted the PDD of the <codeph>RMdaDevSound</codeph> based driver
to an <xref href="GUID-B0118EDD-2B08-353E-BE92-2DC75E5622B3.dita"><apiname>RSoundSc</apiname></xref> version of the PDD. The same procedure was
used for this on all three platforms. </p>
<p>PDDs for the <codeph>RMdaDevSound</codeph> based driver have a significant
amount of code that is dedicated to creating and managing a circular buffer, <codeph>DSoundBuffer</codeph>,
for storing playback or record audio. In the <xref href="GUID-B0118EDD-2B08-353E-BE92-2DC75E5622B3.dita"><apiname>RSoundSc</apiname></xref> version
of the driver, this is taken care of by the shared chunk and this code can
be discarded. </p>
<p>For the remaining PDD code, although the LDD to PDD interface for the <codeph>RMdaDevSound</codeph> based
version is similar to the <xref href="GUID-B0118EDD-2B08-353E-BE92-2DC75E5622B3.dita"><apiname>RSoundSc</apiname></xref> version, it is best
to start by taking a copy of the template port as described in <xref href="GUID-C6ABE2CA-901E-55F1-9837-7018A1612BCF.dita">Set
Up</xref> , then fill in the sections marked TODO in the template code by
cutting and pasting the relevant code coming from a single function, this
is often called the same in each version of the driver. </p>
<p>One complication comes if the <xref href="GUID-B0118EDD-2B08-353E-BE92-2DC75E5622B3.dita"><apiname>RSoundSc</apiname></xref> version is to
support both record and playback driver channels, as this requires some of
the functionality to be moved to the shared PDD factory object. </p>
</conbody></concept>