CD Audio Media Control Driver DLL (CDAUDIOT.DLL)

The CD audio MCD, CDAUDIOT, receives commands from the MDM and processes them. If a command message cannot be completely processed, it is sent to the hardware-specific code in the VSD.

Following describes the files and routines included in the CDAUDIOT.DLL.


CDAUDIO.C File

This module includes the entry point for the DLL. Global validation and parameter checking is performed on requested command messages. If the preliminary check finds no errors, a specific-processing function is called.

┌─────────────────────────┬───────────────────────────────────┐
│Procedure                │Description                        │
├─────────────────────────┼───────────────────────────────────┤
│mciDriverEntry           │Specifies the entry point to the   │
│                         │MCD from the MDM.                  │
├─────────────────────────┼───────────────────────────────────┤
│pre_process_msg          │Gets the device ready to process   │
│                         │the command.                       │
├─────────────────────────┼───────────────────────────────────┤
│process_msg              │Processes the requested command    │
│                         │message.                           │
├─────────────────────────┼───────────────────────────────────┤
│verify_entry             │Verifies that entry parameters are │
│                         │valid.                             │
├─────────────────────────┼───────────────────────────────────┤
│QMAudio                  │Queries the master audio's current │
│                         │settings.                          │
├─────────────────────────┼───────────────────────────────────┤
│Register                 │Registers the drive.               │
├─────────────────────────┼───────────────────────────────────┤
│ReRegister               │Registers the disc and tracks.     │
├─────────────────────────┼───────────────────────────────────┤
│VSDReturn                │Specifies the entry point to the   │
│                         │MCD from the VSD.  Processes return│
│                         │information from the VSD.          │
├─────────────────────────┼───────────────────────────────────┤
│SetTrackInst             │Sets track information in the      │
│                         │instance.                          │
├─────────────────────────┼───────────────────────────────────┤
│ValPointer               │Validates the address to record    │
│                         │structures.                        │
└─────────────────────────┴───────────────────────────────────┘

CDAUDPRO.C File

This module contains the hardware independent code that processes the command message. Some command may be processed completely by the MCD while others require the VSD to access the hardware or know of information specific to the VSD's associated drive.

┌─────────────────────────┬───────────────────────────────────┐
│Procedure                │Description                        │
├─────────────────────────┼───────────────────────────────────┤
│ProcClose                │Processes the MCI_CLOSE command.   │
├─────────────────────────┼───────────────────────────────────┤
│ProcConnector            │Processes the MCI_CONNECTOR        │
│                         │command.                           │
├─────────────────────────┼───────────────────────────────────┤
│ProcCue                  │Processes the MCI_CUE command.     │
├─────────────────────────┼───────────────────────────────────┤
│ProcCuePoint             │Processes the MCI_SET_CUEPOINT     │
│                         │command.                           │
├─────────────────────────┼───────────────────────────────────┤
│ProcGeneral              │Processes pass through MCI         │
│                         │commands.                          │
├─────────────────────────┼───────────────────────────────────┤
│ProcCaps                 │Processes the MCI_GETDEVCAPS       │
│                         │command.                           │
├─────────────────────────┼───────────────────────────────────┤
│ProcInfo                 │Processes the MCI_INFO command.    │
├─────────────────────────┼───────────────────────────────────┤
│ProcMAudio               │Processes the MCI_MASTERAUDIO      │
│                         │command.                           │
├─────────────────────────┼───────────────────────────────────┤
│ProcOpen                 │Processes the MCI_OPEN command.    │
├─────────────────────────┼───────────────────────────────────┤
│ProcPause                │Processes the MCI_PAUSE command.   │
├─────────────────────────┼───────────────────────────────────┤
│ProcPlay                 │Processes the MCI_PLAY command.    │
├─────────────────────────┼───────────────────────────────────┤
│ProcPosAdvise            │Processes the                      │
│                         │MCI_SET_POSITION_ADVISE command.   │
├─────────────────────────┼───────────────────────────────────┤
│ProcRestore              │Processes the MCIDRV_RESTORE       │
│                         │command.                           │
├─────────────────────────┼───────────────────────────────────┤
│ProcResume               │Processes the MCI_RESUME command.  │
├─────────────────────────┼───────────────────────────────────┤
│ProcSave                 │Processes the MCIDRV_SAVE command. │
├─────────────────────────┼───────────────────────────────────┤
│ProcSeek                 │Processes the MCI_SEEK command.    │
├─────────────────────────┼───────────────────────────────────┤
│ProcSet                  │Processes the MCI_SET command.     │
├─────────────────────────┼───────────────────────────────────┤
│ProcSetSync              │Processes the MCI_SET_SYNC_OFFSET  │
│                         │command.                           │
├─────────────────────────┼───────────────────────────────────┤
│ProcStatus               │Processes the MCI_STATUS command.  │
├─────────────────────────┼───────────────────────────────────┤
│ProcStop                 │Processes the MCI_STOP command.    │
├─────────────────────────┼───────────────────────────────────┤
│ProcSync                 │Processes the MCIDRV_SYNC command. │
└─────────────────────────┴───────────────────────────────────┘

CDAUDUTL.C File

This module contains the hardware independent code that supplement the process commands in CDAUDPRO.C. It also contains utility functions as well.

┌─────────────────────────┬───────────────────────────────────┐
│Procedure                │Description                        │
├─────────────────────────┼───────────────────────────────────┤
│SetAudio                 │Sets audio information from        │
│                         │MCI_SET.                           │
├─────────────────────────┼───────────────────────────────────┤
│SetConnector             │Enables or disables a connection.  │
├─────────────────────────┼───────────────────────────────────┤
│SetCuePoint              │Enables the cue point.             │
├─────────────────────────┼───────────────────────────────────┤
│StatusMCD                │Gets status from MCD information.  │
├─────────────────────────┼───────────────────────────────────┤
│StatusMCDDef             │Gets status from MCD default       │
│                         │information.                       │
├─────────────────────────┼───────────────────────────────────┤
│StatusVSD                │Gets status from VSD information.  │
├─────────────────────────┼───────────────────────────────────┤
│DisableEvents            │Disables cuepoints and position    │
│                         │advise.                            │
├─────────────────────────┼───────────────────────────────────┤
│GetTimeAddr              │Converts a time format to/from     │
│                         │MMTIME.                            │
├─────────────────────────┼───────────────────────────────────┤
│GetTimeAddrRC            │Colinizes return code to time      │
│                         │format.                            │
├─────────────────────────┼───────────────────────────────────┤
│GetTrackInfo             │Gets the track information for a   │
│                         │specified track.                   │
├─────────────────────────┼───────────────────────────────────┤
│ValAddress               │Validates addresses to be in range.│
├─────────────────────────┼───────────────────────────────────┤
│ValState                 │Validates state of logical device. │
├─────────────────────────┼───────────────────────────────────┤
│vsdResponse              │Processes VSD response.            │
└─────────────────────────┴───────────────────────────────────┘

CDMCINIT.C File

This module initializes the re-entrant DLL.

┌─────────────────────────┬───────────────────────────────────┐
│Procedure                │Description                        │
├─────────────────────────┼───────────────────────────────────┤
│_DLL_InitTerm            │Specifies the entry point for the  │
│                         │OS/2 loader.                       │
├─────────────────────────┼───────────────────────────────────┤
│CDMCInitialization       │Obtains initial heap.              │
├─────────────────────────┼───────────────────────────────────┤
│CDMC_Exit                │Cleans up instances after          │
│                         │termination.                       │
└─────────────────────────┴───────────────────────────────────┘

CDMCCOMN.C

This module contains the common functions between the CD MCD and the VSD for the IBM CD-ROM Drive.

┌─────────────────────────┬───────────────────────────────────┐
│Procedure                │Description                        │
├─────────────────────────┼───────────────────────────────────┤
│parse_DevParm            │Parses the device-specific         │
│                         │parameter.                         │
├─────────────────────────┼───────────────────────────────────┤
│get_token                │Gets next token and null terminates│
│                         │it.                                │
└─────────────────────────┴───────────────────────────────────┘

HHPHEAP.C File

This module contains the common heap management functions.

┌─────────────────────────┬───────────────────────────────────┐
│Procedure                │Description                        │
├─────────────────────────┼───────────────────────────────────┤
│HhpCreateHeap            │Creates the first heap.            │
├─────────────────────────┼───────────────────────────────────┤
│NewHeap                  │Creates a new heap (one segment).  │
├─────────────────────────┼───────────────────────────────────┤
│HhpAllocMem              │Allocates some memory.             │
├─────────────────────────┼───────────────────────────────────┤
│LocateFreeMem            │Locates a free block of memory.    │
├─────────────────────────┼───────────────────────────────────┤
│HhpFreeMem               │Frees memory.                      │
├─────────────────────────┼───────────────────────────────────┤
│CollapseFreeBlock        │Removes fragmentation within a     │
│                         │heap.                              │
├─────────────────────────┼───────────────────────────────────┤
│CollapseFreeHeap         │Removes fragmentation within heaps.│
├─────────────────────────┼───────────────────────────────────┤
│HhpDestroyHeap           │Destroys a heap.                   │
├─────────────────────────┼───────────────────────────────────┤
│HhpAllocBuffer           │Allocates a buffer from the system.│
├─────────────────────────┼───────────────────────────────────┤
│HhpFreeBuffer            │Frees the allocated buffer.        │
├─────────────────────────┼───────────────────────────────────┤
│HhpAccessBuffer          │Sets up segment for access.        │
├─────────────────────────┼───────────────────────────────────┤
│HhpAccessHeap            │Accesses a shared heap.            │
├─────────────────────────┼───────────────────────────────────┤
│HhpReleaseHeap           │Releases a heap.                   │
├─────────────────────────┼───────────────────────────────────┤
│AddPid                   │Adds a process ID to the PID list. │
├─────────────────────────┼───────────────────────────────────┤
│ReallocHeap              │Reallocates a heap.                │
├─────────────────────────┼───────────────────────────────────┤
│HhpGetPID                │Gets the PID for the heap.         │
├─────────────────────────┼───────────────────────────────────┤
│HhpDumpHeap              │Dumps heap contents to standard    │
│                         │out.                               │
└─────────────────────────┴───────────────────────────────────┘


[Back: CD Audio MCD Modules]
[Next: Vendor-Specific Driver for CD-ROM Drives (IBMCDRT.DLL)]