00001 // sidplayer.h 00002 // 00003 // Copyright (c) 2001 Alfred E. Heggestad 00004 // 00005 // This program is free software; you can redistribute it and/or modify 00006 // it under the terms of the GNU General Public License as published by 00007 // the Free Software Foundation; either version 2 of the License, or 00008 // (at your option) any later version. 00009 // 00010 00016 #if !defined(SIDPLAYER_H__) 00017 #define SIDPLAYER_H__ 00018 00019 #include "player.h" 00020 #include "myendian.h" 00021 #if defined(__ER6__) 00022 #include "audiodrv_er6.h" 00023 #else 00024 #include "audiodrv_epoc.h" 00025 #endif 00026 00027 00031 class CSidPlayer : public CBase 00032 { 00033 public: 00034 static CSidPlayer* NewL(const TDesC& aSong); 00035 virtual ~CSidPlayer(); 00036 // 00037 void InitL(); 00038 void Play(); 00039 void Stop(); 00040 void Pause(); 00041 TBool IsPaused(); 00042 void Thread(); 00043 sidTune& CurrentSidTune() const {return *iTune;} 00044 TInt VolumeDelta(TInt aDelta); 00045 TInt SongDelta(TInt aDelta); 00046 TInt SongSelect(TInt& aSong); 00047 TInt NewTune(const TDesC& aTune); 00048 protected: 00049 void ConstructL(); 00050 CSidPlayer(const TDesC& aSong); 00051 public: 00052 emuEngine* iEmuEngine; 00053 CIdle* iIdlePlay; 00054 TBuf<128> iSongName; 00055 audioDriver* iAudio; 00056 private: 00057 sidTune* iTune; 00058 ubyte* iBuffer; 00059 TInt iBufSize; 00060 TBool iIsReady; 00061 }; 00062 00063 00064 #endif // SIDPLAYER_H__