javauis/amms_qt/jni/src/reverbsourcecontrol.cpp
branchRCL_3
changeset 24 0fd27995241b
child 26 dc7c549001d5
equal deleted inserted replaced
20:f9bb0fca356a 24:0fd27995241b
       
     1 /*
       
     2 * Copyright (c) 2002 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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 //#include <jutils.h>
       
    20 
       
    21 #include "com_nokia_amms_control_audioeffect_ReverbSourceControl.h"
       
    22 #include <mmafunctionserver.h>
       
    23 #include "cammsreverbsourcecontrolgroup.h"
       
    24 
       
    25 
       
    26 /**
       
    27  * wrapper for CAMMSReverbSourceControlGroup::SetRoomLevelL()
       
    28  */
       
    29 static void SetRoomLevelL(
       
    30     CAMMSReverbSourceControlGroup* aControl,
       
    31     TInt aLevel)
       
    32 {
       
    33     aControl->SetRoomLevelL(aLevel);
       
    34 }
       
    35 
       
    36 /*
       
    37  * Class:     com_nokia_amms_control_audioeffect_ReverbSourceControl
       
    38  * Method:    _getRoomLevel
       
    39  * Signature:
       
    40  */
       
    41 JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audioeffect_ReverbSourceControl__1getRoomLevel(
       
    42     JNIEnv*,
       
    43     jclass,
       
    44     jint aEventSource,
       
    45     jint aControl)
       
    46 {
       
    47     CAMMSReverbSourceControlGroup* control =
       
    48         static_cast< CAMMSReverbSourceControlGroup* >(
       
    49             reinterpret_cast< CAMMSControlGroup* >(aControl));
       
    50 
       
    51     return control->RoomLevel();
       
    52 }
       
    53 
       
    54 /*
       
    55  * Class:     com_nokia_amms_control_audioeffect_ReverbSourceControl
       
    56  * Method:    _setRoomLevel
       
    57  * Signature: (III)I
       
    58  */
       
    59 JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audioeffect_ReverbSourceControl__1setRoomLevel(
       
    60     JNIEnv*,
       
    61     jclass,
       
    62     jint aEventSource,
       
    63     jint aControl,
       
    64     jint aLevel)
       
    65 {
       
    66     MMAFunctionServer* eventSource =
       
    67 	    reinterpret_cast< MMAFunctionServer* >(aEventSource);
       
    68 
       
    69     CAMMSReverbSourceControlGroup* control =
       
    70         static_cast< CAMMSReverbSourceControlGroup* >(
       
    71             reinterpret_cast< CAMMSControlGroup* >(aControl));
       
    72 
       
    73     TInt error;
       
    74     error = eventSource->ExecuteTrap(SetRoomLevelL, control, (TInt) aLevel);
       
    75     return error;
       
    76 }
       
    77 
       
    78 //  End of File