equal
deleted
inserted
replaced
17 |
17 |
18 #include "xanokiavolumeextitfadaptationmmf.h" |
18 #include "xanokiavolumeextitfadaptationmmf.h" |
19 #include "xamediaplayeradaptctxmmf.h" |
19 #include "xamediaplayeradaptctxmmf.h" |
20 #include "xamediarecorderadaptctxmmf.h" |
20 #include "xamediarecorderadaptctxmmf.h" |
21 #include "cmmfbackendengine.h" |
21 #include "cmmfbackendengine.h" |
|
22 #include "cmmfradiobackendengine.h" |
22 |
23 |
23 /* |
24 /* |
24 * XAresult XANokiaVolumeExtItfAdapt_SetMute(void *ctx, AdaptationContextIDS ctx->ctxId, XAboolean mute) |
25 * XAresult XANokiaVolumeExtItfAdapt_SetMute(void *ctx, AdaptationContextIDS ctx->ctxId, XAboolean mute) |
25 * @param void *ctx - Adaptation context, this will be casted to correct type regarding to contextID value given as 2nd parameter |
26 * @param void *ctx - Adaptation context, this will be casted to correct type regarding to contextID value given as 2nd parameter |
26 * @param AdaptationContextIDS ctx->ctxId - Type specifier for context, this will be used to cast ctx pointer to correct type. |
27 * @param AdaptationContextIDS ctx->ctxId - Type specifier for context, this will be used to cast ctx pointer to correct type. |
28 * @return XAresult ret - Success value |
29 * @return XAresult ret - Success value |
29 */ |
30 */ |
30 XAresult XANokiaVolumeExtItfAdapt_SetMute(XAAdaptationMMFCtx *ctx, XAboolean mute) |
31 XAresult XANokiaVolumeExtItfAdapt_SetMute(XAAdaptationMMFCtx *ctx, XAboolean mute) |
31 { |
32 { |
32 XAuint32 volume; |
33 XAuint32 volume; |
|
34 XAresult res = XA_RESULT_SUCCESS; |
|
35 |
33 DEBUG_API("->XANokiaVolumeExtItfAdapt_SetMute"); |
36 DEBUG_API("->XANokiaVolumeExtItfAdapt_SetMute"); |
34 if(!ctx || ( ctx->baseObj.ctxId != XAMediaPlayerAdaptation && |
37 if(!ctx || ( ctx->baseObj.ctxId != XAMediaPlayerAdaptation && |
35 ctx->baseObj.ctxId != XAMediaRecorderAdaptation && |
38 ctx->baseObj.ctxId != XAMediaRecorderAdaptation && |
36 ctx->baseObj.ctxId != XARadioAdaptation ) ) |
39 ctx->baseObj.ctxId != XARadioAdaptation ) ) |
37 { |
40 { |
75 ((XAMediaRecorderAdaptationMMFCtx*)ctx)->premutevol); |
78 ((XAMediaRecorderAdaptationMMFCtx*)ctx)->premutevol); |
76 } |
79 } |
77 } |
80 } |
78 else if ( ctx->baseObj.ctxId == XARadioAdaptation ) |
81 else if ( ctx->baseObj.ctxId == XARadioAdaptation ) |
79 { |
82 { |
80 |
83 mmf_set_player_adapt_context(cmmfradiobackendengine_init(), ctx); |
|
84 res = set_mute(cmmfradiobackendengine_init(), mute); |
81 } |
85 } |
82 |
86 |
83 DEBUG_API("<-XANokiaVolumeExtItfAdapt_SetMute"); |
87 DEBUG_API("<-XANokiaVolumeExtItfAdapt_SetMute"); |
84 return XA_RESULT_SUCCESS; |
88 return res; |
85 } |
89 } |
86 |
90 |
87 /* |
91 /* |
88 * XAresult XANokiaVolumeExtItfAdapt_EnableStereoPosition(XAAdaptationBaseCtx *ctx, XAboolean enable) |
92 * XAresult XANokiaVolumeExtItfAdapt_EnableStereoPosition(XAAdaptationBaseCtx *ctx, XAboolean enable) |
89 * @param XAAdaptationBaseCtx *ctx - Adaptation context |
93 * @param XAAdaptationBaseCtx *ctx - Adaptation context |
109 } |
113 } |
110 else if ( ctx->baseObj.ctxId == XAMediaRecorderAdaptation ) |
114 else if ( ctx->baseObj.ctxId == XAMediaRecorderAdaptation ) |
111 { |
115 { |
112 |
116 |
113 } |
117 } |
114 |
118 else if ( ctx->baseObj.ctxId == XARadioAdaptation ) |
|
119 { |
|
120 return XA_RESULT_FEATURE_UNSUPPORTED; |
|
121 } |
|
122 |
115 DEBUG_API("<-XANokiaVolumeExtItfAdapt_EnableStereoPosition"); |
123 DEBUG_API("<-XANokiaVolumeExtItfAdapt_EnableStereoPosition"); |
116 return XA_RESULT_SUCCESS; |
124 return XA_RESULT_SUCCESS; |
117 } |
125 } |
118 |
126 |
119 /* |
127 /* |
141 } |
149 } |
142 else if ( ctx->baseObj.ctxId == XAMediaRecorderAdaptation ) |
150 else if ( ctx->baseObj.ctxId == XAMediaRecorderAdaptation ) |
143 { |
151 { |
144 |
152 |
145 } |
153 } |
|
154 else if ( ctx->baseObj.ctxId == XARadioAdaptation ) |
|
155 { |
|
156 return XA_RESULT_FEATURE_UNSUPPORTED; |
|
157 } |
146 |
158 |
147 DEBUG_API("<-XANokiaVolumeExtItfAdapt_SetStereoPosition"); |
159 DEBUG_API("<-XANokiaVolumeExtItfAdapt_SetStereoPosition"); |
148 return XA_RESULT_SUCCESS; |
160 return XA_RESULT_SUCCESS; |
149 } |
161 } |
150 |
162 |