| 1 | /****************************************************************************/
|
|---|
| 2 | /* */
|
|---|
| 3 | /* Module Name: AUDIO.H */
|
|---|
| 4 | /* */
|
|---|
| 5 | /* OS/2 2.0 Multimedia Extensions Audio Structures and definitions. */
|
|---|
| 6 | /* */
|
|---|
| 7 | /* Copyright (c) International Business Machines Corporation 1991, 1992 */
|
|---|
| 8 | /* All Rights Reserved */
|
|---|
| 9 | /* */
|
|---|
| 10 | /****************************************************************************/
|
|---|
| 11 | /* NOINC */
|
|---|
| 12 | #ifdef __cplusplus
|
|---|
| 13 | extern "C" {
|
|---|
| 14 | #endif
|
|---|
| 15 | /* INC */
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 | /*-------------------------------------------------------------------------*
|
|---|
| 19 | * AUDIODD version level
|
|---|
| 20 | *-------------------------------------------------------------------------*/
|
|---|
| 21 |
|
|---|
| 22 | #define CURRENT_VERSION 0x01020000
|
|---|
| 23 |
|
|---|
| 24 | /*-------------------------------------------------------------------------*
|
|---|
| 25 | * Control definitions
|
|---|
| 26 | *-------------------------------------------------------------------------*/
|
|---|
| 27 |
|
|---|
| 28 | #define AUDIO_IOCTL_CAT 0x80
|
|---|
| 29 |
|
|---|
| 30 | #define AUDIO_INIT 0x40
|
|---|
| 31 | #define AUDIO_STATUS 0x41
|
|---|
| 32 | #define AUDIO_CONTROL 0x42
|
|---|
| 33 | #define AUDIO_BUFFER 0x43
|
|---|
| 34 | #define AUDIO_LOAD 0x44
|
|---|
| 35 | #define AUDIO_WAIT 0x45
|
|---|
| 36 | #define AUDIO_HPI 0x46
|
|---|
| 37 | #define AUDIO_CAPABILITY 0x48
|
|---|
| 38 |
|
|---|
| 39 | #define MIX_GETCONNECTIONS 0x60
|
|---|
| 40 | #define MIX_SETCONNECTIONS 0x61
|
|---|
| 41 | #define MIX_GETLINEINFO 0x62
|
|---|
| 42 | #define MIX_GETCONTROL 0x63
|
|---|
| 43 | #define MIX_SETCONTROL 0x64
|
|---|
| 44 |
|
|---|
| 45 | /*-------------------------------------------------------------------------*
|
|---|
| 46 | * AUDIO_INIT declarations and defines
|
|---|
| 47 | *-------------------------------------------------------------------------*/
|
|---|
| 48 |
|
|---|
| 49 | #define LOAD_PATH 260
|
|---|
| 50 |
|
|---|
| 51 | /* Values for AUDIO_INIT.sMode */
|
|---|
| 52 |
|
|---|
| 53 | #define ADPCM 1 /* AVC type ADPCM */
|
|---|
| 54 | #define PCM 2 /* Pulse Coded Modulation */
|
|---|
| 55 | #define MU_LAW 3 /* mu-law */
|
|---|
| 56 | #define MIDI 4 /* MIDI data */
|
|---|
| 57 | #define A_LAW 5 /* a-law */
|
|---|
| 58 | #define SOURCE_MIX 6 /* External audio source */
|
|---|
| 59 | #define SPV2 7 /* Speech Viewer/2 */
|
|---|
| 60 | #define ADPCMXA 8 /* XA CD ROM */
|
|---|
| 61 | #define SPV2BCPCM 25 /* Speech Viewer/2 */
|
|---|
| 62 | #define SPV2PCM 26
|
|---|
| 63 | #define SPV2NONE 27
|
|---|
| 64 | #define IDLE 999
|
|---|
| 65 | #define CLAIM_HDWR 32000 /* Serialize access to hardware */
|
|---|
| 66 |
|
|---|
| 67 | /* Values for AUDIO_INIT.ulFlags */
|
|---|
| 68 |
|
|---|
| 69 | #define FIXED 0x00000001l /* Fixed length data */
|
|---|
| 70 | #define LEFT_ALIGNED 0x00000002l /* Left align bits on byte bndry */
|
|---|
| 71 | #define RIGHT_ALIGNED 0x00000004l /* Right align bits on byte bndry*/
|
|---|
| 72 | #define TWOS_COMPLEMENT 0x00000008l /* 2's complement data */
|
|---|
| 73 | #define SIGNED 0x00000010l /* Signed data */
|
|---|
| 74 | #define BIG_ENDIAN 0x00000020l /* MSB's first (motorola format) */
|
|---|
| 75 | #define RIFF_DATATYPE 0x00000040l /* sMode contains a RIFF datatype*/
|
|---|
| 76 | #define PITCH 0x00100000l /* Pitch control is supported */
|
|---|
| 77 | #define INPUT 0x00200000l /* Input select is supported */
|
|---|
| 78 | #define OUTPUT 0x00400000l /* Output select is supported */
|
|---|
| 79 | #define MONITOR 0x00800000l /* Monitor is supported */
|
|---|
| 80 | #define VOLUME 0x01000000l /* Volume control is supported */
|
|---|
| 81 | #define VOLUME_DELAY 0x02000000l /* Volume delay is supported */
|
|---|
| 82 | #define BALANCE 0x04000000l /* Balance control is supported */
|
|---|
| 83 | #define BALANCE_DELAY 0x08000000l /* Balance delay is supported */
|
|---|
| 84 | #define TREBLE 0x10000000l /* Treble control is supported */
|
|---|
| 85 | #define BASS 0x20000000l /* Bass control supported */
|
|---|
| 86 | #define BESTFIT_PROVIDED 0x40000000l /* bestfit returned */
|
|---|
| 87 | #define LOAD_CODE 0x80000000l /* DSP load needed */
|
|---|
| 88 |
|
|---|
| 89 | /* Values for AUDIO_INIT.ulOperation */
|
|---|
| 90 |
|
|---|
| 91 | #define OPERATION_PLAY 1
|
|---|
| 92 | #define OPERATION_RECORD 2
|
|---|
| 93 | #define PLAY_AND_RECORD 3
|
|---|
| 94 | #define ANALYSIS 6 /* Speech Viewer/2 */
|
|---|
| 95 | #define DISTANCE 7 /* Speech Viewer/2 */
|
|---|
| 96 | #define MIGRATION 8 /* Speech Viewer/2 */
|
|---|
| 97 |
|
|---|
| 98 | /* Values for AUDIO_INIT.sReturnCode */
|
|---|
| 99 |
|
|---|
| 100 | #define NO_PLAY 1
|
|---|
| 101 | #define NO_RECORD 2
|
|---|
| 102 | #define NO_RECORD_AND_PLAY 3
|
|---|
| 103 | #define INVALID_REQUEST 4
|
|---|
| 104 | #define CONFLICT 5
|
|---|
| 105 | #define OVERLOADED 6
|
|---|
| 106 | #define DOWNLEVEL_DD 7 /* DD is down level from appl. */
|
|---|
| 107 | #define DSP_LOAD_PENDING_ON_OTHER_TRK 8 /* Other trk hasn't loaded dsp */
|
|---|
| 108 |
|
|---|
| 109 | #define AUDIO_IGNORE -1
|
|---|
| 110 |
|
|---|
| 111 | /* Values for AUDIO_INIT.sDeviceID */
|
|---|
| 112 |
|
|---|
| 113 | #define MINIDD 0
|
|---|
| 114 | #define ACPA 1
|
|---|
| 115 | #define MACPA 2
|
|---|
| 116 | #define MPU401 3
|
|---|
| 117 | #define SOUND_BLASTER 4
|
|---|
| 118 | #define IMF 5
|
|---|
| 119 | #define PS1 6
|
|---|
| 120 | #define PAS16 7
|
|---|
| 121 |
|
|---|
| 122 | /* XLATOFF */
|
|---|
| 123 | #pragma pack(1)
|
|---|
| 124 | /* XLATON */
|
|---|
| 125 |
|
|---|
| 126 | /* AUDIO_INIT structure declaration */
|
|---|
| 127 |
|
|---|
| 128 | typedef struct _init { /* init */
|
|---|
| 129 | LONG lSRate;
|
|---|
| 130 | LONG lBitsPerSRate;
|
|---|
| 131 | LONG lBsize;
|
|---|
| 132 | SHORT sMode;
|
|---|
| 133 | SHORT sChannels;
|
|---|
| 134 | LONG lResolution;
|
|---|
| 135 | CHAR abLoadPath[LOAD_PATH];
|
|---|
| 136 | ULONG ulFlags;
|
|---|
| 137 | ULONG ulOperation;
|
|---|
| 138 | SHORT sReturnCode;
|
|---|
| 139 | SHORT sSlotNumber;
|
|---|
| 140 | SHORT sDeviceID;
|
|---|
| 141 | VOID FAR *pvReserved; /* MMPM2 uses this to pass back sysfilenum */
|
|---|
| 142 | ULONG ulVersionLevel;
|
|---|
| 143 | } MCI_AUDIO_INIT;
|
|---|
| 144 |
|
|---|
| 145 | typedef MCI_AUDIO_INIT FAR *LPMCI_AUDIO_INIT;
|
|---|
| 146 |
|
|---|
| 147 | /*-------------------------------------------------------------------------*
|
|---|
| 148 | * AUDIO_DEVID declarations and defines
|
|---|
| 149 | *-------------------------------------------------------------------------*/
|
|---|
| 150 |
|
|---|
| 151 | typedef struct _MCI_AUDIO_DEVID { /* devid */
|
|---|
| 152 | ULONG ulDevType;
|
|---|
| 153 | ULONG ulDevNum;
|
|---|
| 154 | } MCI_AUDIO_DEVID;
|
|---|
| 155 |
|
|---|
| 156 | typedef MCI_AUDIO_DEVID FAR *LPMCI_AUDIO_DEVID;
|
|---|
| 157 |
|
|---|
| 158 | /* Input devices */
|
|---|
| 159 |
|
|---|
| 160 | #define NULL_INPUT 0
|
|---|
| 161 | #define STEREO_LINE_INPUT 1
|
|---|
| 162 | #define LEFT_LINE_INPUT 2
|
|---|
| 163 | #define RIGHT_LINE_INPUT 3
|
|---|
| 164 | #define MIC_INPUT 4
|
|---|
| 165 | #define BOOSTED_MIC_INPUT 5
|
|---|
| 166 | #define PHONE_LINE_INPUT 6
|
|---|
| 167 | #define HANDSET_INPUT 7
|
|---|
| 168 | #define SYNTH_INPUT 8
|
|---|
| 169 | #define DIGITAL_PHONE_LINE_INPUT 9
|
|---|
| 170 | #define DIGITAL_HANDSET_INPUT 10
|
|---|
| 171 | #define MIDI_IN_PORT 11
|
|---|
| 172 | #define LOOPBACK 11
|
|---|
| 173 | #define DEFAULT_INPUT 0XFFFFFFFF
|
|---|
| 174 |
|
|---|
| 175 | /* Output devices */
|
|---|
| 176 |
|
|---|
| 177 | #define NULL_OUTPUT 0
|
|---|
| 178 | #define STEREO_LINE_OUTPUT 1
|
|---|
| 179 | #define LEFT_LINE_OUTPUT 2
|
|---|
| 180 | #define RIGHT_LINE_OUTPUT 3
|
|---|
| 181 | #define SPEAKER_OUTPUT 4
|
|---|
| 182 | #define HEADSET_OUTPUT 5
|
|---|
| 183 | #define PHONE_LINE_OUTPUT 6
|
|---|
| 184 | #define HANDSET_OUTPUT 7
|
|---|
| 185 | #define SYNTH_OUTPUT 8
|
|---|
| 186 | #define DIGITAL_PHONE_LINE_OUTPUT 9
|
|---|
| 187 | #define DIGITAL_HANDSET_OUTPUT 10
|
|---|
| 188 | #define MIDI_OUT_PORT 11
|
|---|
| 189 | #define DEFAULT_OUTPUT 0XFFFFFFFF
|
|---|
| 190 |
|
|---|
| 191 | /* Defined values for DevNum */
|
|---|
| 192 |
|
|---|
| 193 | #define DEFAULT_DEVICE 0
|
|---|
| 194 | #define DEVICE_1 1
|
|---|
| 195 | #define DEVICE_2 2
|
|---|
| 196 |
|
|---|
| 197 | /*-------------------------------------------------------------------------*
|
|---|
| 198 | * Valid Return codes for the ulSupport field of MCI_AUDIO_CAPS
|
|---|
| 199 | *-------------------------------------------------------------------------*/
|
|---|
| 200 | #define SUPPORT_SUCCESS 0x00000000
|
|---|
| 201 | #define UNSUPPORTED_RATE 0x00000001
|
|---|
| 202 | #define UNSUPPORTED_CHANNELS 0x00000002
|
|---|
| 203 | #define UNSUPPORTED_BPS 0x00000004
|
|---|
| 204 | #define UNSUPPORTED_DATATYPE 0x00000008
|
|---|
| 205 | #define UNSUPPORTED_OPERATION 0x00000010
|
|---|
| 206 |
|
|---|
| 207 | typedef struct _MCI_AUDIO_CAPS { /* */
|
|---|
| 208 | ULONG ulLength; /* in Structure length */
|
|---|
| 209 | ULONG ulSamplingRate; /* in out Sampling rate to query */
|
|---|
| 210 | ULONG ulChannels; /* in out Channels to query */
|
|---|
| 211 | ULONG ulBitsPerSample; /* in out BPS to query */
|
|---|
| 212 | ULONG ulDataType; /* in out RIFF Datatype to query */
|
|---|
| 213 | ULONG ulOperation; /* in out OPERATION_PLAY or OPERATION_RECORD */
|
|---|
| 214 | ULONG ulSupport; /* out BOOLEAN-does DD support this mode */
|
|---|
| 215 | ULONG ulDataSubType; /* out Data-subtype to use */
|
|---|
| 216 | ULONG ulResourceUnits; /* out Resource units this mode */
|
|---|
| 217 | ULONG ulResourceClass; /* out Resource class for this mode */
|
|---|
| 218 | ULONG ulBlockAlign; /* out Block alignment for this mode. */
|
|---|
| 219 | ULONG fCanRecord; /* out Is recording possbile - this mode */
|
|---|
| 220 | ULONG ulFlags; /* out */
|
|---|
| 221 | ULONG ulCapability; /* out Capability of the device. */
|
|---|
| 222 | } MCI_AUDIO_CAPS;
|
|---|
| 223 |
|
|---|
| 224 | typedef MCI_AUDIO_CAPS FAR *PAUDIO_CAPS;
|
|---|
| 225 |
|
|---|
| 226 |
|
|---|
| 227 | /*-------------------------------------------------------------------------*
|
|---|
| 228 | * Valid Return codes for the ul field of MCI_AUDIO_CAPS
|
|---|
| 229 | *-------------------------------------------------------------------------*/
|
|---|
| 230 | #define SUPPORT_MIX 0x00000001 /* supports mixer functions */
|
|---|
| 231 | #define SUPPORT_RIFF_MODES 0x00000002 /* supports RIFF modes for AUDIO_INIT */
|
|---|
| 232 | #define SUPPORT_CAP 0x80000000 /* Capability IOCTL supported */
|
|---|
| 233 |
|
|---|
| 234 |
|
|---|
| 235 | /*-------------------------------------------------------------------------*
|
|---|
| 236 | * AUDIO_CHANGE declarations and defines
|
|---|
| 237 | *-------------------------------------------------------------------------*/
|
|---|
| 238 |
|
|---|
| 239 | /* Values for AUDIO_CHANGE.lMonitor */
|
|---|
| 240 |
|
|---|
| 241 | #define MONITOR_OFF 0
|
|---|
| 242 | #define MONITOR_UNCOMPRESSED 1
|
|---|
| 243 | #define MONITOR_COMPRESSED 2
|
|---|
| 244 |
|
|---|
| 245 | /* Values for AUDIO_CHANGE.lInput */
|
|---|
| 246 |
|
|---|
| 247 | #define HIGH_GAIN_MIC 0
|
|---|
| 248 | #define LINE_1 1
|
|---|
| 249 | #define LINE_2 2
|
|---|
| 250 | #define LINES_1AND2 3
|
|---|
| 251 | #define LOW_GAIN_MIC 4
|
|---|
| 252 | #define ALL_LINES 0xFFFF
|
|---|
| 253 | #define INPUTS_LISTED 0x5555
|
|---|
| 254 |
|
|---|
| 255 | /* Values for AUDIO_CHANGE.lOutput */
|
|---|
| 256 |
|
|---|
| 257 | #define EXTERNAL_SPEAKER 1
|
|---|
| 258 | #define INTERNAL_SPEAKER 2
|
|---|
| 259 | #define OUTPUT_1 4
|
|---|
| 260 | #define OUTPUTS_LISTED 0x5555
|
|---|
| 261 |
|
|---|
| 262 | /* AUDIO_CHANGE structure declaration */
|
|---|
| 263 |
|
|---|
| 264 | typedef struct _MCI_AUDIO_CHANGE { /* chang */
|
|---|
| 265 | VOID FAR *pvDevInfo;
|
|---|
| 266 | LONG lInput;
|
|---|
| 267 | LONG lOutput;
|
|---|
| 268 | LONG lMonitor;
|
|---|
| 269 | LONG lVolume;
|
|---|
| 270 | LONG lVolumeDelay;
|
|---|
| 271 | LONG lBalance;
|
|---|
| 272 | LONG lBalanceDelay;
|
|---|
| 273 | LONG lTreble;
|
|---|
| 274 | LONG lBass;
|
|---|
| 275 | LONG lPitch;
|
|---|
| 276 | MCI_AUDIO_DEVID rInputList[8];
|
|---|
| 277 | MCI_AUDIO_DEVID rOutputList[8];
|
|---|
| 278 |
|
|---|
| 279 | LPMCI_AUDIO_DEVID prMoreInputs;
|
|---|
| 280 | LPMCI_AUDIO_DEVID prMoreOutputs;
|
|---|
| 281 | LONG lGain;
|
|---|
| 282 | VOID FAR *pvModeInfo;
|
|---|
| 283 | } MCI_AUDIO_CHANGE;
|
|---|
| 284 |
|
|---|
| 285 | typedef MCI_AUDIO_CHANGE FAR *LPMCI_AUDIO_CHANGE;
|
|---|
| 286 |
|
|---|
| 287 |
|
|---|
| 288 | typedef struct _mode_info { /* mode_info */
|
|---|
| 289 | SHORT sTempo;
|
|---|
| 290 | SHORT sCPQN;
|
|---|
| 291 | SHORT sMidiSwitches;
|
|---|
| 292 | SHORT sReserved[5];
|
|---|
| 293 | } MIDI_INFO;
|
|---|
| 294 |
|
|---|
| 295 | /*************************************************************************
|
|---|
| 296 | * MIDI Switches
|
|---|
| 297 | ***************************************************************************/
|
|---|
| 298 | #define MIDI_THRU_THRU 0
|
|---|
| 299 | #define MIDI_THRU_OUT 1
|
|---|
| 300 |
|
|---|
| 301 |
|
|---|
| 302 | /*-------------------------------------------------------------------------*
|
|---|
| 303 | * AUDIO_STATUS declarations and defines
|
|---|
| 304 | *-------------------------------------------------------------------------*/
|
|---|
| 305 |
|
|---|
| 306 | /* Values for AUDIO_STATUS.ulOperation */
|
|---|
| 307 |
|
|---|
| 308 | #define STOPPED 0
|
|---|
| 309 | #define PLAYING 1
|
|---|
| 310 | #define RECORDING 2
|
|---|
| 311 | #define PLAYING_AND_RECORDING 3
|
|---|
| 312 | #define UNITIALIZED 0xFFFFFFFF
|
|---|
| 313 |
|
|---|
| 314 | /* AUDIO_STATUS structure declaration */
|
|---|
| 315 |
|
|---|
| 316 | typedef struct _status { /* status */
|
|---|
| 317 | LONG lSRate;
|
|---|
| 318 | LONG lBitsPerSRate;
|
|---|
| 319 | LONG lBsize;
|
|---|
| 320 | SHORT sMode;
|
|---|
| 321 | SHORT sChannels;
|
|---|
| 322 | ULONG ulFlags;
|
|---|
| 323 | ULONG ulOperation;
|
|---|
| 324 | MCI_AUDIO_CHANGE rAudioChange;
|
|---|
| 325 | } MCI_AUDIO_STATUS;
|
|---|
| 326 |
|
|---|
| 327 | typedef MCI_AUDIO_STATUS FAR *LPMCI_AUDIO_STATUS;
|
|---|
| 328 |
|
|---|
| 329 | /*-------------------------------------------------------------------------*
|
|---|
| 330 | * AUDIO_CONTROL declarations and defines
|
|---|
| 331 | *-------------------------------------------------------------------------*/
|
|---|
| 332 |
|
|---|
| 333 | /* Values for AUDIO_CONTROL.usIOCtlRequest */
|
|---|
| 334 |
|
|---|
| 335 | #define AUDIO_CHANGE 0
|
|---|
| 336 | #define AUDIO_START 1
|
|---|
| 337 | #define AUDIO_STOP 2
|
|---|
| 338 | #define AUDIO_PAUSE 3
|
|---|
| 339 | #define AUDIO_RESUME 4
|
|---|
| 340 |
|
|---|
| 341 | /* Values for AUDIO_CONTROL.sReturnCode */
|
|---|
| 342 |
|
|---|
| 343 | #define AC_UNINITED 1 /* Device must be init'ed or loaded first */
|
|---|
| 344 | #define FULL_QUEUE 2 /* Maximum # requests exceeded */
|
|---|
| 345 | #define AC_UNPAUSED 3 /* Resume issued, but dev not paused */
|
|---|
| 346 | #define INVALID_REQUEST 4 /* bad audio_control.ioctl_request */
|
|---|
| 347 | #define AC_UNSTARTED 5 /* Device must be started first */
|
|---|
| 348 | #define INVALID_INPUT_LIST 7 /* invalid change.input_list entry */
|
|---|
| 349 | #define INVALID_OUTPUT_LIST 8 /* invalid change.output_list entry */
|
|---|
| 350 |
|
|---|
| 351 | /* AUDIO_CONTROL structure declaration */
|
|---|
| 352 |
|
|---|
| 353 | typedef struct _contr { /* contr */
|
|---|
| 354 | USHORT usIOCtlRequest;
|
|---|
| 355 | VOID FAR *pbRequestInfo;
|
|---|
| 356 | ULONG ulPosition;
|
|---|
| 357 | SHORT sReturnCode;
|
|---|
| 358 | } MCI_AUDIO_CONTROL;
|
|---|
| 359 |
|
|---|
| 360 | typedef MCI_AUDIO_CONTROL FAR *LPMCI_AUDIO_CONTROL;
|
|---|
| 361 |
|
|---|
| 362 | /*-------------------------------------------------------------------------*
|
|---|
| 363 | * AUDIO_BUFFER declarations and defines
|
|---|
| 364 | *-------------------------------------------------------------------------*/
|
|---|
| 365 |
|
|---|
| 366 | /* Values for AUDIO_BUFFER.ulFlags */
|
|---|
| 367 |
|
|---|
| 368 | #define AUDIO_UNDERRUN 1
|
|---|
| 369 | #define AUDIO_OVERRUN 2
|
|---|
| 370 |
|
|---|
| 371 | /* Values for AUDIO_BUFFER.ulPositionType */
|
|---|
| 372 |
|
|---|
| 373 | #define POS_MSECS 0
|
|---|
| 374 | #define MIDI_CLOCKS 1
|
|---|
| 375 | #define SMPTE_24 24
|
|---|
| 376 | #define SMPTE_25 25
|
|---|
| 377 | #define SMPTE_30DF 29
|
|---|
| 378 | #define SMPTE_30 30
|
|---|
| 379 |
|
|---|
| 380 | typedef struct _buffer { /* buffer */
|
|---|
| 381 | ULONG ulFlags;
|
|---|
| 382 | ULONG ulReadBufSize;
|
|---|
| 383 | ULONG ulWriteBufSize;
|
|---|
| 384 | ULONG ulReadBufTime;
|
|---|
| 385 | ULONG ulWriteBufTime;
|
|---|
| 386 | ULONG ulReadBufMax;
|
|---|
| 387 | ULONG ulWriteBufMax;
|
|---|
| 388 | ULONG ulPosition;
|
|---|
| 389 | ULONG ulPositionType;
|
|---|
| 390 | LONG lReadBufCap;
|
|---|
| 391 | LONG lWriteBufCap;
|
|---|
| 392 | LONG lRequestBufCap;
|
|---|
| 393 | } MCI_AUDIO_BUFFER;
|
|---|
| 394 |
|
|---|
| 395 | typedef MCI_AUDIO_BUFFER FAR *LPMCI_AUDIO_BUFFER;
|
|---|
| 396 |
|
|---|
| 397 | /*-------------------------------------------------------------------------*
|
|---|
| 398 | * AUDIO_LOAD declarations and defines
|
|---|
| 399 | *-------------------------------------------------------------------------*/
|
|---|
| 400 |
|
|---|
| 401 | /* Values for AUDIO_LOAD.ulFlags */
|
|---|
| 402 |
|
|---|
| 403 | #define LOAD_START 0x01
|
|---|
| 404 | #define LOAD_END 0x02
|
|---|
| 405 | #define LOAD_32BIT 0x10
|
|---|
| 406 |
|
|---|
| 407 | typedef struct _load { /* load */
|
|---|
| 408 | CHAR FAR *pbBuffer;
|
|---|
| 409 | ULONG ulSize;
|
|---|
| 410 | ULONG ulFlags;
|
|---|
| 411 | } MCI_AUDIO_LOAD;
|
|---|
| 412 |
|
|---|
| 413 | typedef MCI_AUDIO_LOAD FAR *LPMCI_AUDIO_LOAD;
|
|---|
| 414 |
|
|---|
| 415 | /*-------------------------------------------------------------------------*
|
|---|
| 416 | * Track info declarations and defines
|
|---|
| 417 | *-------------------------------------------------------------------------*/
|
|---|
| 418 |
|
|---|
| 419 | /* Track Info structure declaration */
|
|---|
| 420 |
|
|---|
| 421 | typedef struct _info { /* info */
|
|---|
| 422 | USHORT usMasterVolume;
|
|---|
| 423 | USHORT usDitherPct; /* Percent of a bit dither during record */
|
|---|
| 424 | USHORT usMasterVolumeDelay;
|
|---|
| 425 | USHORT usMasterBalance;
|
|---|
| 426 | USHORT usMasterBalanceDelay;
|
|---|
| 427 | } MCI_TRACK_INFO;
|
|---|
| 428 |
|
|---|
| 429 | typedef MCI_TRACK_INFO FAR *LPMCI_TRACK_INFO;
|
|---|
| 430 |
|
|---|
| 431 |
|
|---|
| 432 | /*-------------------------------------------------------------------------*
|
|---|
| 433 | * IOBUFFER declarations and defines
|
|---|
| 434 | *-------------------------------------------------------------------------*/
|
|---|
| 435 |
|
|---|
| 436 | #define STARTED 1
|
|---|
| 437 | #define PAUSED 2
|
|---|
| 438 |
|
|---|
| 439 | typedef struct _MCI_AUDIO_IOBUFFER { /* iobuffer */
|
|---|
| 440 | ULONG lSize;
|
|---|
| 441 | CHAR FAR *pHead;
|
|---|
| 442 | CHAR FAR *pTail;
|
|---|
| 443 | LONG lCount;
|
|---|
| 444 | ULONG ulPosition;
|
|---|
| 445 | LONG lDelay;
|
|---|
| 446 | USHORT usRunFlags;
|
|---|
| 447 | USHORT usSelInc;
|
|---|
| 448 | CHAR FAR *pBuffer;
|
|---|
| 449 | } MCI_AUDIO_IOBUFFER;
|
|---|
| 450 |
|
|---|
| 451 | typedef MCI_AUDIO_IOBUFFER FAR *LPMCI_AUDIO_IOBUFFER;
|
|---|
| 452 |
|
|---|
| 453 | /*-------------------------------------------------------------------------*
|
|---|
| 454 | * AUDIO_HPI declarations and defines
|
|---|
| 455 | *-------------------------------------------------------------------------*/
|
|---|
| 456 |
|
|---|
| 457 | #define CBXMIT 1
|
|---|
| 458 | #define CBREC 2
|
|---|
| 459 | #define CRTIMER 4
|
|---|
| 460 |
|
|---|
| 461 | #define EP_OPEN 0
|
|---|
| 462 | #define EP_CLOSE 1
|
|---|
| 463 | #define EP_READ 2
|
|---|
| 464 | #define EP_WRITE 3
|
|---|
| 465 | #define EP_INIT 4
|
|---|
| 466 | #define EP_STATUS 5
|
|---|
| 467 | #define EP_CONTROL 6
|
|---|
| 468 | #define EP_BUFFER 7
|
|---|
| 469 | #define EP_LOAD 8
|
|---|
| 470 | #define EP_WAIT 9
|
|---|
| 471 |
|
|---|
| 472 |
|
|---|
| 473 | typedef struct _hpi { /* hpi */
|
|---|
| 474 | VOID (FAR *pvEntry)();
|
|---|
| 475 | VOID (FAR *pvCallBack)();
|
|---|
| 476 | LPMCI_AUDIO_IOBUFFER prXBuff;
|
|---|
| 477 | LPMCI_AUDIO_IOBUFFER prRBuff;
|
|---|
| 478 | USHORT usFlags;
|
|---|
| 479 | } MCI_AUDIO_HPI;
|
|---|
| 480 |
|
|---|
| 481 | typedef MCI_AUDIO_HPI FAR *LPMCI_AUDIO_HPI;
|
|---|
| 482 |
|
|---|
| 483 | /**************************/
|
|---|
| 484 | /* AUDIO_UPDATE Structure */
|
|---|
| 485 | /**************************/
|
|---|
| 486 | typedef struct _audio_update { /* update */
|
|---|
| 487 |
|
|---|
| 488 | CHAR iobuf_type; /* 0 - XMITIO, 1 - RECIO to be updated */
|
|---|
| 489 | CHAR FAR *buffer_address; /* address to buffer to be added to array */
|
|---|
| 490 | ULONG buffer_length; /* length of buffer to be added */
|
|---|
| 491 | USHORT rc; /* return code */
|
|---|
| 492 | void FAR *reserved; /* future use */
|
|---|
| 493 | } AUDIO_UPDATE;
|
|---|
| 494 |
|
|---|
| 495 | typedef AUDIO_UPDATE FAR *UPDATE;
|
|---|
| 496 |
|
|---|
| 497 | /* audio_update.iobuf_type definitions */
|
|---|
| 498 | #define XMIT_IOBUF 0
|
|---|
| 499 | #define REC_IOBUF 1
|
|---|
| 500 |
|
|---|
| 501 | /* audio_update.rc definitions */
|
|---|
| 502 | #define MAX_NUM_BUFFERS_REACHED 9
|
|---|
| 503 | #define UPDATE_GENERAL_FAILURE 10
|
|---|
| 504 | #define INVALID_BUFFER_LENGTH 11
|
|---|
| 505 |
|
|---|
| 506 | /* XLATOFF */
|
|---|
| 507 | #pragma pack()
|
|---|
| 508 | /* XLATON */
|
|---|
| 509 |
|
|---|
| 510 | /* NOINC */
|
|---|
| 511 | #ifdef __cplusplus
|
|---|
| 512 | }
|
|---|
| 513 | #endif
|
|---|
| 514 | /* INC */
|
|---|
| 515 |
|
|---|