|
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 <cmmaeventsource.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 CMMAEventSource* eventSource = |
|
48 JavaUnhand< CMMAEventSource >(aEventSource); |
|
49 |
|
50 CAMMSReverbSourceControlGroup* control = |
|
51 static_cast< CAMMSReverbSourceControlGroup* >( |
|
52 JavaUnhand< CAMMSControlGroup >(aControl)); |
|
53 |
|
54 return control->RoomLevel(); |
|
55 } |
|
56 |
|
57 /* |
|
58 * Class: com_nokia_amms_control_audioeffect_ReverbSourceControl |
|
59 * Method: _setRoomLevel |
|
60 * Signature: (III)I |
|
61 */ |
|
62 JNIEXPORT jint JNICALL Java_com_nokia_amms_control_audioeffect_ReverbSourceControl__1setRoomLevel( |
|
63 JNIEnv*, |
|
64 jclass, |
|
65 jint aEventSource, |
|
66 jint aControl, |
|
67 jint aLevel) |
|
68 { |
|
69 CMMAEventSource* eventSource = |
|
70 JavaUnhand< CMMAEventSource >(aEventSource); |
|
71 |
|
72 CAMMSReverbSourceControlGroup* control = |
|
73 static_cast< CAMMSReverbSourceControlGroup* >( |
|
74 JavaUnhand< CAMMSControlGroup >(aControl)); |
|
75 |
|
76 TInt error; |
|
77 error = eventSource->ExecuteTrap(SetRoomLevelL, control, (TInt) aLevel); |
|
78 return error; |
|
79 } |
|
80 |
|
81 // End of File |