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

Module mp3

source code

Functions [hide private]
 
_sox_splicer(files, buffsize, sox_path='/usr/bin/sox') source code
 
_mp3cat_splicer(files, buffsize, mp3cat_path='/usr/bin/mp3cat')
splicing engine that uses Tom Clegg's mp3cat.
source code
 
_default_splicer(files, buffsize) source code
 
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
source code
 
splice(files, tagfile=None, buffsize=1048576, splicer=<function _default_splicer at 0x1f409b0>, **splicerKwargs)
Returns an iterator that supplies the spliced data from the files listed in chunks not larger than buffsize.
source code
 
get_vbr_bitrate_samplerate_mode(path)
returns a 4-tuple: whether the file is VBR, the bitrate, the samplerate, and the mode.
source code
 
calculate_id3v2_size(header)
precondition: header is a valid ID3v2 header.
source code
 
get_id3v2_tags(fp)
returns the id3v2 tag as a string.
source code
 
get_id3v1_offset_and_tag(filename, correct_offset=False) source code
 
_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
source code
Variables [hide private]
  BUFFMAX = 8192
  __package__ = 'ewa'
Function Details [hide private]

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

source code 

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.

get_id3v2_tags(fp)

source code 

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.