void AVDM_audioInit(void )
{
uint8_t init=0;
char *name=NULL;
AUDIO_DEVICE id;

		if(prefs->get(DEVICE_AUDIODEVICE, &name))
		{
		id=ADM_audioByName(name);
		ADM_dealloc(name);
		name=NULL;	
		if(!id) id=DEVICE_DUMMY;
		switch(id)
		{

			case DEVICE_ARTS:									
			case DEVICE_ALSA:
			case DEVICE_COREAUDIO:
			case DEVICE_SDL:
			case DEVICE_WIN32:
			case DEVICE_ESD:
			
						printf("Using real audio device\n");
						AVDM_switch(id);
						init=1;	
						break;				
			case DEVICE_DUMMY:
			default:
						printf("Using dummy audio device\n");
						init=1;
						AVDM_switch(id);
						break;
		
		}
		}
		// Fallback
		if(init==0)
		{
		#ifdef OSS_SUPPORT
			AVDM_switch(DEVICE_OSS);			
			printf("\n Using OSS\n");
		#else
			#ifdef CYG_MANGLING
			AVDM_switch(DEVICE_WIN32);
			#else
                #ifdef USE_ESD
			        AVDM_switch(DEVICE_ESD);
                #else
			        AVDM_switch(DEVICE_DUMMY);
			        printf("\n Using dummy\n");
                #endif
			#endif
		#endif
		}
}
Exemplo n.º 2
0
/**
    \fn AVDM_audioInit
    \brief
*/
void AVDM_audioInit(void )
{
uint8_t init=0;
char *name=NULL;
AUDIO_DEVICE id=0;

		if(prefs->get(AUDIO_DEVICE_AUDIODEVICE, &name))
		{
		id=ADM_audioByName(name);
		ADM_dealloc(name);
		name=NULL;	
        }
		
		
        AVDM_switch(id);
}