source: trunk/src/winmm/mcicda/cdrom.h@ 10367

Last change on this file since 10367 was 9976, checked in by sandervl, 22 years ago

compile fixes

File size: 3.6 KB
Line 
1/* -*- tab-width: 8; c-basic-offset: 4 -*- */
2/*
3 * MCI CDAUDIO Driver for OS/2
4 *
5 * Copyright 1994 Martin Ayotte
6 * Copyright 1999 Eric Pouech
7 * Copyright 2000 Chris Wohlgemuth
8 *
9 * Project Odin Software License can be found in LICENSE.TXT
10 */
11
12#ifndef __WINE_CDROM_H__
13#define __WINE_CDROM_H__
14
15#include <stdlib.h>
16// #include <unistd.h>
17//#include "windef.h"
18
19#ifdef HAVE_LINUX_CDROM_H
20# include <linux/cdrom.h>
21#endif
22#ifdef HAVE_LINUX_UCDROM_H
23# include <linux/ucdrom.h>
24#endif
25#ifdef HAVE_SYS_CDIO_H
26# include <sys/cdio.h>
27#endif
28
29typedef struct {
30 int unixdev;
31#if defined(linux)
32 struct cdrom_subchnl sc;
33#elif defined(__FreeBSD__) || defined(__NetBSD__)
34 struct cd_sub_channel_info sc;
35#endif
36 char chrDrive[3];
37 char cPad;
38 char chrDeviceType[128];
39 ULONG hfOS2Handle;
40 ULONG ulLeadOut;
41 /* those data reflect the cdaudio structure and
42 * don't change while playing
43 */
44 UINT16 nTracks;
45 UINT16 nFirstTrack;
46 UINT16 nLastTrack;
47 LPDWORD lpdwTrackLen;
48 LPDWORD lpdwTrackPos;
49 LPBYTE lpbTrackFlags;
50 DWORD dwFirstFrame;
51 DWORD dwLastFrame;
52 /* those data change while playing */
53 ULONG ulCDROMStatus;
54 USHORT usCDAudioStatus;
55 int cdaMode;
56 UINT nCurTrack;
57 DWORD dwCurFrame;
58} WINE_CDAUDIO;
59
60typedef struct {
61 UINT wDevID;
62 int nUseCount; /* Incremented for each shared open */
63 BOOL fShareable; /* TRUE if first open was shareable */
64 WORD wNotifyDeviceID; /* MCI device ID with a pending notification */
65 HANDLE hCallback; /* Callback handle for pending notification */
66 DWORD dwTimeFormat;
67 WINE_CDAUDIO wcda;
68 int mciMode;
69} WINE_MCICDAUDIO;
70
71
72#define WINE_CDA_DONTKNOW 0x00
73#define WINE_CDA_NOTREADY 0x01
74#define WINE_CDA_OPEN 0x02
75#define WINE_CDA_PLAY 0x03
76#define WINE_CDA_STOP 0x04
77#define WINE_CDA_PAUSE 0x05
78
79#ifndef MCI_CONFIGURE
80#define MCI_CONFIGURE 0x087A
81#endif
82
83int CDAUDIO_Open(WINE_CDAUDIO* wcda);
84int CDAUDIO_Close(WINE_CDAUDIO* wcda);
85int CDAUDIO_Reset(WINE_CDAUDIO* wcda);
86int CDAUDIO_Play(WINE_CDAUDIO* wcda, DWORD start, DWORD stop);
87int CDAUDIO_Stop(WINE_CDAUDIO* wcda);
88int CDAUDIO_Pause(WINE_CDAUDIO* wcda, int pauseOn);
89int CDAUDIO_Seek(WINE_CDAUDIO* wcda, DWORD at);
90int CDAUDIO_SetDoor(WINE_CDAUDIO* wcda, int open);
91int CDAUDIO_GetNumberOfTracks(WINE_CDAUDIO* wcda);
92BOOL CDAUDIO_GetTracksInfo(WINE_CDAUDIO* wcda);
93BOOL CDAUDIO_GetCDStatus(WINE_CDAUDIO* wcda);
94
95HANDLE os2CDOpen(char *drive);
96ULONG os2CDClose(ULONG hfOS2Handle);
97int os2GetNumTracks(HANDLE hfOS2Handle,ULONG *ulLeadOut);
98BOOL os2GetCDStatus(HANDLE hfOS2Handle, ULONG *ulStatus);
99BOOL os2GetCDAudioStatus(HANDLE hfOS2Handle, USHORT *usStatus);
100ULONG os2CDQueryTrackStartSector( HANDLE hfDrive, ULONG numTrack, BOOL *flAudio);
101BOOL os2CDEject(HANDLE hfDrive);
102BOOL os2CDCloseTray(HANDLE hfDrive);
103BOOL os2CDStop(HANDLE hfDrive);
104BOOL os2CDPlayRange(HANDLE hfDrive ,ULONG ulFrom, ULONG ulTo);
105BOOL os2CDResume(HANDLE hfDrive);
106BOOL os2CDGetHeadLocation(HANDLE hfOS2Handle, ULONG *ulHeadLocation);
107BOOL os2CDSeek(HANDLE hfOS2Handle, ULONG ulTo);
108BOOL os2CDQueryCurTrack(HANDLE hfOS2Handle, UINT * uiCurTrack);
109BOOL os2CDQueryCDDrives(int *iNumCD, char * cFirstDrive);
110
111#define CDFRAMES_PERSEC 75
112#define SECONDS_PERMIN 60
113#define CDFRAMES_PERMIN ((CDFRAMES_PERSEC) * (SECONDS_PERMIN))
114
115#ifndef CDROM_DATA_TRACK
116#define CDROM_DATA_TRACK 0x04
117#endif
118
119#endif
120
Note: See TracBrowser for help on using the repository browser.