Anonymous avatar Anonymous 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.

Comments (0)

Files changed (3)

 print "Please give an (absolute)filename of a movie file you'd like to play: ",
 #filename = raw_input()
 #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.
 AVPacket flush_pkt;
 /* Queues for already-loaded pictures, for rapid display */
 /* RGB24 or RGBA... */
 /* In this case I've chosen RGB24 because its smaller */
     	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;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.