Mercurial > sdl-ios-xcode
comparison src/cdrom/macos/SDL_syscdrom_c.h @ 1895:c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 10 Jul 2006 21:04:37 +0000 |
parents | d910939febfa |
children |
comparison
equal
deleted
inserted
replaced
1894:c69cee13dd76 | 1895:c121d94672cb |
---|---|
24 /* This is the MacOS specific header for the SDL CD-ROM API | 24 /* This is the MacOS specific header for the SDL CD-ROM API |
25 Contributed by Matt Slot | 25 Contributed by Matt Slot |
26 */ | 26 */ |
27 | 27 |
28 /* AppleCD Control calls */ | 28 /* AppleCD Control calls */ |
29 #define kVerifyTheDisc 5 /* Returns noErr if there is disc inserted */ | 29 #define kVerifyTheDisc 5 /* Returns noErr if there is disc inserted */ |
30 #define kEjectTheDisc 7 /* Eject disc from drive */ | 30 #define kEjectTheDisc 7 /* Eject disc from drive */ |
31 #define kUserEject 80 /* Enable/disable the CD-ROM eject button */ | 31 #define kUserEject 80 /* Enable/disable the CD-ROM eject button */ |
32 #define kReadTOC 100 /* Extract various TOC information from the disc */ | 32 #define kReadTOC 100 /* Extract various TOC information from the disc */ |
33 #define kReadQ 101 /* Extract Q subcode info for the current track */ | 33 #define kReadQ 101 /* Extract Q subcode info for the current track */ |
34 #define kAudioTrackSearch 103 /* Start playback from the indicated position */ | 34 #define kAudioTrackSearch 103 /* Start playback from the indicated position */ |
35 #define kAudioPlay 104 /* Start playback from the indicated position */ | 35 #define kAudioPlay 104 /* Start playback from the indicated position */ |
36 #define kAudioPause 105 /* Pause/continue the playback */ | 36 #define kAudioPause 105 /* Pause/continue the playback */ |
37 #define kAudioStop 106 /* Stop playback at the indicated position */ | 37 #define kAudioStop 106 /* Stop playback at the indicated position */ |
38 #define kAudioStatus 107 /* Return audio play status */ | 38 #define kAudioStatus 107 /* Return audio play status */ |
39 #define kAudioControl 109 /* Set the output volume for the audio channels */ | 39 #define kAudioControl 109 /* Set the output volume for the audio channels */ |
40 #define kReadAudioVolume 112 /* Get the output volume for the audio channels */ | 40 #define kReadAudioVolume 112 /* Get the output volume for the audio channels */ |
41 #define kSetTrackList 122 /* Set the track program for the audio CD to play */ | 41 #define kSetTrackList 122 /* Set the track program for the audio CD to play */ |
42 #define kGetTrackList 123 /* Get the track program the audio CD is playing */ | 42 #define kGetTrackList 123 /* Get the track program the audio CD is playing */ |
43 #define kGetTrackIndex 124 /* Get the track index the audio CD is playing */ | 43 #define kGetTrackIndex 124 /* Get the track index the audio CD is playing */ |
44 #define kSetPlayMode 125 /* Set the audio tracks play mode */ | 44 #define kSetPlayMode 125 /* Set the audio tracks play mode */ |
45 #define kGetPlayMode 126 /* Get the audio tracks play mode */ | 45 #define kGetPlayMode 126 /* Get the audio tracks play mode */ |
46 | 46 |
47 /* AppleCD Status calls */ | 47 /* AppleCD Status calls */ |
48 #define kGetDriveType 96 /* Get the type of the physical CD-ROM drive */ | 48 #define kGetDriveType 96 /* Get the type of the physical CD-ROM drive */ |
49 #define kWhoIsThere 97 /* Get a bitmap of SCSI IDs the driver controls */ | 49 #define kWhoIsThere 97 /* Get a bitmap of SCSI IDs the driver controls */ |
50 #define kGetBlockSize 98 /* Get current block size of the CD-ROM drive */ | 50 #define kGetBlockSize 98 /* Get current block size of the CD-ROM drive */ |
51 | 51 |
52 /* AppleCD other constants */ | 52 /* AppleCD other constants */ |
53 #define kBlockPosition 0 /* Position at the specified logical block number */ | 53 #define kBlockPosition 0 /* Position at the specified logical block number */ |
54 #define kAbsMSFPosition 1 /* Position at the specified Min/Sec/Frame (in BCD) */ | 54 #define kAbsMSFPosition 1 /* Position at the specified Min/Sec/Frame (in BCD) */ |
55 #define kTrackPosition 2 /* Position at the specified track number (in BCD) */ | 55 #define kTrackPosition 2 /* Position at the specified track number (in BCD) */ |
56 #define kIndexPosition 3 /* Position at the nth track in program (in BCD) */ | 56 #define kIndexPosition 3 /* Position at the nth track in program (in BCD) */ |
57 | 57 |
58 #define kMutedPlayMode 0 /* Play the audio track with no output */ | 58 #define kMutedPlayMode 0 /* Play the audio track with no output */ |
59 #define kStereoPlayMode 9 /* Play the audio track in normal stereo */ | 59 #define kStereoPlayMode 9 /* Play the audio track in normal stereo */ |
60 | 60 |
61 #define kControlFieldMask 0x0D /* Bits 3,2,0 in the nibble */ | 61 #define kControlFieldMask 0x0D /* Bits 3,2,0 in the nibble */ |
62 #define kDataTrackMask 0x04 /* Indicates Data Track */ | 62 #define kDataTrackMask 0x04 /* Indicates Data Track */ |
63 | 63 |
64 #define kGetTrackRange 1 /* Query TOC for track numbers */ | 64 #define kGetTrackRange 1 /* Query TOC for track numbers */ |
65 #define kGetLeadOutArea 2 /* Query TOC for "Lead Out" end of audio data */ | 65 #define kGetLeadOutArea 2 /* Query TOC for "Lead Out" end of audio data */ |
66 #define kGetTrackEntries 3 /* Query TOC for track starts and data types */ | 66 #define kGetTrackEntries 3 /* Query TOC for track starts and data types */ |
67 | 67 |
68 #define kStatusPlaying 0 /* Audio Play operation in progress */ | 68 #define kStatusPlaying 0 /* Audio Play operation in progress */ |
69 #define kStatusPaused 1 /* CD-ROM device in Hold Track ("Pause") state */ | 69 #define kStatusPaused 1 /* CD-ROM device in Hold Track ("Pause") state */ |
70 #define kStatusMuted 2 /* MUTING-ON operation in progress */ | 70 #define kStatusMuted 2 /* MUTING-ON operation in progress */ |
71 #define kStatusDone 3 /* Audio Play completed */ | 71 #define kStatusDone 3 /* Audio Play completed */ |
72 #define kStatusError 4 /* Error occurred during audio play operation */ | 72 #define kStatusError 4 /* Error occurred during audio play operation */ |
73 #define kStatusStopped 5 /* Audio play operation not requested */ | 73 #define kStatusStopped 5 /* Audio play operation not requested */ |
74 | 74 |
75 #define kPlayModeSequential 0 /* Play tracks in order */ | 75 #define kPlayModeSequential 0 /* Play tracks in order */ |
76 #define kPlayModeShuffled 1 /* Play tracks randomly */ | 76 #define kPlayModeShuffled 1 /* Play tracks randomly */ |
77 #define kPlayModeProgrammed 2 /* Use custom playlist */ | 77 #define kPlayModeProgrammed 2 /* Use custom playlist */ |
78 | 78 |
79 /* AppleCD Gestalt selectors */ | 79 /* AppleCD Gestalt selectors */ |
80 #define kGestaltAudioCDSelector 'aucd' | 80 #define kGestaltAudioCDSelector 'aucd' |
81 #define kDriverVersion52 0x00000520 | 81 #define kDriverVersion52 0x00000520 |
82 #define kDriverVersion51 0x00000510 | 82 #define kDriverVersion51 0x00000510 |
90 /* Misc constants */ | 90 /* Misc constants */ |
91 #define kFirstSCSIDevice -33 | 91 #define kFirstSCSIDevice -33 |
92 #define kLastSCSIDevice -40 | 92 #define kLastSCSIDevice -40 |
93 | 93 |
94 #if PRAGMA_STRUCT_ALIGN | 94 #if PRAGMA_STRUCT_ALIGN |
95 #pragma options align=mac68k | 95 #pragma options align=mac68k |
96 #endif | 96 #endif |
97 | 97 |
98 /* AppleCD driver parameter block */ | 98 /* AppleCD driver parameter block */ |
99 typedef struct CDCntrlParam { | 99 typedef struct CDCntrlParam |
100 QElemPtr qLink; | 100 { |
101 short qType; | 101 QElemPtr qLink; |
102 short ioTrap; | 102 short qType; |
103 Ptr ioCmdAddr; | 103 short ioTrap; |
104 IOCompletionUPP ioCompletion; | 104 Ptr ioCmdAddr; |
105 OSErr ioResult; | 105 IOCompletionUPP ioCompletion; |
106 StringPtr ioNamePtr; | 106 OSErr ioResult; |
107 short ioVRefNum; | 107 StringPtr ioNamePtr; |
108 short ioCRefNum; | 108 short ioVRefNum; |
109 short csCode; | 109 short ioCRefNum; |
110 | 110 short csCode; |
111 union { | |
112 long longs[6]; | |
113 short words[11]; | |
114 unsigned char bytes[22]; | |
115 struct { | |
116 unsigned char status; | |
117 unsigned char play; | |
118 unsigned char control; | |
119 unsigned char minute; | |
120 unsigned char second; | |
121 unsigned char frame; | |
122 } cd; | |
123 } csParam; | |
124 | 111 |
125 } CDCntrlParam, *CDCntrlParamPtr; | 112 union |
113 { | |
114 long longs[6]; | |
115 short words[11]; | |
116 unsigned char bytes[22]; | |
117 struct | |
118 { | |
119 unsigned char status; | |
120 unsigned char play; | |
121 unsigned char control; | |
122 unsigned char minute; | |
123 unsigned char second; | |
124 unsigned char frame; | |
125 } cd; | |
126 } csParam; | |
126 | 127 |
127 typedef union CDTrackData { | 128 } CDCntrlParam, *CDCntrlParamPtr; |
128 long value; /* Treat as a longword value */ | 129 |
129 struct { | 130 typedef union CDTrackData |
130 unsigned char reserved : 4; /* Unused by AppleCD driver */ | 131 { |
131 unsigned char control : 4; /* Track flags (data track?) */ | 132 long value; /* Treat as a longword value */ |
132 unsigned char min; /* Start of track (BCD) */ | 133 struct |
133 unsigned char sec; /* Start of track (BCD) */ | 134 { |
134 unsigned char frame; /* Start of track (BCD) */ | 135 unsigned char reserved:4; /* Unused by AppleCD driver */ |
135 } entry; /* Broken into fields */ | 136 unsigned char control:4; /* Track flags (data track?) */ |
136 } CDTrackData, *CDTrackPtr; | 137 unsigned char min; /* Start of track (BCD) */ |
137 | 138 unsigned char sec; /* Start of track (BCD) */ |
139 unsigned char frame; /* Start of track (BCD) */ | |
140 } entry; /* Broken into fields */ | |
141 } CDTrackData, *CDTrackPtr; | |
142 | |
138 #if PRAGMA_STRUCT_ALIGN | 143 #if PRAGMA_STRUCT_ALIGN |
139 #pragma options align=reset | 144 #pragma options align=reset |
140 #endif | 145 #endif |
146 /* vi: set ts=4 sw=4 expandtab: */ |