[Mplayer-cvslog] CVS: main/TOOLS audio-block2.c,1.1,1.2

GEREOFFY arpi_esp at users.sourceforge.net
Tue May 8 23:28:06 CEST 2001


Update of /cvsroot/mplayer/main/TOOLS
In directory usw-pr-cvs1:/tmp/cvs-serv21392

Modified Files:
	audio-block2.c 
Log Message:
fragment info added (disabled)

Index: audio-block2.c
===================================================================
RCS file: /cvsroot/mplayer/main/TOOLS/audio-block2.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** audio-block2.c	2001/05/02 04:29:04	1.1
--- audio-block2.c	2001/05/08 21:28:04	1.2
***************
*** 27,30 ****
--- 27,39 ----
  static unsigned char a_buffer[OUTBURST];
  
+ void inline print_info(int audio_fd){
+ #if 1
+   audio_buf_info zz;
+   ioctl(audio_fd, SNDCTL_DSP_GETOSPACE, &zz);
+   printf("Status: %3d/%d  (%d byte/frag)  free: %6d\n",
+       zz.fragments, zz.fragstotal, zz.fragsize, zz.bytes);
+ #endif
+ }
+ 
  int main(){
    int audio_buffer_size=0;
***************
*** 40,43 ****
--- 49,57 ----
      return 1;
    }
+ 
+ //  ioctl(audio_fd, SNDCTL_DSP_RESET, NULL);
+ //  print_info(audio_fd);
+ 
+   ioctl(audio_fd, SNDCTL_DSP_RESET, NULL);
    
    r=AFMT_S16_LE;ioctl (audio_fd, SNDCTL_DSP_SETFMT, &r);
***************
*** 46,49 ****
--- 60,65 ----
        printf("audio_setup: your card doesn't support %d Hz samplerate\n",r);
  
+ //  print_info(audio_fd);
+ 
    t0=t1=GetTimer();
  
***************
*** 55,58 ****
--- 71,76 ----
        tv.tv_sec=0; tv.tv_usec = 0;
        if(select(audio_fd+1, NULL, &rfds, NULL, &tv)) c=' ';
+ 
+ //    print_info(audio_fd);
  
      r=write(audio_fd,a_buffer,OUTBURST);


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list