Advertisement
Guest User

Untitled

a guest
May 19th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. #ifndef AUDIOPLAYER_H
  2. #define AUDIOPLAYER_H
  3.  
  4.  
  5. #include <MdaAudioSampleEditor.h>
  6. #include <Mda\Client\Utility.h>
  7. #include <aknutils.h>
  8. #include "CExampleTimer.h"
  9. class CAudioPlayer;
  10.  
  11.  
  12. const TInt KReFreshTimeOut = 1000000; // re-fresh every second
  13. //
  14. class MExamplePlayStateObserver
  15. {
  16. public:
  17. virtual void StateUpdate(CMdaAudioClipUtility::TState aState, TInt aPosition, TInt aDuration)=0;
  18. };
  19.  
  20. #include "TestAudioContainer.h"
  21.  
  22.  
  23. class CAudioPlayer : public CBase, public MMdaObjectStateChangeObserver,MExampleTimerNotify
  24. {
  25. public:
  26. static CAudioPlayer* NewL(MExamplePlayStateObserver& aObserver);
  27. static CAudioPlayer* NewLC(MExamplePlayStateObserver& aObserver);
  28. ~CAudioPlayer();
  29. public: // public functions
  30. void PlayL(const TDesC& aFileName);
  31. void StopL(void);
  32. void SetVolume(TInt& aVolume);
  33. TInt MetaData();
  34.  
  35. TInt ClipBitrate();
  36. TFileName GetFile (const TDesC& aAudioFile);
  37. TFileName GetCurrent ();
  38.  
  39. public:
  40. CMdaAudioRecorderUtility* iPlayerUtility;
  41.  
  42. protected: // from MMdaObjectStateChangeObserver & MExampleTimerNotify
  43. void MoscoStateChangeEvent(CBase* aObject, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode);
  44. void TimerExpired(TAny* aTimer,TInt aError);
  45. private:// interna functions
  46. void ReportStateAndTime(void);
  47. void ConstructL();
  48. CAudioPlayer(MExamplePlayStateObserver& aObserver);
  49. private:
  50. MExamplePlayStateObserver& iObserver;
  51.  
  52. TInt iVolume;
  53. TMdaFileClipLocation iCurrentFile;
  54. CExampleTimer* iExampleTimer;
  55. };
  56.  
  57. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement