|
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 "WmaDecoderIntfcCI.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 // CWmaDecoderIntfcCI::CWmaDecoderIntfcCI |
|
46 // C++ default constructor can NOT contain any code, that |
|
47 // might leave. |
|
48 // ----------------------------------------------------------------------------- |
|
49 // |
|
50 CWmaDecoderIntfcCI::CWmaDecoderIntfcCI() |
|
51 { |
|
52 |
|
53 } |
|
54 |
|
55 // ----------------------------------------------------------------------------- |
|
56 // CWmaDecoderIntfcCI::ConstructL |
|
57 // Symbian 2nd phase constructor can leave. |
|
58 // ----------------------------------------------------------------------------- |
|
59 // |
|
60 void CWmaDecoderIntfcCI::ConstructL() |
|
61 { |
|
62 iCurrentFormat = EWma; |
|
63 iCurrentBitsPerSample = 8; |
|
64 iCurrentNumChannelsIn = 2; |
|
65 iCurrentSamplesPerSec = 4600; |
|
66 iCurrentAvgBytesPerSec = 3600; |
|
67 iCurrentBlockAlign = 4945; |
|
68 iCurrentEncodeOptions = 5; |
|
69 iCurrentEncodeOptions1 = 5; |
|
70 iCurrentEncodeOptions2 = 5; |
|
71 |
|
72 iCurrentChannelMask = 2; |
|
73 iCurrentSupportedMaxSampleRate = 8900; |
|
74 iCurrentSupportedMaxChannelsIn = 5678; |
|
75 iCurrentSupportedMaxBitrate = 4356; |
|
76 iCurrentEnable = CWmaDecoderIntfc::EToolOutput32Bit; |
|
77 iCurrentDisable = CWmaDecoderIntfc::EDownMixToStereo; |
|
78 /* |
|
79 iSupportedFormats.Append(EWma); |
|
80 iSupportedFormats.Append(EWmaPro); |
|
81 |
|
82 iSupportedTools.Append(EDownMixToStereo); |
|
83 iSupportedTools.Append(ELostDataConcealment); |
|
84 iSupportedTools.Append(EToolOutput32Bit); |
|
85 |
|
86 iControllableTools.Append(EToolOutput32Bit); |
|
87 iControllableTools.Append(EDownMixToStereo); |
|
88 iControllableTools.Append(EToolOutput32Bit); |
|
89 iControllableTools.Append(ELostDataConcealment); |
|
90 */ |
|
91 |
|
92 iCurrentSupportedFormats.Append(EWma); |
|
93 iCurrentSupportedFormats.Append(EWmaPro); |
|
94 |
|
95 iCurrentSupportedTools.Append(EDownMixToStereo); |
|
96 iCurrentSupportedTools.Append(ELostDataConcealment); |
|
97 // iCurrentSupportedTools.Append(EToolOutput32Bit); |
|
98 |
|
99 iCurrentControllableTools.Append(EToolOutput32Bit); |
|
100 // iCurrentControllableTools.Append(EDownMixToStereo); |
|
101 //iCurrentControllableTools.Append(EToolOutput32Bit); |
|
102 // iCurrentControllableTools.Append(ELostDataConcealment); |
|
103 |
|
104 // iCurrentControllableTools; |
|
105 |
|
106 |
|
107 } |
|
108 |
|
109 // ----------------------------------------------------------------------------- |
|
110 // CWmaDecoderIntfcCI::NewL |
|
111 // Two-phased constructor. |
|
112 // ----------------------------------------------------------------------------- |
|
113 // |
|
114 EXPORT_C CWmaDecoderIntfcCI* CWmaDecoderIntfcCI::NewL() |
|
115 { |
|
116 CWmaDecoderIntfcCI* self = new (ELeave)CWmaDecoderIntfcCI; |
|
117 CleanupStack::PushL(self); |
|
118 self->ConstructL(); |
|
119 CleanupStack::Pop(self); |
|
120 return self; |
|
121 } |
|
122 |
|
123 // Destructor |
|
124 EXPORT_C CWmaDecoderIntfcCI::~CWmaDecoderIntfcCI() |
|
125 { |
|
126 iCurrentSupportedFormats.Close(); |
|
127 iCurrentSupportedTools.Close(); |
|
128 iCurrentControllableTools.Close(); |
|
129 /* |
|
130 iSupportedFormats.Close(); |
|
131 iSupportedTools.Close(); |
|
132 iControllableTools.Close(); |
|
133 */ |
|
134 } |
|
135 |
|
136 // ----------------------------------------------------------------------------- |
|
137 // CWmaDecoderIntfcCI::SetAudioConfig |
|
138 // ?implementation_description |
|
139 // (other items were commented in a header). |
|
140 // ----------------------------------------------------------------------------- |
|
141 // |
|
142 // From CWmaDecoderIntfc |
|
143 /** |
|
144 * Configures format. |
|
145 * |
|
146 */ |
|
147 EXPORT_C void CWmaDecoderIntfcCI::SetFormat(TFormat aFormat) |
|
148 { |
|
149 iCurrentFormat = aFormat; |
|
150 } |
|
151 |
|
152 /** |
|
153 * Configures decoder's bits per sample. |
|
154 * |
|
155 */ |
|
156 EXPORT_C void CWmaDecoderIntfcCI::SetBitsPerSampleIn(TUint aBitsPerSample) |
|
157 { |
|
158 iCurrentBitsPerSample = aBitsPerSample; |
|
159 } |
|
160 |
|
161 /** |
|
162 * Configures decoder's number of channels. |
|
163 * |
|
164 */ |
|
165 EXPORT_C void CWmaDecoderIntfcCI::SetNumChannelsIn (TUint aNumChannelsIn) |
|
166 { |
|
167 iCurrentNumChannelsIn = aNumChannelsIn; |
|
168 } |
|
169 |
|
170 /** |
|
171 * Configures decoder's sample rate. |
|
172 * |
|
173 */ |
|
174 EXPORT_C void CWmaDecoderIntfcCI::SetSamplesPerSec (TUint aSamplesPerSec) |
|
175 { |
|
176 iCurrentSamplesPerSec = aSamplesPerSec; |
|
177 } |
|
178 |
|
179 /** |
|
180 * Configures decoder's average bytes per second. |
|
181 * |
|
182 */ |
|
183 EXPORT_C void CWmaDecoderIntfcCI::SetAvgBytesPerSec (TUint aAvgBytesPerSec) |
|
184 { |
|
185 iCurrentAvgBytesPerSec = aAvgBytesPerSec; |
|
186 } |
|
187 |
|
188 /** |
|
189 * Configures decoder's block align. |
|
190 * |
|
191 */ |
|
192 EXPORT_C void CWmaDecoderIntfcCI::SetBlockAlign (TUint aBlockAlign) |
|
193 { |
|
194 iCurrentBlockAlign = aBlockAlign; |
|
195 } |
|
196 |
|
197 /** |
|
198 * Configures decoder's Encode Options. |
|
199 * |
|
200 */ |
|
201 EXPORT_C void CWmaDecoderIntfcCI::SetEncodeOptions (TUint aEncodeOptions) |
|
202 { |
|
203 iCurrentEncodeOptions = aEncodeOptions; |
|
204 } |
|
205 |
|
206 /** |
|
207 * Configures decoder's Advance Encode Options. |
|
208 * |
|
209 */ |
|
210 EXPORT_C void CWmaDecoderIntfcCI::SetEncodeOptions1 (TUint aEncodeOptions) |
|
211 { |
|
212 iCurrentEncodeOptions1 = aEncodeOptions; |
|
213 } |
|
214 |
|
215 /** |
|
216 * Configures decoder's Advance Encode Options. |
|
217 * |
|
218 */ |
|
219 EXPORT_C void CWmaDecoderIntfcCI::SetEncodeOptions2 (TUint aEncodeOptions) |
|
220 { |
|
221 iCurrentEncodeOptions2 = aEncodeOptions; |
|
222 } |
|
223 |
|
224 /** |
|
225 * Configures decoder's Channel Mask. |
|
226 * |
|
227 */ |
|
228 EXPORT_C void CWmaDecoderIntfcCI::SetChannelMaskIn (TUint aChannelMask) |
|
229 { |
|
230 iCurrentChannelMask = aChannelMask; |
|
231 } |
|
232 |
|
233 /** |
|
234 * Returns decoder's current configured format. |
|
235 * |
|
236 */ |
|
237 EXPORT_C TInt CWmaDecoderIntfcCI::GetFormat (TFormat& aFormat) |
|
238 { |
|
239 TInt status = KErrNone; |
|
240 aFormat = iCurrentFormat; |
|
241 /* |
|
242 else if (iApplyConfStatus == KErrNone || iApplyConfStatus == KErrCompletion || |
|
243 iApplyConfStatus == KErrUnknown || iApplyConfStatus == KErrArgument || |
|
244 iApplyConfStatus == KErrNotReady || iApplyConfStatus == KErrNotFound) |
|
245 { |
|
246 status = iApplyConfStatus; |
|
247 } |
|
248 else |
|
249 { |
|
250 status = KErrGeneral; |
|
251 } |
|
252 */ |
|
253 return status; |
|
254 } |
|
255 |
|
256 /** |
|
257 * Returns configured bits per sample . |
|
258 * |
|
259 */ |
|
260 EXPORT_C TInt CWmaDecoderIntfcCI::GetBitsPerSampleIn(TUint& aBitsPerSample) |
|
261 { |
|
262 TInt status = KErrNone; |
|
263 aBitsPerSample = iCurrentBitsPerSample; |
|
264 /* |
|
265 else if (iApplyConfStatus == KErrNone || iApplyConfStatus == KErrCompletion || |
|
266 iApplyConfStatus == KErrUnknown || iApplyConfStatus == KErrArgument || |
|
267 iApplyConfStatus == KErrNotReady || iApplyConfStatus == KErrNotFound) |
|
268 { |
|
269 status = iApplyConfStatus; |
|
270 } |
|
271 else |
|
272 { |
|
273 status = KErrGeneral; |
|
274 } |
|
275 */ |
|
276 return status; |
|
277 } |
|
278 |
|
279 /** |
|
280 * Returns configured number of channels. |
|
281 * |
|
282 */ |
|
283 EXPORT_C TInt CWmaDecoderIntfcCI::GetNumOfChannelsIn (TUint& aNumOfChannels) |
|
284 { |
|
285 TInt status = KErrNone; |
|
286 aNumOfChannels = iCurrentNumChannelsIn; |
|
287 |
|
288 /* |
|
289 else if (iApplyConfStatus == KErrNone || iApplyConfStatus == KErrCompletion || |
|
290 iApplyConfStatus == KErrUnknown || iApplyConfStatus == KErrArgument || |
|
291 iApplyConfStatus == KErrNotReady || iApplyConfStatus == KErrNotFound) |
|
292 { |
|
293 status = iApplyConfStatus; |
|
294 } |
|
295 else |
|
296 { |
|
297 status = KErrGeneral; |
|
298 } |
|
299 */ |
|
300 return status; |
|
301 } |
|
302 |
|
303 /** |
|
304 * Returns configured sample rate. |
|
305 * |
|
306 */ |
|
307 EXPORT_C TInt CWmaDecoderIntfcCI::GetSamplesPerSec (TUint& aSamplesPerSec) |
|
308 { |
|
309 TInt status = KErrNone; |
|
310 aSamplesPerSec = iCurrentSamplesPerSec; |
|
311 /* |
|
312 else if (iApplyConfStatus == KErrNone || iApplyConfStatus == KErrCompletion || |
|
313 iApplyConfStatus == KErrUnknown || iApplyConfStatus == KErrArgument || |
|
314 iApplyConfStatus == KErrNotReady || iApplyConfStatus == KErrNotFound) |
|
315 { |
|
316 status = iApplyConfStatus; |
|
317 } |
|
318 else |
|
319 { |
|
320 status = KErrGeneral; |
|
321 } |
|
322 */ |
|
323 return status; |
|
324 } |
|
325 |
|
326 /** |
|
327 * Returns configured average bytes per second. |
|
328 * |
|
329 */ |
|
330 EXPORT_C TInt CWmaDecoderIntfcCI::GetAvgBytesPerSec (TUint& aAvgBytesPerSec) |
|
331 { |
|
332 TInt status = KErrNone; |
|
333 aAvgBytesPerSec = iCurrentAvgBytesPerSec; |
|
334 /* |
|
335 else if (iApplyConfStatus == KErrNone || iApplyConfStatus == KErrCompletion || |
|
336 iApplyConfStatus == KErrUnknown || iApplyConfStatus == KErrArgument || |
|
337 iApplyConfStatus == KErrNotReady || iApplyConfStatus == KErrNotFound) |
|
338 { |
|
339 status = iApplyConfStatus; |
|
340 } |
|
341 else |
|
342 { |
|
343 status = KErrGeneral; |
|
344 } |
|
345 */ |
|
346 |
|
347 return status; |
|
348 } |
|
349 |
|
350 /** |
|
351 * Returns configured block align. |
|
352 * |
|
353 */ |
|
354 EXPORT_C TInt CWmaDecoderIntfcCI::GetBlockAlign (TUint& aBlockAlign) |
|
355 { |
|
356 TInt status = KErrNone; |
|
357 aBlockAlign = iCurrentBlockAlign; |
|
358 /* |
|
359 else if (iApplyConfStatus == KErrNone || iApplyConfStatus == KErrCompletion || |
|
360 iApplyConfStatus == KErrUnknown || iApplyConfStatus == KErrArgument || |
|
361 iApplyConfStatus == KErrNotReady || iApplyConfStatus == KErrNotFound) |
|
362 { |
|
363 status = iApplyConfStatus; |
|
364 } |
|
365 else |
|
366 { |
|
367 status = KErrGeneral; |
|
368 } |
|
369 */ |
|
370 return status; |
|
371 } |
|
372 |
|
373 /** |
|
374 * Returns configured encode options. |
|
375 * |
|
376 */ |
|
377 EXPORT_C TInt CWmaDecoderIntfcCI::GetEncodeOptions (TUint& aEncodeOpts) |
|
378 { |
|
379 TInt status = KErrNone; |
|
380 aEncodeOpts = iCurrentEncodeOptions; |
|
381 /* |
|
382 else if (iApplyConfStatus == KErrNone || iApplyConfStatus == KErrCompletion || |
|
383 iApplyConfStatus == KErrUnknown || iApplyConfStatus == KErrArgument || |
|
384 iApplyConfStatus == KErrNotReady || iApplyConfStatus == KErrNotFound) |
|
385 { |
|
386 status = iApplyConfStatus; |
|
387 } |
|
388 else |
|
389 { |
|
390 status = KErrGeneral; |
|
391 } |
|
392 */ |
|
393 return status; |
|
394 } |
|
395 |
|
396 /** |
|
397 * Returns configured advanced encode options. |
|
398 * |
|
399 */ |
|
400 EXPORT_C TInt CWmaDecoderIntfcCI::GetEncodeOptions1 (TUint& aEncodeOpts1) |
|
401 { |
|
402 TInt status = KErrNone; |
|
403 aEncodeOpts1 = iCurrentEncodeOptions1; |
|
404 |
|
405 /* |
|
406 else if (iApplyConfStatus == KErrNone || iApplyConfStatus == KErrCompletion || |
|
407 iApplyConfStatus == KErrUnknown || iApplyConfStatus == KErrArgument || |
|
408 iApplyConfStatus == KErrNotReady || iApplyConfStatus == KErrNotFound || |
|
409 iApplyConfStatus == KErrNotSupported) |
|
410 { |
|
411 status = iApplyConfStatus; |
|
412 } |
|
413 else |
|
414 { |
|
415 status = KErrGeneral; |
|
416 } |
|
417 */ |
|
418 |
|
419 return status; |
|
420 } |
|
421 |
|
422 /** |
|
423 * Returns configured advanced encode options. |
|
424 * |
|
425 */ |
|
426 EXPORT_C TInt CWmaDecoderIntfcCI::GetEncodeOptions2 (TUint& aEncodeOpts2) |
|
427 { |
|
428 TInt status = KErrNone; |
|
429 aEncodeOpts2 = iCurrentEncodeOptions2; |
|
430 |
|
431 /* |
|
432 else if (iApplyConfStatus == KErrNone || iApplyConfStatus == KErrCompletion || |
|
433 iApplyConfStatus == KErrUnknown || iApplyConfStatus == KErrArgument || |
|
434 iApplyConfStatus == KErrNotReady || iApplyConfStatus == KErrNotFound || |
|
435 iApplyConfStatus == KErrNotSupported) |
|
436 { |
|
437 status = iApplyConfStatus; |
|
438 } |
|
439 else |
|
440 { |
|
441 status = KErrGeneral; |
|
442 } |
|
443 */ |
|
444 |
|
445 return status; |
|
446 } |
|
447 |
|
448 /** |
|
449 * Returns configured channel mask. |
|
450 * |
|
451 */ |
|
452 EXPORT_C TInt CWmaDecoderIntfcCI::GetChannelMaskIn (TUint& aChannelMask) |
|
453 { |
|
454 TInt status = KErrNone; |
|
455 aChannelMask = iCurrentChannelMask; |
|
456 /* |
|
457 else if (iApplyConfStatus == KErrNone || iApplyConfStatus == KErrCompletion || |
|
458 iApplyConfStatus == KErrUnknown || iApplyConfStatus == KErrArgument || |
|
459 iApplyConfStatus == KErrNotReady || iApplyConfStatus == KErrNotFound || |
|
460 iApplyConfStatus == KErrNotSupported) |
|
461 { |
|
462 status = iApplyConfStatus; |
|
463 } |
|
464 else |
|
465 { |
|
466 status = KErrGeneral; |
|
467 } |
|
468 */ |
|
469 return status; |
|
470 } |
|
471 |
|
472 /** |
|
473 * Returns supported formats. |
|
474 * |
|
475 */ |
|
476 EXPORT_C TInt CWmaDecoderIntfcCI::GetSupportedFormats(RArray<TFormat>& aSupportedFormats) |
|
477 { |
|
478 TInt status = KErrNone; |
|
479 TInt num = iCurrentSupportedFormats.Count(); |
|
480 aSupportedFormats.Reset(); |
|
481 for (int i = 0; i < num; ++i) |
|
482 { |
|
483 aSupportedFormats.Append(iCurrentSupportedFormats[i]); |
|
484 |
|
485 } |
|
486 return status; |
|
487 } |
|
488 |
|
489 |
|
490 /** |
|
491 * Returns supported tools. |
|
492 * |
|
493 */ |
|
494 EXPORT_C TInt CWmaDecoderIntfcCI::GetSupportedTools(RArray<TTool>& aSupportedTools) |
|
495 { |
|
496 TInt status = KErrNone; |
|
497 TInt num = iCurrentSupportedTools.Count(); |
|
498 aSupportedTools.Reset(); |
|
499 for (int i = 0; i < num; ++i) |
|
500 { |
|
501 aSupportedTools.Append(iCurrentSupportedTools[i]); |
|
502 |
|
503 } |
|
504 return status; |
|
505 } |
|
506 |
|
507 /** |
|
508 * Returns supported max number of channels. |
|
509 * |
|
510 */ |
|
511 EXPORT_C TInt CWmaDecoderIntfcCI::GetSupportedMaxChannelsIn(TUint& aSupportedMaxChannelsIn) |
|
512 { |
|
513 TInt status = KErrNone; |
|
514 aSupportedMaxChannelsIn = iCurrentSupportedMaxChannelsIn; |
|
515 return status; |
|
516 } |
|
517 |
|
518 /** |
|
519 * Returns supported max bit rate. |
|
520 * |
|
521 */ |
|
522 EXPORT_C TInt CWmaDecoderIntfcCI::GetSupportedMaxBitrate(TUint& aSupportedMaxBitrate) |
|
523 { |
|
524 TInt status = KErrNone; |
|
525 aSupportedMaxBitrate = iCurrentSupportedMaxBitrate; |
|
526 return status; |
|
527 } |
|
528 |
|
529 /** |
|
530 * Returns supported max sample rate. |
|
531 * |
|
532 */ |
|
533 EXPORT_C TInt CWmaDecoderIntfcCI::GetSupportedMaxSampleRate(TUint& aSupportedMaxSampleRate) |
|
534 { |
|
535 TInt status = KErrNone; |
|
536 aSupportedMaxSampleRate = iCurrentSupportedMaxSampleRate; |
|
537 return status; |
|
538 } |
|
539 |
|
540 /** |
|
541 * Returns controllable tools. |
|
542 * |
|
543 */ |
|
544 EXPORT_C TInt CWmaDecoderIntfcCI::GetControllableTools(RArray<TTool>& aControllableTools) |
|
545 { |
|
546 TInt status = KErrNone; |
|
547 TInt num = iCurrentControllableTools.Count(); |
|
548 aControllableTools.Reset(); |
|
549 for (int i = 0; i < num; ++i) |
|
550 { |
|
551 aControllableTools.Append(iCurrentControllableTools[i]); |
|
552 |
|
553 } |
|
554 return status; |
|
555 } |
|
556 |
|
557 /** |
|
558 * Enable tool. |
|
559 * |
|
560 */ |
|
561 EXPORT_C void CWmaDecoderIntfcCI::EnableTool(TTool aTool) |
|
562 { |
|
563 switch (aTool) |
|
564 { |
|
565 case EToolOutput32Bit: |
|
566 iCurrentToolOutPut32Bit = ETrue; |
|
567 break; |
|
568 case EDownMixToStereo: |
|
569 iCurrentToolDownMixToStereo = ETrue; |
|
570 break; |
|
571 case ELostDataConcealment: |
|
572 iCurrentToolLostDataConcealment = ETrue; |
|
573 break; |
|
574 default: |
|
575 break; |
|
576 } |
|
577 } |
|
578 /** |
|
579 * disable tool. |
|
580 * |
|
581 */ |
|
582 EXPORT_C void CWmaDecoderIntfcCI::DisableTool(TTool aTool) |
|
583 { |
|
584 switch (aTool) |
|
585 { |
|
586 case EToolOutput32Bit: |
|
587 iCurrentToolOutPut32Bit = EFalse; |
|
588 break; |
|
589 case EDownMixToStereo: |
|
590 iCurrentToolDownMixToStereo = EFalse; |
|
591 break; |
|
592 case ELostDataConcealment: |
|
593 iCurrentToolLostDataConcealment = EFalse; |
|
594 break; |
|
595 default: |
|
596 break; |
|
597 } |
|
598 } |
|
599 |
|
600 |
|
601 /** |
|
602 * Returns tool state. |
|
603 * |
|
604 */ |
|
605 EXPORT_C TInt CWmaDecoderIntfcCI::GetTool(TTool aTool, TBool& aEnabled) |
|
606 { |
|
607 |
|
608 TInt status = KErrNone; |
|
609 switch (aTool) |
|
610 { |
|
611 case EToolOutput32Bit: |
|
612 if (iCurrentToolOutPut32Bit) |
|
613 { |
|
614 aEnabled = ETrue; |
|
615 } |
|
616 else |
|
617 { |
|
618 aEnabled = EFalse; |
|
619 } |
|
620 break; |
|
621 |
|
622 case EDownMixToStereo: |
|
623 if (iCurrentToolDownMixToStereo) |
|
624 { |
|
625 aEnabled = ETrue; |
|
626 } |
|
627 else |
|
628 { |
|
629 aEnabled = EFalse; |
|
630 } |
|
631 break; |
|
632 |
|
633 case ELostDataConcealment: |
|
634 if (iCurrentToolLostDataConcealment) |
|
635 { |
|
636 aEnabled = ETrue; |
|
637 } |
|
638 else |
|
639 { |
|
640 aEnabled = EFalse; |
|
641 } |
|
642 break; |
|
643 default: |
|
644 break; |
|
645 } |
|
646 |
|
647 return status; |
|
648 } |
|
649 |
|
650 /** |
|
651 * Applies configuration settings to the decoder. |
|
652 * |
|
653 */ |
|
654 EXPORT_C TInt CWmaDecoderIntfcCI::ApplyConfig() |
|
655 { |
|
656 iCurrentFormat = iFormat; |
|
657 iCurrentBitsPerSample = iBitsPerSample; |
|
658 iCurrentNumChannelsIn = iNumChannelsIn; |
|
659 iCurrentSamplesPerSec = iSamplesPerSec; |
|
660 iCurrentAvgBytesPerSec = iAvgBytesPerSec; |
|
661 iCurrentBlockAlign = iBlockAlign; |
|
662 iCurrentEncodeOptions = iEncodeOptions; |
|
663 |
|
664 iCurrentEncodeOptions1 = iEncodeOptions1; |
|
665 iCurrentEncodeOptions2 = iEncodeOptions2; |
|
666 |
|
667 iCurrentChannelMask = iChannelMask; |
|
668 iCurrentSupportedMaxSampleRate = iSupportedMaxSampleRate; |
|
669 iCurrentSupportedMaxChannelsIn = iSupportedMaxChannelsIn; |
|
670 iCurrentSupportedMaxBitrate = iSupportedMaxBitrate; |
|
671 iCurrentEnable = iEnable; |
|
672 iCurrentDisable = iDisable; |
|
673 |
|
674 iCurrentToolOutPut32Bit = iToolOutPut32Bit; |
|
675 iCurrentToolDownMixToStereo = iToolDownMixToStereo; |
|
676 iCurrentToolLostDataConcealment = iToolLostDataConcealment; |
|
677 |
|
678 |
|
679 return KErrNone; |
|
680 } |
|
681 |
|
682 |
|
683 /* |
|
684 iCurrentFormat = EWma; |
|
685 iCurrentBitsPerSample = 8; |
|
686 iCurrentNumChannelsIn = 2; |
|
687 iCurrentSamplesPerSec = 4600; |
|
688 iCurrentAvgBytesPerSec = 3600; |
|
689 iCurrentBlockAlign = 4945; |
|
690 iCurrentEncodeOptions = 5; |
|
691 iCurrentEncodeOptions1 = 5; |
|
692 iCurrentEncodeOptions2 = 5; |
|
693 |
|
694 iCurrentChannelMask = 2; |
|
695 iCurrentSupportedMaxSampleRate = 8900; |
|
696 iCurrentSupportedMaxChannelsIn = 5678; |
|
697 iCurrentSupportedMaxBitrate = 4356; |
|
698 iCurrentEnable = CWmaDecoderIntfc::EToolOutput32Bit; |
|
699 iCurrentDisable = CWmaDecoderIntfc::EDownMixToStereo; |
|
700 |
|
701 iCurrentSupportedFormats[0] = EWma; |
|
702 iCurrentSupportedFormats[1] = EWmaPro; |
|
703 |
|
704 iCurrentSupportedTools[0] = EToolOutput32Bit; |
|
705 iCurrentSupportedTools[1] = EToolOutput32Bit; |
|
706 iCurrentSupportedTools[2] = EToolOutput32Bit; |
|
707 */ |