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