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