|
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: Console Myplayer |
|
15 * |
|
16 */ |
|
17 |
|
18 #if 0 |
|
19 #include <MdaAudioSamplePlayer.h> |
|
20 |
|
21 _LIT(KWavFile, "c:\\sounds\\digital\\sample.wav"); |
|
22 |
|
23 |
|
24 class CMyPlayer : public CBase, MMdaAudioPlayerCallback |
|
25 { |
|
26 public: |
|
27 static CMyPlayer* NewL(); |
|
28 void ConstructL(); |
|
29 void Play(); |
|
30 public: |
|
31 virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds &aDuration); |
|
32 virtual void MapcPlayComplete(TInt aError); |
|
33 |
|
34 private: |
|
35 CMdaAudioPlayerUtility* iPlayer; |
|
36 }; |
|
37 |
|
38 |
|
39 CMyPlayer* CMyPlayer::NewL() |
|
40 { |
|
41 CMyPlayer* self = new(ELeave) CMyPlayer; |
|
42 CleanupStack::PushL(self); |
|
43 self->ConstructL(); |
|
44 CleanupStack::Pop(self); |
|
45 } |
|
46 void CMyPlayer::ConstructL() |
|
47 { |
|
48 iPlayer = CMdaAudioPlayerUtility::NewL(*this); |
|
49 iPlayer->OpenFileL(KWavFile); |
|
50 } |
|
51 void CMyPlayer::Play() |
|
52 { |
|
53 iPlayer->Play(); |
|
54 } |
|
55 void CMyPlayer::MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds &aDuration) |
|
56 { |
|
57 console->Printf(_L("Init complete with err = %d\n"), aError); |
|
58 } |
|
59 void CMyPlayer::MapcPlayComplete(TInt aError) |
|
60 { |
|
61 console->Printf(_L("play complete with err = %d\n"), aError); |
|
62 } |
|
63 #endif |