#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#define SNDCFG_ISAPNP
#include "driver.h"
#include "opti9xx.h"

int main(int argc, char **argv)
{
	int err;
	
	if ( snd_init(argc, argv) == -1 )
		return (EXIT_FAILURE);
	
	snd_opti_getopt(argc, argv);
	if ((err = opti9xx_init()) < 0 ) {
		fprintf( stderr, "Unable to detect OPTI-9xx(%s)", strerror(-err));
		return( EXIT_FAILURE);
	}
    snd_start();
	opti9xx_cleanup();
	snd_cleanup();
	return(0);
}
