1 | /* $Id: cdrom.h,v 1.1 1999-05-24 20:19:09 ktk Exp $ */
|
---|
2 |
|
---|
3 | /* -*- tab-width: 8; c-basic-offset: 4 -*- */
|
---|
4 | /*
|
---|
5 | * Sample MCI CDAUDIO Wine Driver for Linux
|
---|
6 | *
|
---|
7 | * Copyright 1994 Martin Ayotte
|
---|
8 | * Copyright 1999 Eric Pouech
|
---|
9 | */
|
---|
10 |
|
---|
11 | #ifndef __WINE_CDROM_H__
|
---|
12 | #define __WINE_CDROM_H__
|
---|
13 |
|
---|
14 | #include <stdlib.h>
|
---|
15 | #include <unistd.h>
|
---|
16 | #include "windef.h"
|
---|
17 |
|
---|
18 | #ifdef HAVE_LINUX_CDROM_H
|
---|
19 | # include <linux/cdrom.h>
|
---|
20 | #endif
|
---|
21 | #ifdef HAVE_LINUX_UCDROM_H
|
---|
22 | # include <linux/ucdrom.h>
|
---|
23 | #endif
|
---|
24 | #ifdef HAVE_SYS_CDIO_H
|
---|
25 | # include <sys/cdio.h>
|
---|
26 | #endif
|
---|
27 |
|
---|
28 | typedef struct {
|
---|
29 | int unixdev;
|
---|
30 | #if defined(linux)
|
---|
31 | struct cdrom_subchnl sc;
|
---|
32 | #elif defined(__FreeBSD__) || defined(__NetBSD__)
|
---|
33 | struct cd_sub_channel_info sc;
|
---|
34 | #endif
|
---|
35 | int cdaMode;
|
---|
36 | UINT16 nCurTrack;
|
---|
37 | DWORD dwCurFrame;
|
---|
38 | UINT16 nTracks;
|
---|
39 | UINT16 nFirstTrack;
|
---|
40 | UINT16 nLastTrack;
|
---|
41 | DWORD dwTotalLen;
|
---|
42 | LPDWORD lpdwTrackLen;
|
---|
43 | LPDWORD lpdwTrackPos;
|
---|
44 | LPBYTE lpbTrackFlags;
|
---|
45 | DWORD dwFirstOffset;
|
---|
46 | } WINE_CDAUDIO;
|
---|
47 |
|
---|
48 | #define WINE_CDA_DONTKNOW 0x00
|
---|
49 | #define WINE_CDA_NOTREADY 0x01
|
---|
50 | #define WINE_CDA_OPEN 0x02
|
---|
51 | #define WINE_CDA_PLAY 0x03
|
---|
52 | #define WINE_CDA_STOP 0x04
|
---|
53 | #define WINE_CDA_PAUSE 0x05
|
---|
54 |
|
---|
55 | int CDAUDIO_Open(WINE_CDAUDIO* wcda);
|
---|
56 | int CDAUDIO_Close(WINE_CDAUDIO* wcda);
|
---|
57 | int CDAUDIO_Reset(WINE_CDAUDIO* wcda);
|
---|
58 | int CDAUDIO_Play(WINE_CDAUDIO* wcda, DWORD start, DWORD stop);
|
---|
59 | int CDAUDIO_Stop(WINE_CDAUDIO* wcda);
|
---|
60 | int CDAUDIO_Pause(WINE_CDAUDIO* wcda, int pauseOn);
|
---|
61 | int CDAUDIO_Seek(WINE_CDAUDIO* wcda, DWORD at);
|
---|
62 | int CDAUDIO_SetDoor(WINE_CDAUDIO* wcda, int open);
|
---|
63 | UINT16 CDAUDIO_GetNumberOfTracks(WINE_CDAUDIO* wcda);
|
---|
64 | BOOL CDAUDIO_GetTracksInfo(WINE_CDAUDIO* wcda);
|
---|
65 | BOOL CDAUDIO_GetCDStatus(WINE_CDAUDIO* wcda);
|
---|
66 |
|
---|
67 | #define CDFRAMES_PERSEC 75
|
---|
68 | #define SECONDS_PERMIN 60
|
---|
69 | #define CDFRAMES_PERMIN ((CDFRAMES_PERSEC) * (SECONDS_PERMIN))
|
---|
70 |
|
---|
71 | #ifndef CDROM_DATA_TRACK
|
---|
72 | #define CDROM_DATA_TRACK 0x04
|
---|
73 | #endif
|
---|
74 |
|
---|
75 | #endif
|
---|
76 |
|
---|