26
|
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: This class is used for playing sounds
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef CMMAEMCAUDIOPLAYER_H
|
|
19 |
#define CMMAEMCAUDIOPLAYER_H
|
|
20 |
|
|
21 |
// INCLUDES
|
|
22 |
#include "cmmaemcplayerbase.h"
|
|
23 |
#include "mmf/common/mmfbase.h"
|
|
24 |
|
|
25 |
// CONSTANTS
|
|
26 |
|
|
27 |
const TMdaPriorityPreference KMMAEMCPriorityPreference =
|
|
28 |
EMdaPriorityPreferenceTimeAndQuality;
|
|
29 |
|
|
30 |
_LIT(KMMAEMCAudioPlayer, "EMCAudioPlayer");
|
|
31 |
|
|
32 |
// CLASS DECLARATION
|
|
33 |
/**
|
|
34 |
* This class is used for playing sounds
|
|
35 |
*
|
|
36 |
*/
|
|
37 |
|
|
38 |
NONSHARABLE_CLASS(CMMAEMCAudioPlayer): public CMMAEMCPlayerBase
|
|
39 |
{
|
|
40 |
public: // Construction
|
|
41 |
/**
|
|
42 |
* Creates new player.
|
|
43 |
*/
|
|
44 |
static CMMAEMCAudioPlayer* NewLC(
|
|
45 |
CMMAEMCResolver* aResolver);
|
|
46 |
|
|
47 |
// Destructor
|
|
48 |
IMPORT_C ~CMMAEMCAudioPlayer();
|
|
49 |
|
|
50 |
protected:
|
|
51 |
// C++ constructor
|
|
52 |
IMPORT_C CMMAEMCAudioPlayer(CMMAEMCResolver* aResolver);
|
|
53 |
IMPORT_C void ConstructL();
|
|
54 |
|
|
55 |
protected: // New methods
|
|
56 |
IMPORT_C virtual void PrefetchDataL(const TDesC8& aData);
|
|
57 |
IMPORT_C virtual void PrefetchFileL();
|
|
58 |
IMPORT_C virtual void PlayCompleteL(TInt aError);
|
|
59 |
|
|
60 |
public: // from CMMAPlayer
|
|
61 |
IMPORT_C void RealizeL();
|
|
62 |
IMPORT_C void PrefetchL();
|
|
63 |
|
|
64 |
IMPORT_C const TDesC& Type();
|
|
65 |
|
|
66 |
public: // from CMMAPlayer/MMMASourceStreamListener
|
|
67 |
IMPORT_C void ReadCompletedL(TInt aStatus, const TDesC8& aData);
|
|
68 |
};
|
|
69 |
|
|
70 |
#endif // CMMAEMCAUDIOPLAYER_H
|