Commits

zeroth  committed 1f03228

Conditional fix of sound system causes much better syncing. I /think/ it is slightly off in some places, but gets synced back very quickly. Must test.

  • Participants
  • Parent commits 6034b38
  • Branches tylerthemovie

Comments (0)

Files changed (3)

File movie_test.py

 
 print "Please give an (absolute)filename of a movie file you'd like to play: ",
 #filename = raw_input()
-filename="/home/tyler/dhs1.avi"
+filename="/home/tyler/tos.avi"
 #initialization. It could also have a surface as a second argument, and every 
 # frame will be blitted to that surface. It is the programmer's responsibility
 # to be on time for rendering that surface.

File src/_gmovie.h

 AVPacket flush_pkt;
 
 /* Queues for already-loaded pictures, for rapid display */
-#define VIDEO_PICTURE_QUEUE_SIZE 8
+#define VIDEO_PICTURE_QUEUE_SIZE 2
 #define SUBPICTURE_QUEUE_SIZE    4
 /* RGB24 or RGBA... */
 /* In this case I've chosen RGB24 because its smaller */

File src/_gsound.c

     	int bytes_per_sec = ainfo->channels*ainfo->sample_rate*2;
     	ainfo->audio_clock+= (double) len/(double) bytes_per_sec;
     	int n_pkts = bytes_per_sec/len;
-    	double change = (double)pts/(double)n_pkts;
-    	double clock = ainfo->audio_clock;
-    	if(((change-clock)> 0.2 ) && (change-clock)<5.0)
+    	//double change = (double)pts/(double)n_pkts;
+    	//double clock = ainfo->audio_clock;
+    	/*if(((change-clock)> 0.2 ) && (change-clock)<5.0)
     	{
     		ainfo->audio_clock = change;
-    	}
+    	}*/
 	}
     ainfo->current_frame_size =len;
     int chan = ainfo->channel;