5 #include "DriverData.h"
7 /******************************************************************************
8 ** Custom driver init *********************************************************
9 ******************************************************************************/
12 DriverInit( struct DriverBase
* AHIsubBase
)
14 struct VoidBase
* VoidBase
= (struct VoidBase
*) AHIsubBase
;
16 VoidBase
->dosbase
= (struct DosLibrary
*)OpenLibrary( DOSNAME
, 37 );
18 if( VoidBase
->dosbase
== NULL
)
20 Req( "Unable to open 'dos.library' version 37.\n" );
25 if ((IDOS
= (struct DOSIFace
*) GetInterface((struct Library
*) DOSBase
, "main", 1, NULL
)) == NULL
)
27 Req("Couldn't open IDOS interface!\n");
32 // Fail if no hardware is present (this check prevents the audio
33 // modes from being added to the database if the driver cannot be
37 if( unable_to_find_hardware )
39 Req( "No sound card present.\n" );
47 /******************************************************************************
48 ** Custom driver clean-up *****************************************************
49 ******************************************************************************/
52 DriverCleanup( struct DriverBase
* AHIsubBase
)
54 struct VoidBase
* VoidBase
= (struct VoidBase
*) AHIsubBase
;
57 DropInterface( (struct Interface
*) IDOS
);
60 CloseLibrary( (struct Library
*) DOSBase
);