[Mplayer-cvslog] CVS: main/libao2 ao_sun.c,1.16,1.17

Atmosfear atmos4 at mplayerhq.hu
Wed Jul 3 23:17:41 CEST 2002


Update of /cvsroot/mplayer/main/libao2
In directory mail:/var/tmp.root/cvs-serv6814/libao2

Modified Files:
	ao_sun.c 
Log Message:
Patch to improve bufferhandling on OpenBSD and NetBSD, by Björn Sandell and Bernd Ernesti <mplayer at lists.veego.de>


Index: ao_sun.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_sun.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- ao_sun.c	29 Apr 2002 08:47:30 -0000	1.16
+++ ao_sun.c	3 Jul 2002 21:17:31 -0000	1.17
@@ -445,13 +445,19 @@
     }
 #endif
 
-#ifndef __OpenBSD__
+#if !defined (__OpenBSD__) && !defined(__NetBSD__)
     ioctl(audio_fd, AUDIO_GETINFO, &info);
     if (queued_bursts - info.play.eof > 2)
 	return 0;
 #endif
 
+#if defined(__NetBSD__) || defined(__OpenBSD__)
+    ioctl(audio_fd, AUDIO_GETINFO, &info);
+    return info.hiwat * info.blocksize - info.play.seek;
+#else
     return ao_data.outburst;
+#endif
+
 }
 
 // plays 'len' bytes of 'data'
@@ -507,7 +513,7 @@
 static float get_delay(){
     audio_info_t info;
     ioctl(audio_fd, AUDIO_GETINFO, &info);
-#ifdef __OpenBSD__
+#if defined (__OpenBSD__) || defined(__NetBSD__)
     return (float) info.play.seek/ (float)byte_per_sec ;
 #else
     if (info.play.samples && enable_sample_timing == RTSC_ENABLED)




More information about the MPlayer-cvslog mailing list