Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef AUDIOPLAYER_H
- #define AUDIOPLAYER_H
- #include <MdaAudioSampleEditor.h>
- #include <Mda\Client\Utility.h>
- #include <aknutils.h>
- #include "CExampleTimer.h"
- class CAudioPlayer;
- const TInt KReFreshTimeOut = 1000000; // re-fresh every second
- //
- class MExamplePlayStateObserver
- {
- public:
- virtual void StateUpdate(CMdaAudioClipUtility::TState aState, TInt aPosition, TInt aDuration)=0;
- };
- #include "TestAudioContainer.h"
- class CAudioPlayer : public CBase, public MMdaObjectStateChangeObserver,MExampleTimerNotify
- {
- public:
- static CAudioPlayer* NewL(MExamplePlayStateObserver& aObserver);
- static CAudioPlayer* NewLC(MExamplePlayStateObserver& aObserver);
- ~CAudioPlayer();
- public: // public functions
- void PlayL(const TDesC& aFileName);
- void StopL(void);
- void SetVolume(TInt& aVolume);
- TInt MetaData();
- TInt ClipBitrate();
- TFileName GetFile (const TDesC& aAudioFile);
- TFileName GetCurrent ();
- public:
- CMdaAudioRecorderUtility* iPlayerUtility;
- protected: // from MMdaObjectStateChangeObserver & MExampleTimerNotify
- void MoscoStateChangeEvent(CBase* aObject, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode);
- void TimerExpired(TAny* aTimer,TInt aError);
- private:// interna functions
- void ReportStateAndTime(void);
- void ConstructL();
- CAudioPlayer(MExamplePlayStateObserver& aObserver);
- private:
- MExamplePlayStateObserver& iObserver;
- TInt iVolume;
- TMdaFileClipLocation iCurrentFile;
- CExampleTimer* iExampleTimer;
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement