blob: 9a83d512a015ee371dc750e39d220c6254516fcb (
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
#ifndef __CDR_H__
#define __CDR_H__
#ifdef __linux__
#include <linux/cdrom.h>
#endif
typedef char HWND;
#include <stdint.h>
#include "psemu_plugin_defs.h"
char CdromDev[256];
long ReadMode;
long UseSubQ;
long CacheSize;
long CdrSpeed;
#ifdef __linux__
#define DEV_DEF "/dev/cdrom"
#define NORMAL 0
#define THREADED 1
#define READ_MODES 2
#define DATA_SIZE (CD_FRAMESIZE_RAW-12)
#define itob(i) ((i)/10*16 + (i)%10) /* u_char to BCD */
#define btoi(b) ((b)/16*10 + (b)%16) /* BCD to u_char */
typedef union {
struct cdrom_msf msf;
unsigned char buf[CD_FRAMESIZE_RAW];
} crdata;
crdata cr;
typedef struct {
crdata cr;
int ret;
} CacheData;
CacheData *cdcache;
unsigned char *cdbuffer;
int cacheaddr;
unsigned char lastTime[3];
int cdHandle;
pthread_t thread;
int subqread, stopth;
int found, locked;
int playing;
long ReadNormal();
long ReadThreaded();
unsigned char* GetBNormal();
unsigned char* GetBThreaded();
long CDRstop(void);
void LoadConf();
void SaveConf();
#endif
#endif /* __CDR_H__ */
|