Discussion:
[BitPim-devel] Re: [bitpim-cvs-checkins] bitpim midifile.py,NONE,1.1 fileinfo.py,1.11,1.12
Roger Binns
2005-01-16 09:37:48 UTC
Permalink
+ # locate the 1st sync frame
+ found_sync=False
+ # if we can't find it half way into the file, it ain't there
The reason I didn't take that approach was because I wanted to mainly
deal with correct MP3 files (ie without gratuitious junk at the
begining). The more you ignore, the more likely you skip over something
erroneously. That said, why does ffmpeg put zeroes at the begining?
+ b=f.GetByte(self.nextoffset)
+ print 'Out of sync, backing up 1 byte'
Is the backing up one byte still needed as you fixed the other frame length
bugs?
--- NEW FILE: midifile.py ---
### BITPIM
###
I think you'll find I don't have any copyright on that file :-)
return self.__time_delta
time_delta=property(fget=__get_time_delta)
As a stylistic issue there is no need for code like that. Just name the
variable self.time_delta. You can make it a property in the future
without affecting any calling code. It is also generally not recommended
to use double underscores unless you expect derived classes to want to
create something with the same name.

I presume a variant of the code could also be used to do clipping of
midi files, although that isn't very high up on the priority list.

Roger

Loading...