-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcd.h
78 lines (54 loc) · 1.9 KB
/
cd.h
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
67
68
69
70
71
72
73
74
75
76
77
78
#ifndef _DJGPP_INCLUDE_CD_H
#define _DJGPP_INCLUDE_CD_H
#define COOKED 0
#define RAW 1
#define MSF 0
#define REDBOOK 1
// variables are quite self explanatory
extern int cdda_first_drive;
extern int cdda_nb_of_drives;
extern int cdda_current_drive;
extern int cdda_current_track;
extern int cdda_playing;
extern int cdda_min_track;
extern int cdda_max_track;
extern int cdda_disk_length;
extern char global_error[80];
int cdda_init();
// initialize the cd rom driver
int cdda_play(int track);
// play an audio track
void cdda_stop();
// stop the current playing
void cdda_shutdown();
// for now, just stop the playing
void cdda_loop_check();
// seems to must be called each seconde if you want audio tracks to be
// played again when finished
void cdda_track_info(unsigned char *result, int track);
// return info on the given track, result is 7-bytes long
void cdda_read_sector(unsigned char* p,unsigned long nb_sect,
unsigned char mode_read, unsigned char mode_addr);
void cdda_cooked_prefech_read_sector_redbook(unsigned long nb_sect);
void cdda_cooked_prefech_read_sector_msf(unsigned long nb_sect);
void cdda_dos_cooked_read_sector_lba(unsigned char* p, unsigned long nb_sect);
int cdda_play_sectors(int begin_sect, int length);
//-- Fonctions de conversion -------------------------------------------------
unsigned Time2Frame(int min, int sec, int frame);
unsigned Time2HSG(int min, int sec, int frame);
unsigned Time2Redbook(int min, int sec, int frame);
void Frame2Time(unsigned frame,
int *Min,
int *Sec,
int *Fra);
void Redbook2Time(unsigned redbook,
int* Min,
int* Sec,
int* Fra);
void HSG2Time(unsigned hsg,
int *Min,
int *Sec,
int *Fra);
unsigned Redbook2HSG(unsigned redbook);
unsigned HSG2Redbook(unsigned HSG);
#endif