diff dec_audio.c @ 1309:598e3047ce13

Add some preliminary support for non-x86 architectures to mplayer
author jkeil
date Thu, 12 Jul 2001 15:35:52 +0000
parents 36ed1692c0b8
children d797ecb9778f
line wrap: on
line diff
--- a/dec_audio.c	Thu Jul 12 15:30:15 2001 +0000
+++ b/dec_audio.c	Thu Jul 12 15:35:52 2001 +0000
@@ -75,6 +75,10 @@
 
 switch(driver){
 case 4:
+#ifndef	ARCH_X86
+  printf("Win32/ACM audio codec unavailable on non-x86 CPU -> force nosound :(\n");
+  driver=0;
+#else
   // Win32 ACM audio codec:
   if(init_acm_audio_codec(sh_audio)){
     sh_audio->i_bps=sh_audio->wf->nAvgBytesPerSec;
@@ -88,6 +92,7 @@
     printf("Could not load/initialize Win32/ACM AUDIO codec (missing DLL file?)\n");
     driver=0;
   }
+#endif
   break;
 case 7:
 #ifndef USE_DIRECTSHOW
@@ -149,6 +154,7 @@
 sh_audio->a_buffer_len=0;
 
 switch(driver){
+#ifdef ARCH_X86
 case 4: {
     int ret=acm_decode_audio(sh_audio,sh_audio->a_buffer,4096,sh_audio->a_buffer_size);
     if(ret<0){
@@ -158,6 +164,7 @@
     sh_audio->a_buffer_len=ret;
     break;
 }
+#endif
 case 2: {
     // AVI PCM Audio:
     WAVEFORMATEX *h=sh_audio->wf;
@@ -320,6 +327,7 @@
         }
         //printf("{3:%d}",avi_header.idx_pos);fflush(stdout);
         break;
+#ifdef ARCH_X86
       case 4:
 //        len=sh_audio->audio_out_minsize; // optimal decoded fragment size
 //        if(len<minlen) len=minlen; else
@@ -327,6 +335,7 @@
 //        len=acm_decode_audio(sh_audio,buf,len);
         len=acm_decode_audio(sh_audio,buf,minlen,maxlen);
         break;
+#endif
 
 #ifdef USE_DIRECTSHOW
       case 7: // DirectShow