audiostubs/devsoundextensions_stubs/audiocodeccistubs/speechencoderconfigcistub/src/SpeechEncoderConfigCIStub.cpp
changeset 0 0ce1b5ce9557
child 9 f935d51494d1
equal deleted inserted replaced
-1:000000000000 0:0ce1b5ce9557
       
     1 /*
       
     2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: Audio Stubs -
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include "SpeechEncoderConfigCI.h"
       
    22 #include <e32debug.h>
       
    23 
       
    24 // EXTERNAL DATA STRUCTURES
       
    25 
       
    26 // EXTERNAL FUNCTION PROTOTYPES
       
    27 
       
    28 // CONSTANTS
       
    29 
       
    30 // MACROS
       
    31 
       
    32 // LOCAL CONSTANTS AND MACROS
       
    33 
       
    34 // MODULE DATA STRUCTURES
       
    35 
       
    36 // LOCAL FUNCTION PROTOTYPES
       
    37 
       
    38 // FORWARD DECLARATIONS
       
    39 
       
    40 // ============================= LOCAL FUNCTIONS ===============================
       
    41 
       
    42 // ============================ MEMBER FUNCTIONS ===============================
       
    43 
       
    44 // -----------------------------------------------------------------------------
       
    45 // CSpeechEncoderConfigCI::CSpeechEncoderConfigCI
       
    46 // C++ default constructor can NOT contain any code, that
       
    47 // might leave.
       
    48 // -----------------------------------------------------------------------------
       
    49 //
       
    50 CSpeechEncoderConfigCI::CSpeechEncoderConfigCI()
       
    51     {
       
    52 
       
    53     }
       
    54 
       
    55 // -----------------------------------------------------------------------------
       
    56 // CSpeechEncoderConfigCI::ConstructL
       
    57 // Symbian 2nd phase constructor can leave.
       
    58 // -----------------------------------------------------------------------------
       
    59 //
       
    60 void CSpeechEncoderConfigCI::ConstructL()
       
    61     {
       
    62 
       
    63     }
       
    64 
       
    65 // -----------------------------------------------------------------------------
       
    66 // CSpeechEncoderConfigCI::NewL
       
    67 // Two-phased constructor.
       
    68 // -----------------------------------------------------------------------------
       
    69 //
       
    70 EXPORT_C CSpeechEncoderConfigCI* CSpeechEncoderConfigCI::NewL()
       
    71     {
       
    72 	CSpeechEncoderConfigCI* self = new (ELeave)CSpeechEncoderConfigCI;
       
    73 	CleanupStack::PushL(self);
       
    74 	self->ConstructL();
       
    75 	CleanupStack::Pop(self);
       
    76 	return self;
       
    77     }
       
    78 
       
    79 // Destructor
       
    80 EXPORT_C CSpeechEncoderConfigCI::~CSpeechEncoderConfigCI()
       
    81     {
       
    82 
       
    83     }
       
    84 
       
    85 // -----------------------------------------------------------------------------
       
    86 // CSpeechEncoderConfigCI::GetSupportedBitrates
       
    87 // ?implementation_description
       
    88 // (other items were commented in a header).
       
    89 // -----------------------------------------------------------------------------
       
    90 //
       
    91 EXPORT_C TInt CSpeechEncoderConfigCI::GetSupportedBitrates(RArray<TUint>& aSupportedBitrates)
       
    92     {
       
    93     aSupportedBitrates.Reset();
       
    94     aSupportedBitrates.Append(8000);
       
    95     aSupportedBitrates.Append(16000);
       
    96     aSupportedBitrates.Append(44100);
       
    97     aSupportedBitrates.Append(48000);
       
    98     RDebug::Print(_L("CSpeechEncoderConfigCI::GetSupportedBitrates"));
       
    99 	return KErrNone;
       
   100     }
       
   101 
       
   102 // -----------------------------------------------------------------------------
       
   103 // CSpeechEncoderConfigCI::SetBitrate
       
   104 // ?implementation_description
       
   105 // (other items were commented in a header).
       
   106 // -----------------------------------------------------------------------------
       
   107 //
       
   108 EXPORT_C TInt CSpeechEncoderConfigCI::SetBitrate(TUint aBitrate)
       
   109     {
       
   110     iBitrate = aBitrate;
       
   111     RDebug::Print(_L("CSpeechEncoderConfigCI::SetBitrate bitrate[%d]"), iBitrate);
       
   112     return KErrNone;
       
   113     }
       
   114 
       
   115 // -----------------------------------------------------------------------------
       
   116 // CSpeechEncoderConfigCI::GetBitrate
       
   117 // ?implementation_description
       
   118 // (other items were commented in a header).
       
   119 // -----------------------------------------------------------------------------
       
   120 //
       
   121 EXPORT_C TInt CSpeechEncoderConfigCI::GetBitrate(TUint& aBitrate)
       
   122     {
       
   123     aBitrate = iBitrate;
       
   124     RDebug::Print(_L("CSpeechEncoderConfigCI::GetBitrate bitrate[%d]"), aBitrate);
       
   125     return KErrNone;
       
   126     }
       
   127 
       
   128 // -----------------------------------------------------------------------------
       
   129 // CSpeechEncoderConfigCI::SetVadMode
       
   130 // ?implementation_description
       
   131 // (other items were commented in a header).
       
   132 // -----------------------------------------------------------------------------
       
   133 //
       
   134 EXPORT_C TInt CSpeechEncoderConfigCI::SetVadMode(TBool aVadMode)
       
   135     {
       
   136     iVadMode = aVadMode;
       
   137     RDebug::Print(_L("CSpeechEncoderConfigCI::SetVadMode VAD mode[%d]"), iVadMode);
       
   138     return KErrNone;
       
   139     }
       
   140 
       
   141 // -----------------------------------------------------------------------------
       
   142 // CSpeechEncoderConfigCI::GetVadMode
       
   143 // ?implementation_description
       
   144 // (other items were commented in a header).
       
   145 // -----------------------------------------------------------------------------
       
   146 //
       
   147 EXPORT_C TInt CSpeechEncoderConfigCI::GetVadMode(TBool& aVadMode)
       
   148     {
       
   149     aVadMode = iVadMode;
       
   150     RDebug::Print(_L("CSpeechEncoderConfigCI::GetVadMode VAD mode[%d]"), aVadMode);
       
   151     return KErrNone;
       
   152     }
       
   153 
       
   154