alsa.audio: init/deinit connection to ALSA
[AROS.git] / workbench / devs / AHI / Drivers / Alsa / alsa-init.c
blobda98e5d82397b2201dc7b74f60a18a7ce68894f8
2 #include <config.h>
4 #include "library.h"
5 #include "DriverData.h"
7 #include "alsa-bridge/alsa.h"
9 /******************************************************************************
10 ** Custom driver init *********************************************************
11 ******************************************************************************/
13 BOOL
14 DriverInit( struct DriverBase* AHIsubBase )
16 struct AlsaBase* AlsaBase = (struct AlsaBase*) AHIsubBase;
18 AlsaBase->dosbase = (struct DosLibrary *)OpenLibrary( DOSNAME, 37 );
20 if( AlsaBase->dosbase == NULL )
22 Req( "Unable to open 'dos.library' version 37.\n" );
23 return FALSE;
26 if (!ALSA_Init())
27 return FALSE;
29 return TRUE;
33 /******************************************************************************
34 ** Custom driver clean-up *****************************************************
35 ******************************************************************************/
37 VOID
38 DriverCleanup( struct DriverBase* AHIsubBase )
40 struct AlsaBase* AlsaBase = (struct AlsaBase*) AHIsubBase;
42 ALSA_Cleanup();
44 CloseLibrary( (struct Library*) DOSBase );