CDPlay.h 796 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef NULLSOFT_CDPLAYH
  2. #define NULLSOFT_CDPLAYH
  3. class C_CDPlay
  4. {
  5. public:
  6. virtual ~C_CDPlay() { }
  7. virtual int play(wchar_t drive, int track)=0;
  8. virtual void stop()=0;
  9. virtual void pause()=0;
  10. virtual void unpause()=0;
  11. virtual int getlength()=0;
  12. virtual int getoutputtime()=0;
  13. virtual void setoutputtime(int time_in_ms)=0;
  14. virtual void setvolume(int _a_v, int _a_p)=0;
  15. //called by winampGetExtendedRead_*
  16. virtual int open(wchar_t drive, int track) { return 1; }
  17. virtual int read(char *dest, int len, int *killswitch) { return 0; }
  18. // queries if this is the currently playing drive & track, passing track == 0 just means check drive
  19. bool IsPlaying(wchar_t drive, int track=0)
  20. {
  21. if (drive == g_drive && (!track))
  22. return true;
  23. return false;
  24. }
  25. wchar_t g_drive;
  26. };
  27. #endif