#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "driver.h"
#include "sb.h"

int main(int argc, char **argv)
{
	int err;
	
	if ( snd_init(argc, argv) == -1 )
		return (EXIT_FAILURE);
	
	snd_sb_getopt(argc, argv);
	if ( snd_sb8_init() < 0 ) {
		if ( (err = snd_sb16_init()) < 0 ) {
			fprintf( stderr, "Unable to detect SoundBlaster(%s)", strerror(-err));
			return( EXIT_FAILURE);
		}
	}
    return snd_start();
}
