Beispiel #1
0
void MIDASerror(void)
{
        mode(3);
        cout << "MIDAS error: %s\n" << MIDASgetErrorMessage(MIDASgetLastError());
        MIDASclose(); /*!!!!!*/
        exit(EXIT_FAILURE);
}
Beispiel #2
0
void MIDASerror(int error)
{
    printf("MIDAS error: %s\n", MIDASgetErrorMessage(error));

    MIDASclose();

    exit(EXIT_FAILURE);
}
Beispiel #3
0
void MIDASerror(void)
{
    printf("MIDAS error: %s\n", MIDASgetErrorMessage(MIDASgetLastError()));

    MIDASclose();

#ifdef DEBUG
    errPrintList();
#endif

    exit(EXIT_FAILURE);
}
Beispiel #4
0
void mError(int error)
{
    printf("MIDAS error: %s\n", MIDASgetErrorMessage(error));

    MIDASclose();

#ifdef DEBUG
    errPrintList();
#endif

    exit(EXIT_FAILURE);
}
Beispiel #5
0
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;
}
Beispiel #6
0
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;
}
Beispiel #7
0
static void reportErr(int err)
{
    _bprintf(errBuf,errBufLen," %s: %s",hint,MIDASgetErrorMessage(err));
    errAdd(errBuf);
}
Beispiel #8
0
void MIDASerror() {
		printf("MIDAS error: %s\n", MIDASgetErrorMessage(MIDASgetLastError()));
		MIDASclose();
		getch();
		exit(0);
}