On Thu, 12 May 2005, Dag Wieers wrote:
I'm looking into why pytone is using +- 6.5% CPU on my 1.8Ghz laptop on normal playback. When stracing I noticed pytone is opening playerinfo every second. Instead of reopening the same file, you could do a seek(0).
Attached is a patch that exactly does that. I also changed a little bit the flow and added an os.fsync(fd) statement. I don't think that is actually needed, but I was testing why pytone did not continued after I killed it and thought an fsync might help. (not!)
Another thing that worries me is that when stracing pytone I make it hang when exiting (ctrl-c) strace. In fact I end up killing pytone to solve the situation.
This one actually truncates the file properly :) Sorry for that.
-- dag wieers, dag@wieers.com, http://dag.wieers.com/ -- [all I want is a warm bed and a kind word and unlimited power]