5 #include "DriverData.h"
9 #include <aros/debug.h>
11 struct DosLibrary
*DOSBase
= NULL
;
12 struct Library
*OSSBase
= NULL
;
14 /******************************************************************************
15 ** Custom driver init *********************************************************
16 ******************************************************************************/
19 DriverInit( struct DriverBase
* AHIsubBase
)
21 struct AROSBase
* AROSBase
= (struct AROSBase
*) AHIsubBase
;
23 DOSBase
= OpenLibrary( DOSNAME
, 37 );
28 Req( "Unable to open 'dos.library' version 37.\n" );
30 D(bug("Unable to open 'dos.library' version 37.\n" ));
35 OSSBase
= OpenLibrary( "oss.library", 0 );
40 Req( "Unable to open 'oss.library'.\n" );
45 // Fail if no hardware is present (this check prevents the audio
46 // modes from being added to the database if the driver cannot be
49 if( ! OSS_Open( "/dev/dsp", FALSE
, TRUE
, FALSE
) )
52 Req( "No sound card present.\n" );
54 D(bug( "No sound card present.\n" ));
65 /******************************************************************************
66 ** Custom driver clean-up *****************************************************
67 ******************************************************************************/
70 DriverCleanup( struct DriverBase
* AHIsubBase
)
72 struct AROSBase
* AROSBase
= (struct AROSBase
*) AHIsubBase
;
74 CloseLibrary( (struct Library
*) DOSBase
);
75 CloseLibrary( OSSBase
);