static void MIDASreportErr() { if(MIDASgetLastError()) { extern int mLastError; reportErr(MIDASgetLastError()); mLastError=0; } }
void MIDASerror(void) { mode(3); cout << "MIDAS error: %s\n" << MIDASgetErrorMessage(MIDASgetLastError()); MIDASclose(); /*!!!!!*/ exit(EXIT_FAILURE); }
void MIDASerror(void) { printf("MIDAS error: %s\n", MIDASgetErrorMessage(MIDASgetLastError())); MIDASclose(); #ifdef DEBUG errPrintList(); #endif exit(EXIT_FAILURE); }
static void MIDAS_start(struct mpxplay_audioout_info_s *aui) { if(midashandle){ MIDASresumeStream(midashandle); }else{ midashandle=MIDASplayStreamPolling(4,aui->freq_card,1000); if(midashandle==NULL){ pds_textdisplay_printf("MIDAS error: "); pds_textdisplay_printf(MIDASgetErrorMessage(MIDASgetLastError())); MIDASclose(); exit(0); } MIDAS_setvol(); } aui->card_infobits|=AUINFOS_CARDINFOBIT_PLAYING; }
static int MIDAS_detect(struct mpxplay_audioout_info_s *aui) { unsigned int iscard,len; char midascnffile[300]; pds_getpath_from_fullname(midascnffile,freeopts[OPT_PROGNAME]); len=pds_strlen(midascnffile); if(len && (midascnffile[len-1]!=PDS_DIRECTORY_SEPARATOR_CHAR)) len+=pds_strcpy(&midascnffile[len],PDS_DIRECTORY_SEPARATOR_STR); pds_strcpy(&midascnffile[len],"mpxmidas.ini"); MIDASstartup(); MIDASsetOption(MIDAS_OPTION_MIXING_MODE,1); if(aui->card_controlbits&AUINFOS_CARDCNTRLBIT_MIDASMANUALCFG){ iscard=MIDASconfig(); MIDASsaveConfig(midascnffile); }else{ iscard=MIDASloadConfig(midascnffile); if(!iscard) iscard=MIDASdetectSoundCard(); } iscard+=MIDASinit(); iscard+=MIDASopenChannels(2); if(iscard==3){ midashandle=MIDASplayStreamPolling(4,aui->freq_card,1000); if(midashandle){ MIDASpauseStream(midashandle); iscard++; } } if(iscard<4){ pds_textdisplay_printf("MIDAS error: "); pds_textdisplay_printf(MIDASgetErrorMessage(MIDASgetLastError())); MIDASclose(); return 0; } return 1; }
void MIDASerror() { printf("MIDAS error: %s\n", MIDASgetErrorMessage(MIDASgetLastError())); MIDASclose(); getch(); exit(0); }