aboutsummaryrefslogtreecommitdiff
path: root/Src/Plugins/Input/in_cdda/CDPlay.h
blob: 49de66019ed107519e7cda8d0970b09e5a38f1a4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef NULLSOFT_CDPLAYH
#define NULLSOFT_CDPLAYH

class C_CDPlay
{
public:
	virtual ~C_CDPlay() { }

	virtual int play(wchar_t drive, int track)=0;
	virtual void stop()=0;
	virtual void pause()=0;
	virtual void unpause()=0;
	virtual int getlength()=0;
	virtual int getoutputtime()=0;
	virtual void setoutputtime(int time_in_ms)=0;
	virtual void setvolume(int _a_v, int _a_p)=0;

	//called by winampGetExtendedRead_*
	virtual int open(wchar_t drive, int track) { return 1; }
	virtual int read(char *dest, int len, int *killswitch) { return 0; }

	// queries if this is the currently playing drive & track, passing track == 0 just means check drive
	bool IsPlaying(wchar_t drive, int track=0)
	{
		if (drive == g_drive && (!track))
			return true;

		return false;
	}

	wchar_t g_drive;
};

#endif