[MPlayer-cvslog] r26344 - trunk/libao2/ao_sun.c

reimar subversion at mplayerhq.hu
Mon Apr 7 19:32:44 CEST 2008


Author: reimar
Date: Mon Apr  7 19:32:44 2008
New Revision: 26344

Log:
AUDIO_DRAIN makes no sense directly after opening
the device, but it should be done in uninit.


Modified:
   trunk/libao2/ao_sun.c

Modified: trunk/libao2/ao_sun.c
==============================================================================
--- trunk/libao2/ao_sun.c	(original)
+++ trunk/libao2/ao_sun.c	Mon Apr  7 19:32:44 2008
@@ -478,8 +478,6 @@ static int init(int rate,int channels,in
 	return 0;
     }
 
-    ioctl(audio_fd, AUDIO_DRAIN, 0);
-
     if (af2sunfmt(format) == AUDIO_ENCODING_NONE)
       format = AF_FORMAT_S16_NE;
 
@@ -583,6 +581,8 @@ static void uninit(int immed){
     // throw away buffered data in the audio driver's STREAMS queue
     if (immed)
 	flush_audio(audio_fd);
+    else
+	ioctl(audio_fd, AUDIO_DRAIN, 0);
     close(audio_fd);
 }
 



More information about the MPlayer-cvslog mailing list