Concerning the bug in player.getLength(): getLength() returns self.length. self.length is set in _getStreamLength(), which is called from _readerLoop(). After calling _getStreamLength(), _readerLoop() drops into a while loop where it stays as long as the sound file is playing. Accordingly, _getStreamLength() never gets called again. You said that it sometimes takes 1 sec before getLength() returns the correct value, but if _getStreamLength() never gets called again then self.length will never get updated. self.length is assigned a large negative number the one time _getStreamLength() gets called. I don't know what you meant to do here. I especially don't know why player can't get the correct length the first time _getSreamLength is called. We should be able to determine the file size. The only other datum we need is the sample rate. Is there a problem reading the metadata in one try? Any suggestions? -- View this message in context: http://www.nabble.com/Experience-using-PyMedia-tf1919429.html#a5276934 Sent from the pymedia-users forum at Nabble.com.
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Pymedia-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pymedia-users
