quelcom-0.4.0/ 40755 0 0 0 7245453630 11152 5ustar rootrootquelcom-0.4.0/makefile100644 0 0 2763 7245453630 12757 0ustar rootroot # # makefile for quelcom 0.4.0 # # all variables exported by default to sub-makefiles export PREFIX=/usr/local BINDIR=$(PREFIX)/bin LIBDIR=$(PREFIX)/lib LOCALEDIR=$(PREFIX)/share/locale INFODIR=$(PREFIX)/info MANDIR=$(PREFIX)/man PACKAGE=quelcom VERSION=0.4.0 CXX=g++ DIRS=lib bin doc po all: for i in $(DIRS); \ do \ make -C $$i; \ done clean: for i in $(DIRS); \ do \ make -C $$i clean; \ done # installs the deprecated man pages installman: make -C doc installman install: all for i in $(DIRS); \ do \ make -C $$i install; \ done package: # include generated doc un .mo files make -C doc make -C po # clean package rm -rf quelcom-$(VERSION) mkdir -p quelcom-$(VERSION) cp -f makefile ChangeLog INSTALL README TODO quelcom-$(VERSION) # binary files mkdir -p quelcom-$(VERSION)/bin cp bin/*.cc bin/makefile quelcom-$(VERSION)/bin # library files mkdir -p quelcom-$(VERSION)/lib cp lib/*.{cc,hh} lib/makefile quelcom-$(VERSION)/lib # documentation files mkdir -p quelcom-$(VERSION)/doc cp -f doc/*.texinfo doc/quelcom.* doc/texinfo.tex doc/makefile quelcom-$(VERSION)/doc cp -Rf doc/old.man.pages quelcom-$(VERSION)/doc # po/mo files mkdir -p quelcom-$(VERSION)/po cp -f po/*.{po,mo} po/makefile quelcom-$(VERSION)/po # build tar file tar cvzf quelcom-$(VERSION).tar.gz quelcom-$(VERSION) tgz: tar cvzf quelcom-$(VERSION)-`date +%Y%m%d-%H%M.tgz` bin/*.cc bin/makefile makefile [A-Z]* doc/* tudú* bin/pendents/* Doxyfile lib/*.{cc,hh} lib/makefile po/*.{po,mo} po/makefile quelcom-0.4.0/ChangeLog100644 0 0 3240 7245453630 13020 0ustar rootroot20010326: version 0.4.0 splitted sources in directories created shared libraries added time specifiers for qwavsample, qwavsilence, q{mp3,wav}cut corrected a bug that made qwavfade just fade the first of the given files to fade. improved qmp3report (html output, split reports across subdirs) added variable bit rate support for qmp3info, qmp3check, qmp3report, qmp3join (no vbr support in qmp3cut by now) (xing vbr headers are not read). qwavheaderdump: added some capability to recover damaged headers. adapted source code to compile with no modifications with cygwin tools. binary versions for windows available separately. (near complete) .mo gettext translation files for catalan and spanish deprecated man pages. full documentation in texinfo, html and txt formats. postscript version available separately. doxygen-ized part of the library code 20010123: version 0.3.0 added gettext support. no translations available yet added qwavfade added qmp3report added qwavheaderdump added long options support (getopt_long) added ability to specify file points with millisecond resolution added silence shrinking capability to qwavsilence speeded up qwavsilence on non silent wav files updated man pages 20001227: version 0.2.0 corrected some function signatures that caused egcs fail (almost version 2.91.66) corrected overflow bug that caused fail on search ops in big files added qwavsilence and qmp3check updated man pages 20001211: version 0.1.0 rewritten file access with mmap renamed binaries and most of sources prepending with 'q' code cleanup added qmp3cut 20001031: version 0.0.0b first public release: wavinfo, wavjoin, wavcut, mp3info, mp3join quelcom-0.4.0/INSTALL100644 0 0 2757 7245453630 12313 0ustar rootrootinstallation instructions for quelcom 0.4.0 REQUIREMENTS quelcom is being developed on an intel p133 with suse 6.3 linux. other configurations may work also. a c++ compiler is needed. i'm currently using gcc 2.95.2. c++ libraries: libstdc++ is required. BUILDING AND INSTALLATION the sources may be found at http://www.etse.urv.es/~dmanye/quelcom/quelcom.html unpack the package: tar xzf quelcom-0.4.0.tar.gz this should create a directory called quelcom-0.4.0 and expand there all the files get into the directory and build cd quelcom-0.4.0 make if you get any irrecoverable error, you can try to fix it by editing by hand the makefile, or looking at the source files ;-). otherwise you can try to contact with me and explain me what kind of error you get. when everything is fine you can proceed with installation issuing the command: make install by default places of installation are: - /usr/local/bin: executables - /usr/local/lib: libraries - /usr/local/share/locale: translation files - /usr/local/info: info manual you can change this by editing the root makefile and changing the predefined values to your preferences. the doc directory contains also the info manual in html and txt formats. in addition, this release also contains the deprecated man pages for version 0.3.0. they will be installed under /usr/local/man if you issue the command 'make installman'. gaudeix-ne, si pots. dmanye@etse.urv.es http://www.etse.urv.es/~dmanye/quelcom/quelcom.html quelcom-0.4.0/README100644 0 0 2154 7245453630 12131 0ustar rootrootquelcom v0.4.0 quelcom is a set of tools to manage wav and mp3 files. this release 0.4.0 is considered yet in beta state although works reasonably well for his author. currently the following applications are implemented: qwavinfo: to get info from a wav file qwavjoin: to join two or more wav files in one qwavcut: to extract or delete a fragment of a wav file qwavsilence: to detect silence sequences in wav files qwavfade: to fade in/out wav files qwavheaderdump: to dump and fix wav headers qmp3info: to get info from a mp3 file qmp3join: to join two or more mp3 files in one qmp3cut: to extract or delete a fragment of a mp3 file qmp3check: to check and clean mp3 streams qmp3report: to get reports from mp3 directory hierarchies an info manual can be found in the doc subdir (html version and source texinfo is also available) deprecated (version 0.3.0) man pages for each app are provided with the package see INSTALL file for instructions about building and installing the software enjoy it. comments and suggestions are welcome. dmanye@etse.urv.es http://www.etse.urv.es/~dmanye/quelcom/quelcom.html quelcom-0.4.0/TODO100644 0 0 1027 7245453630 11737 0ustar rootrootto-do wish list for quelcom 0.4.0 reading/writing from/to stdin/stdout use autoconf/automake implement a mp3 silence detecter implement a wav volume normalizer allow user-customizable info format for {mp3,wav}info implement a kind of lightweight quelcom sound file editor include frame-decoding capability to get more extensive checking of frames (qmp3check) translations for de,fr implement a (hard) real-time sound recorder (implement wav::record) write a port to other operating systems/architectures (solaris+sparc) quelcom-0.4.0/bin/ 40755 0 0 0 7245453630 11722 5ustar rootrootquelcom-0.4.0/bin/qmp3check.cc100644 0 0 23456 7245453630 14236 0ustar rootroot# include // getopt # include // per esborrar... # include "qmp3frameheader.hh" # include "qmp3.hh" # include "qfile.hh" # include "qtag.hh" # include "qexception.hh" #ifdef NLS # include # include # define _(s) gettext (s) #else # define _(s) (s) #endif void usage () { cerr.form(_(" %s: check and clean mp3 streams\n"),APPNAME); cerr.form(_(" syntax: %s [option]... file...\n"),APPNAME); cerr << _(" -D, --delete: delete invalid frames and garbage. use with care\n"); cerr << _(" -h, --help: show this help and exit\n"); cerr << _(" -q, --quiet: no output messages\n"); cerr << _(" -T, --delete-tag: delete tag (if exists). option -D must be set\n"); cerr << _(" -v, --verbose: show more detailed info\n"); cerr << _(" -V, --version: show version and exit\n"); } int main (int argc, char **argv) { int option; bool verbose=false, del=false, delTag=false, quiet=false; static struct option long_options[] = { {"delete",no_argument,0,'D'}, {"help",no_argument,0,'h'}, {"quiet",no_argument,0,'q'}, {"delete-tag",no_argument,0,'T'}, {"verbose",no_argument,0,'v'}, {"version",no_argument,0,'V'}, {0,0,0,0} }; #ifdef NLS setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); #endif // un altre dia, per defecte llegir *.mp3 ... if (argc==1) { usage(); return 1; } // supress getopt error message opterr = 0; while ((option = getopt_long(argc, argv, "DhqTvV",long_options,0)) != EOF) switch (option) { case 'D': del=true; break; case 'h': usage(); return 0; break; case 'q': quiet=true; verbose=false; break; case 'T': delTag=true; break; case 'v': verbose=true; quiet=false; break; case 'V': cerr.form(_("%s - version %s - build %s\n"),APPNAME,VERSION,__DATE__); return 0; default: cerr.form(_("%s: option '%s' is not recognized or bad used\n"), APPNAME,argv[optind-1]); usage(); return 1; } if (delTag && !del) { cerr << APPNAME << _(": flag -T requires -D. ignoring -T") << endl; delTag = false; } if (argc<=optind) { // hauríem de fer *.mp3 ... ? cerr << APPNAME << _(": no input file(s)") << endl; usage(); return 1; } argv += optind; u_int32_t error_files = 0; u_int32_t frames, stream_length; u_int32_t mode = del?qfile::READWRITE:qfile::READ; caddr_t clean_offset, clean_block_begin, clean_block_end; qmp3frameheader *frame; u_int32_t skipped, total_skipped; do { total_skipped = 0; try { qfile file(*argv,mode); bool hasTag; qtag *tag; if (file.getSize()isValid(); if (hasTag) cerr << *argv << ": " << *tag << endl; else if (verbose) cerr << *argv << _(": no tag") << endl; } frames = 0; stream_length = file.getSize()-(hasTag?qtag::LENGTH:0); try { frame = new qmp3frameheader(file.getMap(),file.getSize()); } catch (qexception e) { cerr << file.getName() << ": " << e << endl; error_files++; continue; // sembla que no xuti...potser si: quan prova de desmapejar el qfile pq surt del seu àmbit, i crec que peta sempre que vol desmapejar un fitxer de mida zero. ok. } clean_offset = file.getMap()-1; clean_block_begin = frame->getMap(); skipped = frame->getMap()-file.getMap(); if (skipped) { if (!quiet) cerr.form(_("%s: skipped %d bytes of garbage at the beginning\n"), *argv,skipped); total_skipped += skipped; stream_length -= skipped; } if (stream_length >= frame->getLength()) { stream_length -= frame->getLength(); clean_block_end = frame->getMap()+frame->getLength()-1; frames++; } else if (!quiet) cerr.form(_("%s: first frame incomplete: %d of %d bytes\n"), *argv,stream_length,frame->getLength()); while (stream_length) { try { skipped = frame->setNext(stream_length); } catch (qexception e) { if (!quiet) cerr.form(_("%s: %d bytes of garbage at the end"), *argv,stream_length); if (verbose) cerr.form(" (%d..%d)",file.getSize()-stream_length,file.getSize()); if (!quiet) cerr << endl; total_skipped += stream_length; stream_length = 0; break; } if (skipped) { if (!quiet) cerr.form(_("%s: skipped %d bytes"),*argv,skipped); if (verbose) cerr.form(" (%d..%d)", clean_block_end-file.getMap()+1, frame->getMap()-file.getMap()-1); if (!quiet) cerr << endl; if ( clean_block_begin!=clean_offset && (clean_offset!=file.getMap()-1)) { if (del) { if (!quiet) cerr.form(_("%s: moving %d bytes"), *argv, clean_block_end-clean_block_begin+1); if (verbose) cerr.form(" (%d..%d) <-- (%d..%d)", clean_offset-file.getMap()+1, clean_offset-file.getMap()+1+clean_block_end-clean_block_begin, clean_block_begin-file.getMap(), clean_block_end-file.getMap()); if (!quiet) cerr << endl; file.move ((u_int32_t)(clean_block_begin-file.getMap()), (u_int32_t)(clean_block_end-file.getMap()), (u_int32_t)(clean_offset+1-file.getMap())); } clean_offset += clean_block_end-clean_block_begin+1; } else clean_offset = clean_block_end; clean_block_begin = frame->getMap(); total_skipped += skipped; stream_length -= skipped; } if (stream_length >= frame->getLength()) { stream_length -= frame->getLength(); clean_block_end = frame->getMap()+frame->getLength()-1; frames++; } else { if (!quiet) cerr.form(_("%s: last frame (%d+1) truncated: %d of %d bytes\n"), *argv,frames,stream_length,frame->getLength()); total_skipped += stream_length; stream_length = 0; break; } } if (clean_block_end>clean_block_begin && clean_block_begin>clean_offset && (clean_offsetgetMap()-file.getMap()), (u_int32_t)(tag->getMap()-file.getMap()+qtag::LENGTH-1), (u_int32_t)(clean_offset+1-file.getMap())); if (!quiet) cerr.form(_("%s: moving tag (%d bytes)"),*argv,qtag::LENGTH); if (verbose) cerr.form(" (%d..%d) <-- (%d..%d)", clean_offset-file.getMap()+1, clean_offset-file.getMap()+1+qtag::LENGTH-1, tag->getMap()-file.getMap(), tag->getMap()-file.getMap()+qtag::LENGTH-1); if (!quiet) cerr << endl; } clean_offset += qtag::LENGTH; } } else clean_offset += qtag::LENGTH; } if (total_skipped) { if (!quiet) cerr.form(_("%s: %d of %d discardable bytes\n"), *argv,total_skipped,file.getSize()); if (del) { if (!quiet) cerr.form(_("%s: truncating to %d bytes\n"), *argv,file.getSize()-total_skipped); file.truncate(file.getSize()-total_skipped); } } if (verbose) { if (del) { qmp3 mp3(*argv); cerr << mp3 << endl; // quedaria millor la versió 'verbose...' } else cerr.form(_("%s: %d frames, %d bytes\n"), *argv,frames,clean_offset-file.getMap()+1); } if (hasTag) delete tag; } catch (qexception e) { cerr << *argv << ": " << e << endl; error_files++; } if (total_skipped) error_files++; } while (*++argv); if (error_files && verbose) cerr.form(_("%d error files found\n"),error_files); } quelcom-0.4.0/bin/qmp3cut.cc100644 0 0 10530 7245453630 13741 0ustar rootroot# include // getopt # include "qmp3.hh" # include "qexception.hh" #ifdef NLS # include # include # define _(s) gettext (s) #else # define _(s) (s) #endif void usage () { cerr.form(_(" %s: extract and/or delete parts of a mp3 file\n"),APPNAME); cerr.form(_(" syntax: %s [option]... file\n"),APPNAME); cerr << _(" options:\n"); cerr << _(" -B, --set-begin : set the first frame from the beginning of the file\n"); cerr << _(" -b, --set-begin-from-eof : set the first frame from the end of the file\n"); cerr << _(" -d, --delete: deletes the fragment\n"); cerr << _(" -E, --set-end : set the last frame from the beginning of the file\n"); cerr << _(" -e, --set-end-from-eof : set the last frame from the end of the file\n"); cerr << _(" -h, --help: show this help and exit\n"); cerr << _(" -o, --output : output file where the fragment is stored\n"); cerr << _(" -s, --size : specifies the size of the cut\n"); cerr << _(" -S, --slice