Package ewa :: Module mp3
[show private | hide private]
[frames | no frames]

Module ewa.mp3

Function Summary
  calculate_id3v2_size(header)
precondition: header is a valid ID3v2 header.
  get_id3v1_offset_and_tag(filename, correct_offset)
  get_id3v2_tags(fp)
returns the id3v2 tag as a string.
  get_vbr_bitrate_samplerate_mode(path)
returns a 4-tuple: whether the file is VBR, the bitrate, the samplerate, and the mode.
  mp3_sanity_check(files)
if all files are mp3 files and are of the same bitrate, samplerate, and mode, do nothing; otherwise raise an exception
  splice(files, tagfile, buffsize, splicer, **splicerKwargs)
Returns an iterator that supplies the spliced data from the files listed in chunks not larger than buffsize.
  _check_last_sync(fp, idx)
search back to no more than BUFFMAX to find a valid sync frame, and return the end index of the valid part of the file
  _default_splicer(files, buffsize)
  _mp3cat_splicer(files, buffsize, mp3cat_path)
splicing engine that uses Tom Clegg's mp3cat.
  _sox_splicer(files, buffsize, sox_path)

Variable Summary
int BUFFMAX = 8192                                                                  

Function Details

calculate_id3v2_size(header)

precondition: header is a valid ID3v2 header.

get_id3v2_tags(fp)

returns the id3v2 tag as a string. fp is an open file; if there is no id3v2 tag the file is left at the same position as when it was found, otherwise it is left at the end of the tag.

get_vbr_bitrate_samplerate_mode(path)

returns a 4-tuple: whether the file is VBR, the bitrate, the samplerate, and the mode.

mp3_sanity_check(files)

if all files are mp3 files and are of the same bitrate, samplerate, and mode, do nothing; otherwise raise an exception

splice(files, tagfile=None, buffsize=1048576, splicer=<function _default_splicer at 0x301483f0>, **splicerKwargs)

Returns an iterator that supplies the spliced data from the files listed in chunks not larger than buffsize. ID3 v2 and v1 tags are supplied from the tagfile if provided.

_check_last_sync(fp, idx)

search back to no more than BUFFMAX to find a valid sync frame, and return the end index of the valid part of the file

_mp3cat_splicer(files, buffsize, mp3cat_path='/usr/bin/mp3cat')

splicing engine that uses Tom Clegg's mp3cat.

Variable Details

BUFFMAX

Type:
int
Value:
8192                                                                  

Generated by Epydoc 2.1 on Wed Jan 3 10:13:56 2007 http://epydoc.sf.net