|
1 /* |
|
2 * Copyright (c) 2006-2007 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: This class implements wav playing. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CMIDCLIP_H |
|
20 #define CMIDCLIP_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <mdaaudiosampleplayer.h> |
|
25 |
|
26 #include "CMIDSoundImpl.h" |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class MMIDEventSender; |
|
30 |
|
31 // CLASS DEFINITION |
|
32 /** |
|
33 * This class implements wav playing. |
|
34 * |
|
35 */ |
|
36 NONSHARABLE_CLASS(CMIDClip): public CMIDSoundImpl, |
|
37 public MMdaAudioPlayerCallback |
|
38 { |
|
39 public: |
|
40 |
|
41 static CMIDClip* NewL(const TDesC8* aData, MMIDEventSender* aEventSender); |
|
42 // Destructor |
|
43 ~CMIDClip(); |
|
44 |
|
45 protected: |
|
46 |
|
47 // C++ constructor |
|
48 CMIDClip(MMIDEventSender* aEventSender); |
|
49 // Second phase |
|
50 void ConstructL(const TDesC8* aData); |
|
51 |
|
52 public: |
|
53 |
|
54 virtual TInt Play(TInt aLoop); |
|
55 virtual void Stop(); |
|
56 virtual void SetVolume(TInt aVolume); |
|
57 virtual TInt Volume(); |
|
58 virtual void Release(); |
|
59 |
|
60 public: // from MMdaAudioPlayerCallback |
|
61 void MapcInitComplete(TInt aError, |
|
62 const TTimeIntervalMicroSeconds& aDuration); |
|
63 void MapcPlayComplete(TInt aError); |
|
64 |
|
65 private: |
|
66 |
|
67 HBufC8* iClip; |
|
68 CMdaAudioPlayerUtility* iMdaAudioPlayerUtility; |
|
69 TInt iLoops; |
|
70 TInt iVolume; |
|
71 }; |
|
72 |
|
73 #endif // CMIDCLIP_H |